File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1638,11 +1638,13 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
1638
1638
1639
1639
/** @private */
1640
1640
onPlayPauseClick_ ( ) {
1641
- if ( this . ad_ && this . ad_ . isLinear ( ) ) {
1641
+ if ( this . ad_ ) {
1642
1642
this . playPauseAd ( ) ;
1643
- } else {
1644
- this . playPausePresentation ( ) ;
1643
+ if ( this . ad_ . isLinear ( ) ) {
1644
+ return ;
1645
+ }
1645
1646
}
1647
+ this . playPausePresentation ( ) ;
1646
1648
}
1647
1649
1648
1650
/** @private */
Original file line number Diff line number Diff line change @@ -77,11 +77,13 @@ shaka.ui.PlayButton = class extends shaka.ui.Element {
77
77
} ) ;
78
78
79
79
this . eventManager . listen ( this . button , 'click' , ( ) => {
80
- if ( this . ad && this . ad . isLinear ( ) ) {
80
+ if ( this . ad ) {
81
81
this . controls . playPauseAd ( ) ;
82
- } else {
83
- this . controls . playPausePresentation ( ) ;
82
+ if ( this . ad . isLinear ( ) ) {
83
+ return ;
84
+ }
84
85
}
86
+ this . controls . playPausePresentation ( ) ;
85
87
} ) ;
86
88
87
89
if ( this . ad ) {
You can’t perform that action at this time.
0 commit comments