fbsamples / 360-video-player-for-android

Sample code for creating a 360 video player on Android. Creates an OpenGL ES scene that renders a sphere textured with video frames from MediaPlayer playback. Does not use the NDK. This is a simple example of the core elements of 360 video rendering and is not intended to be production quality code. The code may be unstable. This is won't be maintained.
Other
616 stars 166 forks source link

Any drawback implement this feature using GLSurfaceView? #5

Closed b95505017 closed 8 years ago

b95505017 commented 8 years ago

As title.

03lafaye commented 8 years ago

In Nougat+, no since the SurfaceView will be synchronised with the View layout system. But in older versions you'll want TextureView if you don't plan to use a full screen view and will be showing the video in a non-static view that's part of a scrollable list or can be animated. SurfaceView, prior to Nougat, would draw it's surface behind the app surface and cut a hole through the app window to show its content, as such it didn't operate like a normal view that could be animated correctly.

b95505017 commented 8 years ago

But if we want to play a protected (DRM) video, it looks like we could only use SurfaceView.