-
Notifications
You must be signed in to change notification settings - Fork 0
Tinyplayer
İlker Göktuğ Öztürk edited this page Apr 26, 2016
·
4 revisions
Tinyplayer is an HTML5 video player with XHR & Media Source Extension capabilities. It also automatically recognizes Gust on page if loaded since it has native support.
You can modify xhr requests by beforeRequest. See fields of XhrOptions.
var video = document.getElementById("video");
Tinyplayer(video, {
beforeRequest: function(options) {
options.withCredentials = true;
return options;
}
});
The only difference from standard HTML5 video initialization pattern is you also need to specify codec information within type prop and use application keyword instead video for video format e.g application/mp4 and initialize your video with Tinyplayer.
<video
id="video"
autoplay>
<source
src="frag_bunny.mp4"
type='application/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
</video>
<script>
var video = document.getElementById("video");
Tinyplayer(video);
</script>