Updated pause and resume content methods within Ads class.
This commit is contained in:
parent
d87ada4f58
commit
8af312fe3c
@ -284,7 +284,7 @@ class Ads {
|
|||||||
// for example display a pause button and remaining time. Fired when content should
|
// for example display a pause button and remaining time. Fired when content should
|
||||||
// be paused. This usually happens right before an ad is about to cover the content.
|
// be paused. This usually happens right before an ad is about to cover the content.
|
||||||
this.handleEventListeners('CONTENT_PAUSE_REQUESTED');
|
this.handleEventListeners('CONTENT_PAUSE_REQUESTED');
|
||||||
this.pause();
|
this.pauseContent();
|
||||||
break;
|
break;
|
||||||
case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:
|
case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:
|
||||||
// This event indicates the ad has finished - the video player can perform
|
// This event indicates the ad has finished - the video player can perform
|
||||||
@ -292,7 +292,7 @@ class Ads {
|
|||||||
// Fired when content should be resumed. This usually happens when an ad finishes
|
// Fired when content should be resumed. This usually happens when an ad finishes
|
||||||
// or collapses.
|
// or collapses.
|
||||||
this.handleEventListeners('CONTENT_RESUME_REQUESTED');
|
this.handleEventListeners('CONTENT_RESUME_REQUESTED');
|
||||||
this.resume();
|
this.resumeContent();
|
||||||
break;
|
break;
|
||||||
case google.ima.AdEvent.Type.LOADED:
|
case google.ima.AdEvent.Type.LOADED:
|
||||||
// This is the first event sent for an ad - it is possible to determine whether the
|
// This is the first event sent for an ad - it is possible to determine whether the
|
||||||
@ -395,7 +395,7 @@ class Ads {
|
|||||||
/**
|
/**
|
||||||
* Resume our video.
|
* Resume our video.
|
||||||
*/
|
*/
|
||||||
resume() {
|
resumeContent() {
|
||||||
this.player.debug.log('Resume video.');
|
this.player.debug.log('Resume video.');
|
||||||
|
|
||||||
// Hide our ad container.
|
// Hide our ad container.
|
||||||
@ -413,7 +413,7 @@ class Ads {
|
|||||||
/**
|
/**
|
||||||
* Pause our video.
|
* Pause our video.
|
||||||
*/
|
*/
|
||||||
pause() {
|
pauseContent() {
|
||||||
this.player.debug.log('Pause video.');
|
this.player.debug.log('Pause video.');
|
||||||
|
|
||||||
// Show our ad container.
|
// Show our ad container.
|
||||||
@ -436,7 +436,7 @@ class Ads {
|
|||||||
this.player.debug.warn('Ad cancelled.');
|
this.player.debug.warn('Ad cancelled.');
|
||||||
|
|
||||||
// Pause our video.
|
// Pause our video.
|
||||||
this.resume();
|
this.resumeContent();
|
||||||
|
|
||||||
// Tell our instance that we're done for now.
|
// Tell our instance that we're done for now.
|
||||||
this.handleEventListeners('ERROR');
|
this.handleEventListeners('ERROR');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user