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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 function hasFullscreenButton(element) | 205 function hasFullscreenButton(element) |
206 { | 206 { |
207 var size = mediaControlsButtonDimensions(element, "fullscreen-button"); | 207 var size = mediaControlsButtonDimensions(element, "fullscreen-button"); |
208 return size[0] > 0 && size[1] > 0; | 208 return size[0] > 0 && size[1] > 0; |
209 } | 209 } |
210 | 210 |
211 function isControlsPanelVisible(element) | 211 function isControlsPanelVisible(element) |
212 { | 212 { |
213 return getComputedStyle(mediaControlsButton(element, "panel")).opacity == "1
"; | 213 return getComputedStyle(mediaControlsButton(element, "panel")).opacity == "1
"; |
214 } | 214 } |
| 215 |
| 216 function isVisible(button) { |
| 217 var computedStyle = getComputedStyle(button); |
| 218 return computedStyle.display !== "none" && |
| 219 computedStyle.visibility === "visible"; |
| 220 } |
OLD | NEW |