media icon indicating copy to clipboard operation
media copied to clipboard

DRM Problem (VR Split Screen with Multiple SurfaceView)

Open yavuzirfanoglu opened this issue 1 year ago • 3 comments

Hello There

I am creating a VR Player with ExoPlayer. Our client wants to use Split Screen mode for Cardboard and other VR Goggles.

I have used multiple SurfaceView's with a single exoplayer instance. Also used Grafika and created dual vision without a problem. By creating new WindowSurface and using onFrameAvailable listener.

Unfortunately when I tried to use a content with DRM, exoplayer doesn't allow playback(Because of security reasons)

I can't find another method for Split Screen VR with DRM content. Can anybody direct me to a solution?

https://github.com/google/grafika

yavuzirfanoglu avatar Jan 30 '24 18:01 yavuzirfanoglu

I'm afraid this is beyond the scope of this issue tracker - ExoPlayer doesn't enforce the DRM restrictions, this is done by components below us in the Android framework (MediaDrm and MediaCodec) and the secure output path.

We'll leave this issue open for ~2 weeks in case anyone wishes to answer it here, however we don't have any expertise to help I'm afraid.

icbaker avatar Feb 08 '24 16:02 icbaker

Thanks for the response. I am still looking for a solution online. There is a similar question in the stackoverflow.

Can I create a custom TrackRenderer which will have two SurfaceView and maybe render twice? Actually we have no performance constraints. I even try thinking of creating two exoplayer instances and 2 SurfaceView, but I am not sure that I can perfectly synchronise frames. Moreover it will download the same content twice, which may cause problems with low connection speeds.

https://stackoverflow.com/questions/36274973/android-exoplayer-play-single-stream-to-multiple-surfaces

yavuzirfanoglu avatar Feb 08 '24 16:02 yavuzirfanoglu

Playing DRM-protected VR content requires a device to support particular decoder extensions (more info: https://source.android.com/docs/core/graphics/arch-st#st_vid_play) - can you see what GlUtil.isProtectedContentExtensionSupported() returns on your device to see if it supports this at all? If not, this won't be possible on this device I'm afraid.

You also need to ensure that your GL context is set up to use this extension - see an example of this here:

https://github.com/androidx/media/blob/b930b40a16c06318e43c81771fa2b1024bdb3f29/libraries/common/src/main/java/androidx/media3/common/util/EGLSurfaceTexture.java#L237-L251

icbaker avatar Feb 08 '24 17:02 icbaker

Closing due to inactivity.

icbaker avatar Mar 25 '24 18:03 icbaker