google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.74k stars 6.03k forks source link

Provide sample code for most common custom receiver functionality #5866

Open SystemRestored opened 5 years ago

SystemRestored commented 5 years ago

Hello, Exoplayer cast is awesome playing normal hls and video files. However, there is no documentation for playing hls aes 128 cbc key containing m3u8 in chromecast. If you have made a cast extension, why dont you give a tutorial or project for custom receiver for cast? I could not find anywhere anycode to play hls aes m3u8. Any users who has implemented this kindly share your code. Or the google exoplayer team kindly give a proper code for exoplayer to play hls aes and drm content. So far I have Implemented upto this to play normal m3u8 with custom receiver:

 <html>
<head>
  <script type="text/javascript"
      src="//www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js">
  </script>
</head>
<body>
  <cast-media-player></cast-media-player>
  <script>
  const context = cast.framework.CastReceiverContext.getInstance();
   const playerManager = context.getPlayerManager();
    const playbackConfig = new cast.framework.PlaybackConfig();
     playbackConfig.autoResumeDuration = 5;

    context.start({

      playbackConfig: playbackConfig

    });

  </script>
</body>
</html>
AquilesCanta commented 5 years ago

Hi @anjaneesh, mind providing some assistance here?

ojw28 commented 5 years ago

This seems more like something the Cast team should provide. @anjaneesh - Are there existing tutorials covering this?