OLD | NEW |
1 var captionsButtonElement; | 1 var captionsButtonElement; |
2 var captionsButtonCoordinates; | 2 var captionsButtonCoordinates; |
3 | 3 |
4 // As specified in mediaControls.css, this is how long it takes to fade out cont
rols | 4 // As specified in mediaControls.css, this is how long it takes to fade out cont
rols |
5 const controlsFadeOutDurationMs = 300; | 5 const controlsFadeOutDurationMs = 300; |
6 | 6 |
7 // The timeout for the hide-after-no-mouse-movement behavior. Defined (and | 7 // The timeout for the hide-after-no-mouse-movement behavior. Defined (and |
8 // should mirror) the value 'timeWithoutMouseMovementBeforeHidingMediaControls' | 8 // should mirror) the value 'timeWithoutMouseMovementBeforeHidingMediaControls' |
9 // in MediaControls.cpp. | 9 // in MediaControls.cpp. |
10 const controlsMouseMovementTimeoutMs = 3000; | 10 const controlsMouseMovementTimeoutMs = 3000; |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 throw "The media will end before the controls have been hidden"; | 173 throw "The media will end before the controls have been hidden"; |
174 | 174 |
175 setTimeout(func, hideTimeoutMs); | 175 setTimeout(func, hideTimeoutMs); |
176 } | 176 } |
177 | 177 |
178 function hasFullscreenButton(element) | 178 function hasFullscreenButton(element) |
179 { | 179 { |
180 var size = mediaControlsButtonDimensions(element, "fullscreen-button"); | 180 var size = mediaControlsButtonDimensions(element, "fullscreen-button"); |
181 return size[0] > 0 && size[1] > 0; | 181 return size[0] > 0 && size[1] > 0; |
182 } | 182 } |
| 183 |
| 184 function isControlsPanelVisible(element) |
| 185 { |
| 186 return getComputedStyle(mediaControlsButton(element, "panel")).opacity == "1
"; |
| 187 } |
OLD | NEW |