From c4b40a8bf05941728dcf4e3555429d1c4da6631b Mon Sep 17 00:00:00 2001 From: NikolaBorislavovHristov Date: Thu, 17 Jan 2019 10:13:20 +0200 Subject: [PATCH] dispatch load command before dispatch subtitles commands --- src/routes/Player/Player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/Player/Player.js b/src/routes/Player/Player.js index 77eb23cc0..bd443d0d2 100644 --- a/src/routes/Player/Player.js +++ b/src/routes/Player/Player.js @@ -40,13 +40,13 @@ class Player extends Component { } componentDidMount() { + this.dispatch('command', 'load', this.props.stream, {}); this.dispatch('command', 'addSubtitleTracks', [{ url: 'https://raw.githubusercontent.com/caitp/ng-media/master/example/assets/captions/bunny-en.vtt', origin: 'Github', label: 'English' }]); this.dispatch('setProp', 'selectedSubtitleTrackId', 'https://raw.githubusercontent.com/caitp/ng-media/master/example/assets/captions/bunny-en.vtt'); - this.dispatch('command', 'load', this.props.stream, {}); } onEnded = () => {