google-ar / sceneform-android-sdk

Sceneform SDK for Android
https://developers.google.com/sceneform/develop/
Apache License 2.0
1.23k stars 603 forks source link

ViewRenderable not working properly with VideoView #9

Closed BALUSANGEM closed 6 years ago

BALUSANGEM commented 6 years ago

Iam using ViewRenderable with this Layout


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/planetInfoCard"
    android:layout_width="300dp"
    android:layout_height="300dp"
    android:gravity="center"
    android:orientation="vertical"
    android:text="Test"
    android:textAlignment="center">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hi how are you?" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="This is Button" />

    <VideoView
        android:layout_width="100dp"
        android:layout_height="100dp" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Do you know what to do?" />

</LinearLayout>

TextView's and Button is coming properly in ARScene, but VideoView is moving along with Camera.

screenshot_20180510-123133_hello sceneform

My final goal is to play Video with chroma key.but iam unable to play video also

malik-at-work commented 6 years ago

VideoView can not be supported by Sceneform 1.0. We're looking into a way support this use case for an upcoming release.

ninerdelta commented 6 years ago

If VideoView is not supported, this would also include TextureView and SurfaceView i.e. any way of streaming anchored video content?

dsternfeld7 commented 6 years ago

We will not be adding support for using VideoView (Or any other SurfaceView) as part of a ViewRenderable, it is a current technical constraint.

However, we just released Sceneform 1.4 that adds the ability to display an android SurfaceTexture on a 3D object in Sceneform using the Sceneform class ExternalTexture. This is a new sample here that shows how to use this to play chroma keyed videos.

Please feel welcome to open new issues for any problems you run into with the new API.

kriztho commented 6 years ago

Hi @dsternfeld7, The link you posted for the new sample is broken. Could you repost it? Thanks,

dsternfeld7 commented 6 years ago

Thanks, the directory structure changed a bit - new link is here.

juancramos commented 5 years ago

Hello there, I am trying to develop an AR app to help visual impaired people, so, my main idea is to use WebRTC in order to project computer desktop to an augmented environment where users can easily adjust size of the screen as well proximity to it.

SurfaceViewRenderer is the object used by WebRTC native API, but, as I understand it is an inherit of VidewView witch is not supported.

Would you help me with some hints to achieve this goal? I will really appreciate it