Skip to content

Instantly share code, notes, and snippets.

@tifroz
Last active December 10, 2017 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tifroz/5435a5a508c764c4f97e40cef12ca0b3 to your computer and use it in GitHub Desktop.
Save tifroz/5435a5a508c764c4f97e40cef12ca0b3 to your computer and use it in GitHub Desktop.
Test of the CAF queueManager interface
<!DOCTYPE html>
<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>
var context = cast.framework.CastReceiverContext.getInstance()
var playerManager = context.getPlayerManager() ;
context.start() ;
// This should return an empty array (instead it throws an error)
var items = playerManager.getQueueManager().getItems() ;
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment