Uncaught TypeError on Period Switch
Created by: davemevans
https://github.com/Dash-Industry-Forum/dash.js/pull/1774 seems to have introduced an uncaught type error issue on a Period switch. This did not occur in 2.4.1.
I can recreate this at the boundary of the first and seconds http://dash.edgesuite.net/dash264/TestCasesIOP33/misc/manifest_1second.mpd
Chain of events:
PLAYBACK_SEEKING triggered:
-> StreamController.onPlaybackSeeking -> (ultimately) scheduleController.reset -> eventBus.off(PLAYBACK_SEEKING, scheduleController.onPlaybackSeeking)
-> BufferController.onPlaybackSeeking
-> ScheduleController.onPlaybackSeeking (!)
ScheduleController was reset in the first handler and so many of the attributes are null and cannot be dereferenced, leading to the type error.
Previously, when the handler list was mutated, the handler would be removed and not called.