validate loop in schedule controller never stops if scheduleWhilePaused is true
Created by: KarishmaBagga
ScheduleController's stop is never called and if we set scheduleWhilePaused as true, validate loop keeps getting called even after stream has completed and finished playing.
Steps to repro (valid both for 1.6.0 and 2.0):
- Set scheduleWhilePaused as true using setScheduleWhilePaused API
- Play video till end.
- If you take a break at validate, it keeps getting called indefinitely.
- It works in the hosted dash.js because a) scheduleWhilePaused is false b) video element goes into paused state after playback completes c) so validate returns not because isStopped is true but because playbackController.isPaused() is true and scheduleWhilePaused is false
Expected Behavior: We should call scheduleController stop() in onStreamCompleted