Skip to content
This repository has been archived by the owner on Jul 25, 2019. It is now read-only.

Fix deprecation notices #22

Merged
merged 1 commit into from Oct 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 8 additions & 5 deletions dist/videojs.ga.videocloud.js
@@ -1,13 +1,16 @@
/*
* videojs-ga-videocloud - v0.4.2 - 2016-08-24
* videojs-ga-videocloud - v0.4.2 - 2018-10-07
* Based on videojs-ga 0.4.2
* Copyright (c) 2016 Michael Bensoussan
* Copyright (c) 2018 Michael Bensoussan
* Licensed MIT
*/
(function() {
var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
var registerPlugin,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

videojs.plugin('ga', function(options) {
registerPlugin = videojs.registerPlugin || videojs.plugin;

registerPlugin('ga', function(options) {
var adStateRegex, currentVideo, dataSetupOptions, defaultLabel, defaultsEventsToTrack, end, endTracked, error, eventCategory, eventLabel, eventNames, eventsToTrack, fullscreen, getEventName, isInAdState, loaded, parsedOptions, pause, percentsAlreadyTracked, percentsPlayedInterval, play, player, referrer, resize, seekEnd, seekStart, seeking, sendbeacon, sendbeaconOverride, start, startTracked, timeupdate, tracker, trackerName, volumeChange,
_this = this;
if (options == null) {
Expand All @@ -21,7 +24,7 @@
}
player = this;
dataSetupOptions = {};
if (this.options()["data-setup"]) {
if (this.options_["data-setup"]) {
parsedOptions = JSON.parse(this.options()["data-setup"]);
if (parsedOptions.ga) {
dataSetupOptions = parsedOptions.ga;
Expand Down
6 changes: 3 additions & 3 deletions dist/videojs.ga.videocloud.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/videojs.ga.coffee
Expand Up @@ -6,7 +6,9 @@
# Licensed under the MIT license.
##

videojs.plugin 'ga', (options = {}) ->
registerPlugin = videojs.registerPlugin || videojs.plugin;

registerPlugin 'ga', (options = {}) ->

referrer = document.createElement('a')
referrer.href = document.referrer
Expand All @@ -18,7 +20,7 @@ videojs.plugin 'ga', (options = {}) ->

# this loads options from the data-setup attribute of the video tag
dataSetupOptions = {}
if @options()["data-setup"]
if @options_["data-setup"]
parsedOptions = JSON.parse(@options()["data-setup"])
dataSetupOptions = parsedOptions.ga if parsedOptions.ga

Expand Down