VideoTexture videoTexture = new VideoTexture(mViroView.getViroContext(), Uri.parse("file:///android_asset/test.mp4"));
Material material = new Material();
material.setDiffuseTexture(videoTexture);
Quad quad = new Quad(10, 10);
quad.setMaterials(Arrays.asList(material));
// Create a Node, position it, and attach the Text geometry to it
Node videoNode = new Node();
videoNode.setPosition(new Vector(0, 0, -2));
videoNode.setGeometry(quad);
rootNode.addChildNode(videoNode);
videoTexture.play();
errors:
2020-04-01 15:51:18.634 31547-31614/? E/MemoryLeakMonitorManager: MemoryLeakMonitor.jar is not exist!
2020-04-01 15:51:18.655 31547-31624/? E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@7fff0ad
2020-04-01 15:51:19.008 31547-31627/? A/irosample.scen: thread.cc:2166] No pending exception expected: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/exoplayer2/trackselection/AdaptiveTrackSelection$Factory;
2020-04-01 15:51:19.008 31547-31627/? A/irosample.scen: thread.cc:2166] at void com.viro.core.internal.AVPlayer.(long, android.content.Context) (AVPlayer.java:98)
2020-04-01 15:51:19.008 31547-31627/? A/irosample.scen: thread.cc:2166] at void com.viro.core.internal.PlatformUtil.runTask(int) (PlatformUtil.java:-2)
2020-04-01 15:51:19.009 31547-31627/? A/irosample.scen: thread.cc:2166] at void com.viro.core.internal.PlatformUtil.access$000(int) (PlatformUtil.java:77)
2020-04-01 15:51:19.009 31547-31627/? A/irosample.scen: thread.cc:2166] at void com.viro.core.internal.PlatformUtil$TaskRunnable.run() (PlatformUtil.java:97)
2020-04-01 15:51:19.009 31547-31627/? A/irosample.scen: thread.cc:2166] at void com.viro.core.internal.GLTextureView$GLThread.guardedRun() (GLTextureView.java:1262)
2020-04-01 15:51:19.009 31547-31627/? A/irosample.scen: thread.cc:2166] at void com.viro.core.internal.GLTextureView$GLThread.run() (GLTextureView.java:1044)
2020-04-01 15:51:19.009 31547-31627/? A/irosample.scen: thread.cc:2166] Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection$Factory" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.example.virosample.scene-4qgjGVUXPKgzEezXrfMKtQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.virosample.scene-4qgjGVUXPKgzEezXrfMKtQ==/lib/arm, /data/app/com.example.virosample.scene-4qgjGVUXPKgzEezXrfMKtQ==/base.apk!/lib/armeabi-v7a, /system/lib, /product/lib]]
VideoTexture videoTexture = new VideoTexture(mViroView.getViroContext(), Uri.parse("file:///android_asset/test.mp4")); Material material = new Material(); material.setDiffuseTexture(videoTexture);
errors:
2020-04-01 15:51:18.634 31547-31614/? E/MemoryLeakMonitorManager: MemoryLeakMonitor.jar is not exist! 2020-04-01 15:51:18.655 31547-31624/? E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@7fff0ad 2020-04-01 15:51:19.008 31547-31627/? A/irosample.scen: thread.cc:2166] No pending exception expected: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/exoplayer2/trackselection/AdaptiveTrackSelection$Factory; 2020-04-01 15:51:19.008 31547-31627/? A/irosample.scen: thread.cc:2166] at void com.viro.core.internal.AVPlayer.(long, android.content.Context) (AVPlayer.java:98)
2020-04-01 15:51:19.008 31547-31627/? A/irosample.scen: thread.cc:2166] at void com.viro.core.internal.PlatformUtil.runTask(int) (PlatformUtil.java:-2)
2020-04-01 15:51:19.009 31547-31627/? A/irosample.scen: thread.cc:2166] at void com.viro.core.internal.PlatformUtil.access$000(int) (PlatformUtil.java:77)
2020-04-01 15:51:19.009 31547-31627/? A/irosample.scen: thread.cc:2166] at void com.viro.core.internal.PlatformUtil$TaskRunnable.run() (PlatformUtil.java:97)
2020-04-01 15:51:19.009 31547-31627/? A/irosample.scen: thread.cc:2166] at void com.viro.core.internal.GLTextureView$GLThread.guardedRun() (GLTextureView.java:1262)
2020-04-01 15:51:19.009 31547-31627/? A/irosample.scen: thread.cc:2166] at void com.viro.core.internal.GLTextureView$GLThread.run() (GLTextureView.java:1044)
2020-04-01 15:51:19.009 31547-31627/? A/irosample.scen: thread.cc:2166] Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection$Factory" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.example.virosample.scene-4qgjGVUXPKgzEezXrfMKtQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.virosample.scene-4qgjGVUXPKgzEezXrfMKtQ==/lib/arm, /data/app/com.example.virosample.scene-4qgjGVUXPKgzEezXrfMKtQ==/base.apk!/lib/armeabi-v7a, /system/lib, /product/lib]]