How to implement chromecast support for html5 player

Sathibabu P picture Sathibabu P · Aug 11, 2015 · Viewed 15.3k times · Source

I have designed an html5 player with some custom functionalities using js and html5,now i need to add chrome cast option on html5 player like https://raw.githubusercontent.com/kim-company/videojs-chromecast/master/screenshots/chromecast-player.jpg

The below is the link for designed html5 player https://player14123141.herokuapp.com/

Thanks for your help.

Answer

Leon Nicholls picture Leon Nicholls · Aug 13, 2015

You can reuse your HTML5 player by implementing the following Google Cast Receiver interface: https://developers.google.com/cast/docs/reference/receiver/cast.receiver.media.Player

You then specify your interface implementation as the media element for the MediaManager: https://developers.google.com/cast/docs/reference/receiver/cast.receiver.MediaManager