Play initialization
Created by: epiclabsDASH
Fix #2184 (closed)
This PR changes the behavior of PlaybackController so it operates with VideoModel only in case PlaybackController was previously initialized and then there is an active stream. Otherwise, there are situations in which a call to MediaPlayer.play() before stream is initialized (and then the MediaSource associated) brings video element to an unstable state and some of its events are not fired (for example, the "play" event that is used to launch processes like the manifest update one). Example code to reproduce the issue:
player.initialize();
player.attachView(video);
player.attachSource(url);
player.play();
This is broken since v2.6.0. Dash.js v2.5.0 and before were working fine because they were establishing the video element during PlaybackController initialization.