Basically I need to start playing my .mpd file from a given duration using dash.js
I am able to play my .mpd file properly from start to end using dash.js in browser. But when I want to play it from a specific duration specified in secs, it requests for .m4s files and results in 404 error from server. Below is the JS code –
var video = document.getElementById('video-' + layerId);
var player = dashjs.MediaPlayer().create();
player.initialize(video, videoUrl, true);
player.on(dashjs.MediaPlayer.events.STREAM_INITIALIZED, function() {
video.currentTime = 88; //
});
Error in console –
XHRLoader.js:102 – GET http://localhost:5000/videos/m4d/video_dash33.m4s 404 (NOT FOUND)
XHRLoader.js:102 – GET http://localhost:5000/videos/m4d/video_dash34.m4s 404 (NOT FOUND)
XHRLoader.js:102 – GET http://localhost:5000/videos/m4d/video_dash35.m4s 404 (NOT FOUND)
If I comment my 2nd last line, // video.currentTime = 88;
Then whole vide plays properly from start to end. But I need the video to start from a specific time say – 88 secs. How can I do it?