The player does not fire 'ended' event after seek(end_of_VOD) when replaying the same video
Created by: zgzong
Environment
-
The MPD passes the DASH-IF Conformance Tool on https://conformance.dashif.org/ -
The stream has correct Access-Control-Allow-Origin headers (CORS) -
There are no network errors such as 404s in the browser console when trying to play the stream -
The issue observed is not mentioned on https://github.com/Dash-Industry-Forum/dash.js/wiki/FAQ -
The issue occurs in the latest reference client on http://reference.dashif.org/dash.js/ and not just on my page
- Link to playable MPD file: https://dash.akamaized.net/dash264/TestCases/1a/sony/SNE_DASH_SD_CASE1A_REVISED.mpd
- Dash.js version: 2.9.2 and 3.0.0
- Browser name/version: chrome 77.0.3865.120
- OS name/version: windows 10
Steps to reproduce
- Load the reference player http://reference.dashif.org/dash.js/v2.9.2/samples/dash-if-reference-player/index.html
- Disable loop in options
- Load the playable MPD file: https://dash.akamaized.net/dash264/TestCases/1a/sony/SNE_DASH_SD_CASE1A_REVISED.mpd
- open the console, window.player.seek(window.player.duration());
- the first time play content, dashjs fired ended event when seek to end of stream.
- in console. window.player.play();
- when the video start play again, window.player.seek(window.player.duration());
- the bug will happen
Observed behaviour
Expect, the 'ended' event is fired on second time play the content.
Actual, no 'ended' event fired.
Console output
The second time call seek to end of VOD
window.player.seek(window.player.duration());
Debug.js:209 [548019][PlaybackController] Requesting seek to time: 597.054791
undefined
Debug.js:209 [548021][PlaybackController] Seeking to: 597.054791
Debug.js:209 [548022][BufferController][video] getAllRangesWithSafetyFactor for video - No request found in current time position, removing full buffer 0 - 104.770833
Debug.js:209 [548022][BufferController][video] Removing video buffer from: 0 to 104.770833
Debug.js:209 [548024][BufferController][audio] getAllRangesWithSafetyFactor for audio - No request found in current time position, removing full buffer 0 - 106.526666
Debug.js:209 [548025][BufferController][audio] Removing audio buffer from: 0 to 106.526666
Debug.js:209 [548026][PlaybackController] Native video element event: waiting
Debug.js:209 [548034][BufferController][video] onRemoved buffer from: 0 to 104.770833
Debug.js:209 [548035][BufferController][video] onRemoved : call updateBufferLevel
Debug.js:209 [548035][BufferController][video] checkIfSufficientBuffer trigger BUFFERING_COMPLETED
Debug.js:209 [548035][Stream] onBufferingCompleted - One streamProcessor has finished but audio one is not buffering completed
doLog @ Debug.js:209
warn @ Debug.js:172
onBufferingCompleted @ Stream.js:646
(anonymous) @ EventBus.js:88
trigger @ EventBus.js:88
checkIfSufficientBuffer @ BufferController.js:548
updateBufferLevel @ BufferController.js:521
onRemoved @ BufferController.js:738
(anonymous) @ EventBus.js:88
trigger @ EventBus.js:88
(anonymous) @ SourceBufferSink.js:193
executeCallback @ SourceBufferSink.js:310
updateEndHandler @ SourceBufferSink.js:327
Debug.js:209 [548036][BufferController][audio] onRemoved buffer from: 0 to 106.526666
Debug.js:209 [548036][BufferController][audio] onRemoved : call updateBufferLevel
Debug.js:209 [548037][BufferController][audio] checkIfSufficientBuffer trigger BUFFERING_COMPLETED
Debug.js:209 [548037][Stream] onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED
Debug.js:209 [548037][StreamController] [onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController.
Debug.js:209 [548346][AbrController] AbrController (video) switching from buffer occupancy to throughput ABR rule (buffer: 0.000).
Debug.js:209 [548347][AbrController] AbrController (audio) switching from buffer occupancy to throughput ABR rule (buffer: 0.000).
Debug.js:209 [548536][ScheduleController][video] Schedule stop because buffering is completed!
Debug.js:209 [548539][ScheduleController][audio] Schedule stop because buffering is completed!