Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <script src="http://player.twitch.tv/js/embed/v1.js"></script>
- <body style="margin:0">
- <div id="div-player" style="width:100%;height:100%;background:#000;"></div>
- </body>
- <script type="text/javascript">
- window.addEventListener('load', function() {
- // window.androidObj = function AndroidClass(){};
- var options = {
- width: "100%",
- height: "100%",
- scrolling: false,
- channel: "dreamhackcs",
- autoplay: true,
- controls: false,
- frameBorder: 0
- };
- console.log("started");
- var player = new Twitch.Player("div-player", options);
- player.setVolume(1.0);
- player.setMuted(false);
- player.addEventListener(Twitch.Player.READY, function () {
- console.log("playerReady");
- });
- player.addEventListener(Twitch.Player.ENDED, function () {
- // window.androidObj.playerEnded();
- console.log("playerEnded");
- });
- player.addEventListener(Twitch.Player.PLAYING, function () {
- // window.androidObj.playerPlaying();
- console.log("playerPlaying");
- });
- player.addEventListener(Twitch.Player.PLAYBACK_BLOCKED, function () {
- // window.androidObj.playerBlocked();
- console.log("playerBlocked");
- });
- player.addEventListener(Twitch.Player.OFFLINE, function () {
- // window.androidObj.playerEnded();
- console.log("playerEnded");
- });
- console.log("finished");
- });
- </script>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement