Skip to content

Instantly share code, notes, and snippets.

@deestan
Created December 4, 2017 14:26
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 deestan/2579c63edc444dbd0bede0efd99100bb to your computer and use it in GitHub Desktop.
Save deestan/2579c63edc444dbd0bede0efd99100bb to your computer and use it in GitHub Desktop.
Put this file in same folder as THEOplayer.js and the gang.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>THEOplayer 2.X: Getting Started</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type='text/javascript' src='./THEOplayer.js'></script>
<link rel="stylesheet" type="text/css" href='./ui.css'>
</head>
<body>
<div class="theoplayer-container video-js theoplayer-skin theo-seekbar-above-controls"></div>
</body>
<script>
var element = document.querySelector('.theoplayer-container');
var player = new THEOplayer.Player(element, {
ui : { fluid: true },
libraryLocation : './'
});
player.source = {
sources : [{
src : 'https://amssamples.streaming.mediaservices.windows.net/634cd01c-6822-4630-8444-8dd6279f94c6/CaminandesLlamaDrama4K.ism/manifest(format=mpd-time-csf)', // sets DASH source
type : 'application/dash+xml' // sets type to MPEG-DASH
}]
};
player.addEventListener('ended', (evt) => {
player.play();
});
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment