Optimize captions code reused and ensure captionsenabled/captionsdisabled

will be sent on initial setup
This commit is contained in:
Albin Larsson
2018-05-27 05:08:18 +02:00
parent e9684c2021
commit 7aad747c25
3 changed files with 32 additions and 59 deletions

View File

@ -55,8 +55,10 @@ const ui = {
// Remove native controls
ui.toggleNativeControls.call(this);
// Captions
captions.setup.call(this);
// Setup captions for html5
if (this.isHTML5) {
captions.setup.call(this);
}
// Reset volume
this.volume = null;