Skip to content

Instantly share code, notes, and snippets.

@luizguilhermefr
Last active January 29, 2019 11:38
Show Gist options
  • Save luizguilhermefr/9559aaed2ce7af0471959a80f3591e3f to your computer and use it in GitHub Desktop.
Save luizguilhermefr/9559aaed2ce7af0471959a80f3591e3f to your computer and use it in GitHub Desktop.
Chromecast receiver application.
<!DOCTYPE html>
<html lang="en">
<head>
<title>CastCastCast</title>
<link rel="stylesheet" href="main.css" media="screen"/>
<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 src="receiver.js"></script>
</body>
</html>
cast-media-player {
--background-image: linear-gradient(0deg, #ca6c00, #000000);
--progress-color: rgba(202, 108, 0, 0.8);
--logo-image: url(logo.png);
--logo-size: 750px 265px;
--splash-image: url(splash.png);
--splash-size: 750px 453px;
--watermark-image: url(watermark.png);
--watermark-size: 60px 60px;
}
const context = cast.framework.CastReceiverContext.getInstance()
const playerManager = context.getPlayerManager()
playerManager.addEventListener(cast.framework.events.category.CORE,
e => {
console.log('CORE EVENT WAS FIRED ~> ' + e.type)
})
context.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment