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

Commit

Permalink
Merge pull request #22 from mister-ben/fix-deprecation
Browse files Browse the repository at this point in the history
Fix deprecation notices
  • Loading branch information
mister-ben committed Oct 7, 2018
2 parents 331089a + 1b7feae commit d62d09d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
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

0 comments on commit d62d09d

Please sign in to comment.