Forum Discussion
theblitz1959
8 years agoExplorer
Exoplayer in Unity
We are trying to embed a video using Exoplayer in an Oculus VR app using Unity. I have looked for examples but just can't seem to find any. Any help would really be appreciated.
4 Replies
Replies have been turned off for this discussion
- theblitz1959ExplorerThanks for the answer.
I used the first link you gave and got it working.
The second link I had actually seen before. It doesn't seem to explain exactly what to do.
Just a sort of small overview.
Is there anywhere where there is a more detailed explanation? - theblitz1959ExplorerThanks for the help!
We got it working for a local file.
Time to work on streaming ...... - WiltonAndyHonored GuestHi there, we're also looking to use ExoPlayer to play back video in Unity. Can I ask where Oculus have got to on the task to address this functionality on your end? Is this likely to be available for release soon? It could be a big help for us if so.
- theblitz1959Explorer
@imperativity
Hi,
I recently updated to Unity 2017 and now the following line is failing:
nativeTexture = Texture2D.CreateExternalTexture(textureWidth, textureHeight,TextureFormat.RGBA32, true, false, IntPtr.Zero);
The message I get is: ArgumentException: nativeTex can not be null
This is my full code:OVR_Media_Surface_Init();
mediaRenderer = GetComponent<Renderer>();
if (mediaRenderer.material == null || mediaRenderer.material.mainTexture == null)
{
Utils.Log("No material for movie surface");
}
nativeTexture = Texture2D.CreateExternalTexture(textureWidth, textureHeight,TextureFormat.RGBA32, true, false,IntPtr.Zero);
IssuePluginEvent(MediaSurfaceEventType.Initialize);
_androidSurface = OVR_Media_Surface_GetObject();
_playbackEnvironment.SetSurface(_androidSurface);
OVR_Media_Surface_SetTextureParms(textureWidth, textureHeight);
mediaRenderer.material.mainTexture = nativeTexture;
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 11 months ago
- 1 year ago
- 9 months ago