File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ shaka.cast.CastProxy = class extends shaka.util.FakeEventTarget {
106
106
* @override
107
107
* @export
108
108
*/
109
- destroy ( forceDisconnect ) {
109
+ destroy ( forceDisconnect = false ) {
110
110
if ( this . sender_ && forceDisconnect ) {
111
111
this . sender_ . forceDisconnect ( ) ;
112
112
}
Original file line number Diff line number Diff line change @@ -222,10 +222,12 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
222
222
}
223
223
224
224
/**
225
+ * @param {boolean= } forceDisconnect If true, force the receiver app to shut
226
+ * down by disconnecting. Does nothing if not connected.
225
227
* @override
226
228
* @export
227
229
*/
228
- async destroy ( ) {
230
+ async destroy ( forceDisconnect = false ) {
229
231
if ( document . pictureInPictureElement == this . localVideo_ ) {
230
232
await document . exitPictureInPicture ( ) ;
231
233
}
@@ -271,7 +273,7 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
271
273
}
272
274
273
275
if ( this . castProxy_ ) {
274
- await this . castProxy_ . destroy ( ) ;
276
+ await this . castProxy_ . destroy ( forceDisconnect ) ;
275
277
this . castProxy_ = null ;
276
278
}
277
279
Original file line number Diff line number Diff line change @@ -101,12 +101,14 @@ shaka.ui.Overlay = class {
101
101
102
102
103
103
/**
104
+ * @param {boolean= } forceDisconnect If true, force the receiver app to shut
105
+ * down by disconnecting. Does nothing if not connected.
104
106
* @override
105
107
* @export
106
108
*/
107
- async destroy ( ) {
109
+ async destroy ( forceDisconnect = false ) {
108
110
if ( this . controls_ ) {
109
- await this . controls_ . destroy ( ) ;
111
+ await this . controls_ . destroy ( forceDisconnect ) ;
110
112
}
111
113
this . controls_ = null ;
112
114
You can’t perform that action at this time.
0 commit comments