File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ shaka.ui.RemoteButton = class extends shaka.ui.Element {
112
112
this . updateRemoteState_ ( ) ;
113
113
} ) ;
114
114
115
- this . updateRemoteState_ ( ) ;
115
+ this . updateRemoteState_ ( /* force= */ true ) ;
116
116
this . updateIcon_ ( ) ;
117
117
}
118
118
}
@@ -129,17 +129,18 @@ shaka.ui.RemoteButton = class extends shaka.ui.Element {
129
129
}
130
130
131
131
/**
132
+ * @param {boolean= } force
132
133
* @private
133
134
*/
134
- async updateRemoteState_ ( ) {
135
+ async updateRemoteState_ ( force = false ) {
135
136
if ( this . controls . getCastProxy ( ) . canCast ( ) &&
136
137
this . controls . isCastAllowed ( ) ) {
137
138
shaka . ui . Utils . setDisplay ( this . remoteButton_ , false ) ;
138
139
if ( this . callbackId_ != - 1 ) {
139
140
this . video . remote . cancelWatchAvailability ( this . callbackId_ ) ;
140
141
this . callbackId_ = - 1 ;
141
142
}
142
- } else if ( this . video . remote . state == 'disconnected' ) {
143
+ } else if ( this . video . remote . state == 'disconnected' || force ) {
143
144
const handleAvailabilityChange = ( availability ) => {
144
145
if ( this . player ) {
145
146
const disableRemote = this . video . disableRemotePlayback ;
You can’t perform that action at this time.
0 commit comments