Live SegmentTimeline handling broken when switching audio tracks
Created by: TobbeEdgeware
The setLiveEdgeSeekTarget
function in src/streaming/controllers/ScheduleController.js is not working properly for live SegmentTimeline when switching audio language. This is very visible when the timeshiftBufferDepth is small, since the original start of the playback is used as live point.
I've made a test asset at http://vm2.dashif.org/livesim-dev/segtimeline_1/tsbd_24/testpic_6s/multiaudio.mpd
which has 24s timeshiftBufferDepth and 6s segments. If the asset is started, and one waits >20s and then switches audio language the player stops.
Looking into the log there is an error "Cannot read property 'startTime' of null" which happens in the setLiveEdgeSeekTarget function since request == null.
This can be traced back to liveEdge having the same value when called to switch language as it had when joining the live edge the first time.
I don't know if setLiveEdgeSeekTarget() should be modified, or maybe not called when switching audio language, but something is of course needed to initialize the new adaptationSet.