File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
142
142
this . hideSettingsMenusTimer_ . tickAfter (
143
143
/* seconds= */ this . config_ . closeMenusDelay ) ;
144
144
145
- this . dispatchEvent ( new shaka . util . FakeEvent ( 'hidingui' ) ) ;
145
+ this . dispatchVisibilityEvent_ ( ) ;
146
146
} ) ;
147
147
148
148
/**
@@ -1591,7 +1591,7 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
1591
1591
this . updateTimeAndSeekRange_ ( ) ;
1592
1592
this . computeOpacity ( ) ;
1593
1593
1594
- this . dispatchEvent ( new shaka . util . FakeEvent ( 'showingui' ) ) ;
1594
+ this . dispatchVisibilityEvent_ ( ) ;
1595
1595
}
1596
1596
1597
1597
// Hide the cursor when the mouse stops moving.
@@ -1740,6 +1740,7 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
1740
1740
} else {
1741
1741
this . controlsContainer_ . removeAttribute ( 'casting' ) ;
1742
1742
}
1743
+ this . dispatchVisibilityEvent_ ( ) ;
1743
1744
}
1744
1745
1745
1746
/** @private */
@@ -1885,6 +1886,17 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
1885
1886
this . controlsContainer_ . getAttribute ( 'casting' ) != null ;
1886
1887
}
1887
1888
1889
+ /**
1890
+ * @private
1891
+ */
1892
+ dispatchVisibilityEvent_ ( ) {
1893
+ if ( this . isOpaque ( ) ) {
1894
+ this . dispatchEvent ( new shaka . util . FakeEvent ( 'showingui' ) ) ;
1895
+ } else {
1896
+ this . dispatchEvent ( new shaka . util . FakeEvent ( 'hidingui' ) ) ;
1897
+ }
1898
+ }
1899
+
1888
1900
/**
1889
1901
* Update the video's current time based on the keyboard operations.
1890
1902
*
You can’t perform that action at this time.
0 commit comments