Created
April 5, 2017 20:36
-
-
Save vgrafe/d4abc450d94d3757e897de068c023b1d to your computer and use it in GitHub Desktop.
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> | |
<head> | |
<title>Basic MediaPlayer</title> | |
<!-- the fopllowing files can be found here https://github.com/Microsoft/TVHelpers/tree/master/tvjs/src --> | |
<link href="../../../src/MediaPlayer/mediaplayer-1.0.0.0.css" rel="stylesheet" /> | |
<script src="../../../src/DirectionalNavigation/directionalnavigation-1.0.0.0.js"></script> | |
<script src="../../../src/MediaPlayer/mediaplayer-1.0.0.0.js"></script> | |
<style> | |
body { | |
overflow: hidden; | |
background-color: rgb(16, 16, 16); | |
} | |
section { | |
height: 100vh; | |
width: 100vw; | |
} | |
</style> | |
</head> | |
<body> | |
<section> | |
<div id="mediaPlayer"> | |
<video | |
autoplay='autoplay' | |
preload='auto' | |
src="https://your-lengthy-m3u8-comes-here" | |
autoplay="autoplay"></video> | |
</div> | |
</section> | |
<script> | |
var mediaPlayer = new TVJS.MediaPlayer(document.getElementById("mediaPlayer")); | |
// removes safe-zone padding on xbox | |
if(window.Windows && window.Windows.UI && window.Windows.UI.ViewManagement){ | |
var applicationView = Windows.UI.ViewManagement.ApplicationView.getForCurrentView(); | |
applicationView.setDesiredBoundsMode(Windows.UI.ViewManagement.ApplicationViewBoundsMode.useCoreWindow); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment