Last active
January 29, 2019 11:38
-
-
Save luizguilhermefr/9559aaed2ce7af0471959a80f3591e3f to your computer and use it in GitHub Desktop.
Chromecast receiver application.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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