@@ -267,8 +267,9 @@ shaka.cast.CastReceiver.prototype.onCastStatusChanged_ = function() {
267267 let event = new shaka . util . FakeEvent ( 'caststatuschanged' ) ;
268268 this . dispatchEvent ( event ) ;
269269 // Send a media status message, with a media info message if appropriate.
270- if ( ! this . maybeSendMediaInfoMessage_ ( ) )
270+ if ( ! this . maybeSendMediaInfoMessage_ ( ) ) {
271271 this . sendMediaStatus_ ( 0 ) ;
272+ }
272273 } . bind ( this ) ) ;
273274} ;
274275
@@ -385,14 +386,16 @@ shaka.cast.CastReceiver.prototype.pollAttributes_ = function() {
385386 for ( let name in shaka . cast . CastUtils . PlayerGetterMethodsThatRequireLive ) {
386387 let frequency =
387388 shaka . cast . CastUtils . PlayerGetterMethodsThatRequireLive [ name ] ;
388- if ( this . updateNumber_ % frequency == 0 )
389- update [ 'player' ] [ name ] = /** @type {Object } */ ( this . player_ ) [ name ] ( ) ;
389+ if ( this . updateNumber_ % frequency == 0 ) {
390+ update [ 'player' ] [ name ] = /** @type {Object } */ ( this . player_ ) [ name ] ( ) ;
391+ }
390392 }
391393 }
392394 for ( let name in shaka . cast . CastUtils . PlayerGetterMethods ) {
393395 let frequency = shaka . cast . CastUtils . PlayerGetterMethods [ name ] ;
394- if ( this . updateNumber_ % frequency == 0 )
395- update [ 'player' ] [ name ] = /** @type {Object } */ ( this . player_ ) [ name ] ( ) ;
396+ if ( this . updateNumber_ % frequency == 0 ) {
397+ update [ 'player' ] [ name ] = /** @type {Object } */ ( this . player_ ) [ name ] ( ) ;
398+ }
396399 }
397400
398401 // Volume attributes are tied to the system volume.
@@ -406,8 +409,9 @@ shaka.cast.CastReceiver.prototype.pollAttributes_ = function() {
406409 // Only start progressing the update number once data is loaded,
407410 // just in case any of the "rarely changing" properties with less frequent
408411 // update messages changes significantly during the loading process.
409- if ( this . startUpdatingUpdateNumber_ )
412+ if ( this . startUpdatingUpdateNumber_ ) {
410413 this . updateNumber_ += 1 ;
414+ }
411415
412416 this . sendMessage_ ( {
413417 'type' : 'update' ,
@@ -598,8 +602,9 @@ shaka.cast.CastReceiver.prototype.onGenericMessage_ = function(event) {
598602 case 'SEEK' : {
599603 let currentTime = message [ 'currentTime' ] ;
600604 let resumeState = message [ 'resumeState' ] ;
601- if ( currentTime != null )
605+ if ( currentTime != null ) {
602606 this . video_ . currentTime = Number ( currentTime ) ;
607+ }
603608 if ( resumeState && resumeState == 'PLAYBACK_START' ) {
604609 this . video_ . play ( ) ;
605610 this . sendMediaStatus_ ( 0 ) ;
@@ -628,10 +633,12 @@ shaka.cast.CastReceiver.prototype.onGenericMessage_ = function(event) {
628633 let muted = volumeObject [ 'muted' ] ;
629634 let oldVolumeLevel = this . video_ . volume ;
630635 let oldVolumeMuted = this . video_ . muted ;
631- if ( level != null )
636+ if ( level != null ) {
632637 this . video_ . volume = Number ( level ) ;
633- if ( muted != null )
638+ }
639+ if ( muted != null ) {
634640 this . video_ . muted = muted ;
641+ }
635642 // Notify generic controllers if the volume changed.
636643 if ( oldVolumeLevel != this . video_ . volume ||
637644 oldVolumeMuted != this . video_ . muted ) {
@@ -650,8 +657,9 @@ shaka.cast.CastReceiver.prototype.onGenericMessage_ = function(event) {
650657 let currentTime = message [ 'currentTime' ] ;
651658 let manifestUri = this . opt_contentIdCallback_ ( contentId ) ;
652659 let autoplay = message [ 'autoplay' ] || true ;
653- if ( autoplay )
660+ if ( autoplay ) {
654661 this . video_ . autoplay = true ;
662+ }
655663 this . player_ . load ( manifestUri , currentTime ) . then ( function ( ) {
656664 // Notify generic controllers that the media has changed.
657665 this . sendMediaInfoMessage_ ( ) ;
@@ -730,14 +738,15 @@ shaka.cast.CastReceiver.prototype.sendMessage_ =
730738 */
731739shaka . cast . CastReceiver . prototype . getPlayState_ = function ( ) {
732740 let playState = shaka . cast . CastReceiver . PLAY_STATE ;
733- if ( this . isIdle_ )
741+ if ( this . isIdle_ ) {
734742 return playState . IDLE ;
735- else if ( this . player_ . isBuffering ( ) )
743+ } else if ( this . player_ . isBuffering ( ) ) {
736744 return playState . BUFFERING ;
737- else if ( this . video_ . paused )
745+ } else if ( this . video_ . paused ) {
738746 return playState . PAUSED ;
739- else
747+ } else {
740748 return playState . PLAYING ;
749+ }
741750} ;
742751
743752
@@ -774,8 +783,9 @@ shaka.cast.CastReceiver.prototype.sendMediaStatus_ =
774783 }
775784 } ;
776785
777- if ( opt_media )
786+ if ( opt_media ) {
778787 mediaStatus [ 'media' ] = opt_media ;
788+ }
779789
780790 let ret = {
781791 'requestId' : requestId ,
0 commit comments