(global)
| 581 | * @visibleForTesting |
| 582 | */ |
| 583 | export function onOverlayButtonInteract(global) { |
| 584 | const {'overlayButton': overlayButton, 'video': video} = elements; |
| 585 | if (playbackStarted) { |
| 586 | // Resart the video |
| 587 | playVideo(); |
| 588 | } else { |
| 589 | // Play the video for the first time |
| 590 | playbackStarted = true; |
| 591 | uiTicker = setInterval(uiTickerClick, 500); |
| 592 | setInterval(playerDataTick, 1000); |
| 593 | if (adDisplayContainer) { |
| 594 | adDisplayContainer.initialize(); |
| 595 | } |
| 596 | video.load(); |
| 597 | playAds(global); |
| 598 | } |
| 599 | |
| 600 | toggle(overlayButton, false); |
| 601 | } |
| 602 | |
| 603 | // TODO(alanorozco): Update name on test's end. |
| 604 | export const onBigPlayClick = onOverlayButtonInteract; |
no test coverage detected