Reputation: 1858
I am using videoJs player to play videos , i need to know is there any support for mpeg-dash in videoJS ? ..I referred this link http://msdnrss.thecoderblogs.com/2014/01/mpeg-dash-tutorial-embedding-an-adaptive-streaming-video-within-your-html5-application-2/ to play mpeg-dash video .
In code
videojs(this.get('element')); //here this.get('element') refers to video object
var url= .mpd manifest file
var context = new Dash.di.DashContext();
var player = new MediaPlayer(context);
player.startup();
player.attachView(this.get('element')); //
player.attachSource(url);
Now mpeg-dash video will play but videoJS and Dash is not linked with each other , so i need to know , how i can bind dash to videoJs player ?
Upvotes: 0
Views: 7236
Reputation: 658
please refer videojs-contrib-dash
const options = {
"preload": "auto",
"width":"600 px",
hls: {
withCredentials: true
},
plugins: {
videoJsResolutionSwitcher: {
// default: 'high',
dynamicLabel: true
}
},
html5: {
nativeCaptions: false,
dash: {
setLimitBitrateByPortal: false,
// setMaxAllowedBitrateFor: ['video', 2000]
}
}
};
videojs.options.flash.swf = "http://vjs.zencdn.net/4.2/video-js.swf"
this.video = videojs(this.videoElement.nativeElement,options);
this.video.src([
{
type: "application/dash+xml",
src: "your url",
}
]);
Upvotes: 1
Reputation: 453
You may switch to dash.js or bitdash for MPEG-DASH playback. As far as I know there is also a video.js wrapper for dash.js.
Upvotes: 0
Reputation: 116
You might want to check out this link: https://github.com/videojs/video.js/issues/752 which says that you'll need to specify a type attribute on the video element (specifically type="application/dash+xml"). Also I'm not sure if Safari supports DASH yet (or ever will) but the latest versions of Chrome/Firefox should.
Upvotes: 1