dash.js 无法一个接一个地播放多个视频

dash.js can't play multiple videos one after the other

我正在尝试使用 dash.js 使用相同的破折号对象一个接一个地播放一些 mpeg-dash 视频。我会这样初始化:

var dashPlayer = dashjs.MediaPlayer().create();

然后我将用我的第一个视频初始化它,例如:

dashPlayer.initialize(document.getElementById('dashvideoelement'), 'https:urltompegdashvideosource', true);

这将使视频按照我想要的方式播放。结束后,我想重用这个对象来播放新视频,但是使用不同 url 源进行的后续初始化什么也不做,即使我在对象上调用 reset() ,如果我然后初始化然后尝试 play(),我得到

Uncaught You must first call initialize() and set a valid source and view before calling this method

难道不能重复使用dash.js对象来播放不同的视频吗?这发生在 dash.js 版本 3.2.2 和 4.0.1 上。

谢谢。

请检查版本 4.1.0。我们在这里解决了这个问题:https://github.com/Dash-Industry-Forum/dash.js/pull/3735. A nightly build of dash.js is available here: https://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html