File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ If you are an exceptional JavaScript developer and would like to join the Phaser
261261
262262* TypeScript definitions fixes and updates (thanks @clark-stevenson @vrecluse )
263263* JSDoc typo fixes (thanks )
264+ * VideoStream.active = false is used if the browser supports it, otherwise it falls back to VideoStream.stop.
264265
265266### Bug Fixes
266267
Original file line number Diff line number Diff line change @@ -352,7 +352,14 @@ Phaser.Video.prototype = {
352352
353353 if ( this . videoStream !== null )
354354 {
355- this . videoStream . stop ( ) ;
355+ if ( this . videoStream [ 'active' ] )
356+ {
357+ this . videoStream . active = false ;
358+ }
359+ else
360+ {
361+ this . videoStream . stop ( ) ;
362+ }
356363 }
357364
358365 this . removeVideoElement ( ) ;
@@ -731,7 +738,15 @@ Phaser.Video.prototype = {
731738 else
732739 {
733740 this . video . src = "" ;
734- this . videoStream . stop ( ) ;
741+
742+ if ( this . videoStream [ 'active' ] )
743+ {
744+ this . videoStream . active = false ;
745+ }
746+ else
747+ {
748+ this . videoStream . stop ( ) ;
749+ }
735750 }
736751
737752 this . videoStream = null ;
You can’t perform that action at this time.
0 commit comments