How to play DRM content in flutter web version?

860 Views Asked by At

Flutter application is implemented for both mobile and web versions. We have a player to stream DRM content. And for android native by using ExoPlayer support we are able to play the DRM content. Below is some package used for providing the license for player.

com.google.android.exoplayer2.source.dash.DashMediaSource
com.google.android.exoplayer2.drm.DrmSessionManager
com.google.android.exoplayer2.source.smoothstreaming.SsMediaSource
com.google.android.exoplayer2.source.ProgressiveMediaSource
com.google.android.exoplayer2.source.hls.HlsMediaSource

Now we would like to play the same DRM content with web version. We are using 'VideoElement' to play the stream url. VideoElement is working fine for normal video url's but we are not finding the way to play DRM content in it. In other way, we are not able to provide license URL in VideoElement of web version to play DRM content.

Present web video player code is mentioned below.

 videoElement = VideoElement()
      ..src = uri
      ..autoplay = false
      ..controls = false
      ..style.border = 'none';

    videoElement.setAttribute('playsinline', 'true');

    ui.platformViewRegistry.registerViewFactory(
        'videoPlayer-$textureId', (int viewId) => videoElement);

Any suggestions to add license url/ play the DRM url.

0

There are 0 best solutions below