Skip to content

Commit

Permalink
✅ ♻️ <amp-ima-video> test is not an AMP element test (ampproject#34230
Browse files Browse the repository at this point in the history
)

The existing file `test-amp-ima-video.js` is a misnomer since it does not actually test the `<amp-ima-video>` element, only what it loads inside the frame.

Accordingly, rename `test-amp-ima-video.js` as `test-ima-video-internal.js`. Also remove stubs specific to the AMP runtime, since it doesn't run inside the iframe.
  • Loading branch information
alanorozco authored and rochapablo committed Aug 30, 2021
1 parent ead104a commit 05392f2
Show file tree
Hide file tree
Showing 3 changed files with 1,498 additions and 1,549 deletions.
6 changes: 3 additions & 3 deletions ads/google/ima/ima-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ export function zeroPad(input) {
function onProgressClick(event) {
// Call this logic once to make sure we still seek if the user just clicks
// instead of clicking and dragging.
clearInterval(hideControlsTimeout);
clearTimeout(hideControlsTimeout);
onProgressMove(event);
event.preventDefault();
event.stopPropagation();
Expand Down Expand Up @@ -1203,7 +1203,7 @@ export function pauseVideo(event = null) {
} else {
videoPlayer.pause();
// Show controls and keep them there because we're paused.
clearInterval(hideControlsTimeout);
clearTimeout(hideControlsTimeout);
showControls();
if (event && event.type == 'webkitendfullscreen') {
// Video was paused because we exited fullscreen.
Expand Down Expand Up @@ -1435,7 +1435,7 @@ export function showControls(opt_adsForce) {
if (playerState == PlayerStates.PLAYING) {
// Reset hide controls timer.
// Be sure to keep the timer greater than showControlsThrottled.
clearInterval(hideControlsTimeout);
clearTimeout(hideControlsTimeout);
hideControlsTimeout = setTimeout(hideControls, 3000);
}
}
Expand Down
Loading

0 comments on commit 05392f2

Please sign in to comment.