Skip to content

Instantly share code, notes, and snippets.

@jeroenhouben
Created January 16, 2017 10:58
Show Gist options
  • Save jeroenhouben/c772f16c91e88b8402395e861cf3e37b to your computer and use it in GitHub Desktop.
Save jeroenhouben/c772f16c91e88b8402395e861cf3e37b to your computer and use it in GitHub Desktop.
StreamOne playlist Minoto
<html>
<head>
<style>
html, body {
padding: 0;
margin: 0;
}
div {
max-width: 100%!important;
max-height: 100%!important;
}
</style>
<script src="/streamone/player/streamone-player-v2.min.js" charset="utf-8"></script>
<meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="gYsh0JiLaCpOhMYYNYGuZFrGjTXKCqXzGpe2ACIHtaYVizueeQbu3ZTiebEyut3LU9uPfinh7HvAX0TsAB1gNw==" />
</head>
<body>
<video
id="video"
class="video-js streamone-player"
controls
crossorigin="anonymous"
preload="none"
width="640"
height="360"
>
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that
<a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
</p>
</video>
<script type="text/javascript">
var playlistItems = [];
playlistItems.push({
poster: "/uploads/development/video/screenshot/2000/large_c926be06-1cec-447e-9319-919b891a84b6.jpg",
title: "Cara Delevingne lashes out at paparazzi",
id: "2000",
account:"account",
audioonly:false,
duration: 123,
live:false,
locations: {
adaptive: [],
progressive: [
{
label: "1080p",
height: 270,
width: 480,
sources:[
{
type:"video/mp4",
src: "http://streams.minoto-video.com/id/xQ6SMiyHNJ8y_web_hq.mp4"
}
]
},
{
label: "720p",
sources:[
{
type:"video/mp4",
src: "http://streams.minoto-video.com/id/xQ6SMiyHNJ8y_web_hq.mp4"
}
]
}, {
label: "360p",
sources:[
{
type:"video/mp4",
src: "http://streams.minoto-video.com/id/xQ6SMiyHNJ8y_web_hq.mp4"
}
]
}
]
}
});
playlistItems.push({
poster: "/uploads/development/video/screenshot/2006/large_137ac97f-0371-4848-a5c2-de9fd4372002.jpg",
title: "Ryan Gosling reportedly cheating on Eva Mendes",
id: "2006",
account:"account",
audioonly:false,
duration: 123,
live:false,
locations: {
adaptive: [],
progressive: [
{
label: "1080p",
height: 270,
width: 480,
sources:[
{
type:"video/mp4",
src: "http://streams.minoto-video.com/id/XcZQa7diz8XT_web_hq.mp4"
}
]
},
{
label: "720p",
sources:[
{
type:"video/mp4",
src: "http://streams.minoto-video.com/id/XcZQa7diz8XT_web_hq.mp4"
}
]
}, {
label: "360p",
sources:[
{
type:"video/mp4",
src: "http://streams.minoto-video.com/id/XcZQa7diz8XT_web_hq.mp4"
}
]
}
]
}
});
var options = {
skin: '/streamone/skin/default/streamone.css',
// playlist: '/streamone/examples/demo-playlist-ads.json',
playlist: {
items: playlistItems
},
pingback_url: 'https://content.streamonecloud.net/ping/dot.gif'
};
console.log(options);
var init_callback = function()
{
var player = this; // "this" will be the constructed player instance
// This function is called as soon as possible, which means the player might not be ready yet. To make sure it is
// ready, you can use the following code:
player.ready(function()
{
// Some code here
});
}
StreamOnePlayer('video', options, init_callback);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment