aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plugins/ads.js
diff options
context:
space:
mode:
authorSam Potts <me@sampotts.me>2018-01-14 23:33:18 +1100
committerSam Potts <me@sampotts.me>2018-01-14 23:33:18 +1100
commit8064405dbc44e24a5547aa79dbd7968926ec62a1 (patch)
treef550af0176f33e036ced5e64a8eb1dfaa45708c7 /src/js/plugins/ads.js
parent22e8892993b995f50c15d49558081e1271ac6bca (diff)
downloadplyr-8064405dbc44e24a5547aa79dbd7968926ec62a1.tar.lz
plyr-8064405dbc44e24a5547aa79dbd7968926ec62a1.tar.xz
plyr-8064405dbc44e24a5547aa79dbd7968926ec62a1.zip
Tweaks
Diffstat (limited to 'src/js/plugins/ads.js')
-rw-r--r--src/js/plugins/ads.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/js/plugins/ads.js b/src/js/plugins/ads.js
index 3ee45b38..06b4eee5 100644
--- a/src/js/plugins/ads.js
+++ b/src/js/plugins/ads.js
@@ -113,12 +113,12 @@ export default class Ads {
this.adsManager.addEventListener(window.google.ima.AdEvent.Type.COMPLETE, event => this.onAdEvent(event));
}
- onAdEvent(adEvent) {
+ onAdEvent(event) {
const { container } = this.player.elements;
// Retrieve the ad from the event. Some events (e.g. ALL_ADS_COMPLETED)
// don't have ad object associated.
- const ad = adEvent.getAd();
+ const ad = event.getAd();
// Set the currently played ad. This information could be used by callback
// events.
@@ -126,7 +126,7 @@ export default class Ads {
// let intervalTimer;
- switch (adEvent.type) {
+ switch (event.type) {
case window.google.ima.AdEvent.Type.LOADED:
// This is the first event sent for an ad - it is possible to
// determine whether the ad is a video ad or an overlay.
@@ -311,8 +311,8 @@ export default class Ads {
/**
* Set start event listener on a DOM element and triggers the
* callback when clicked.
- * @param {HtmlElment} element - The element on which to set the listener
- * @param {Function} callback - The callback which will be invoked once triggered.
+ * @param {element} element - The element on which to set the listener
+ * @param {function} callback - The callback which will be invoked once triggered.
*/
setOnClickHandler(element, callback) {