Repository: vimeo/player.js (javascript)

Issue:
Request: Get Chapters from Player
There's support for TextTracks. Could we get support for getting Chapters from this? Or is this planned for the future? https://developer.vimeo.com/api/upload/texttracks



Discussion:
The old way is you put them in the description and parse them for navigation. There is now a "getCuepoints" api. I assuming these are for chapters, is there an example video for that ?
I have a video with chapter markers. That displays in non pro mode in the embedded player controlbar. But to obtain this data to include in a custom controlbar shows up as empty data. Is this the correct api method ?

```
this.vimeoPlayer.getCuePoints().then(function(cuePoints) {
                  console.log("cues", cuePoints);
                }).catch(function(error) {
                     console.log("cues", error);
                  switch (error.name) {

                      case 'UnsupportedError':
                          // Cue points aren't supported by the current player or browser
                          break;

                      default:
                          // Some other error occurred
                          break;
                  }
                });
```
Official Chapters were released a few months ago: https://vimeo.com/blog/post/easy-navigation-for-your-videos-with-chapters/ 

I've looked through all of their API and player.js and there's no way to get this chapter information out of a video.
Thanks for your feedback everyone! We have this item on the roadmap and expect to add support for Chatper data in the near future. I will ensure this thread is updated when that happens.
OK what is the getCuePoints method then ? Is this chapter data available in the api endpoint ?

The old way Ive been parsing chapter markers. Is within the description. 
@danrossi , the `getCuePoints()` method returns `cuePoints` added using out `addCuePoint()` method. https://developer.vimeo.com/player/sdk/reference#add-a-cue-point-to-a-video

As @fisherinnovation said, a `getChapters()` method is something we've been planning to add to our Player SDK. ever since we released Chapters. I'm working on it now and it should be available in a few days. I'll update this thread when it's in production!

Patch:
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -167,6 +167,8 @@ it will also import the Player constructor directly:
     + [getAutopause](#getautopause-promiseboolean-unsupportederrorerror)
     + [setAutopause](#setautopauseautopause-boolean-promiseboolean-unsupportederrorerror)
     + [getBuffered](#getbuffered-promisearray-error)
+    + [getChapters](#getchapters-promisearray-error)
+    + [getCurrentChapter](#getcurrentchapter-promiseobject-error)
     + [getColor](#getcolor-promisestring-error)
     + [setColor](#setcolorcolor-string-promisestring-contrasterrortypeerrorerror)
     + [addCuePoint](#addcuepointtime-number-data-object-promisestring-unsupportederrorrangeerrorerror)
@@ -205,6 +207,7 @@ it will also import the Player constructor directly:
     + [seeking](#seeking)
     + [seeked](#seeked)
     + [texttrackchange](#texttrackchange)
+    + [chapterchange](#chapterchange)
     + [cuechange](#cuechange)
     + [cuepoint](#cuepoint)
     + [volumechange](#volumechange)
@@ -589,6 +592,39 @@ player.getBuffered().then(function(buffered) {
 });
 ```
 
+### getChapters(): Promise&lt;array, Error&gt;
+
+Get an array of the chapters that are on the video.
+
+```js
+player.getChapters().then(function(chapters) {
+    // chapters = an array of chapters objects
+}).catch(function(error) {
+    // an error occurred
+});
+```
+Each chapters object looks like this:
+
+```js
+{
+    "startTime": 15,
+    "title": "Chapter Title",
+    "index": 1
+}
+```
+
+### getCurrentChapter(): Promise&lt;object, Error&gt;
+
+Get the current chapter. A chapter is "current" when the `currentTime` of the video is equal to or after its `startTime` and before the `startTime` of the next chapter or the end of the video.
+
+```js
+player.getCurrentChapter().then(function(chapter) {
+    // chapter = a chapter object
+}).catch(function(error) {
+    // an error occurred
+});
+```
+
 ### getColor(): Promise&lt;string, Error&gt;
 
 Get the color for this player.
@@ -1211,6 +1247,20 @@ will be null if text tracks are turned off.
 }
 ```
 
+### chapterchange
+
+Triggered when the current chapter changes.
+
+```js
+{
+    startTime: 15,
+    title: "Chapter 1",
+    index: 1
+}
+```
+
+The `index` property of each chapter is the place it holds in the order of all the chapters. It starts at 1.
+
 ### cuechange
 
 Triggered when the active cue for the current text track changes. It also fires
diff --git a/dist/player.es.js b/dist/player.es.js
--- a/dist/player.es.js
+++ b/dist/player.es.js
@@ -1594,6 +1594,51 @@ function () {
     value: function getBuffered() {
       return this.get('buffered');
     }
+    /**
+     * A representation of a chapter.
+     *
+     * @typedef {Object} VimeoChapter
+     * @property {number} startTime The start time of the chapter.
+     * @property {object} title The title of the chapter.
+     * @property {number} index The place in the order of Chapters. Starts at 1.
+     */
+
+    /**
+     * A promise to get chapters for the video.
+     *
+     * @promise GetChaptersPromise
+     * @fulfill {VimeoChapter[]} The chapters for the video.
+     */
+
+    /**
+     * Get an array of all the chapters for the video.
+     *
+     * @return {GetChaptersPromise}
+     */
+
+  }, {
+    key: "getChapters",
+    value: function getChapters() {
+      return this.get('chapters');
+    }
+    /**
+     * A promise to get the currently active chapter.
+     *
+     * @promise GetCurrentChaptersPromise
+     * @fulfill {VimeoChapter|undefined} The current chapter for the video.
+     */
+
+    /**
+     * Get the currently active chapter for the video.
+     *
+     * @return {GetCurrentChaptersPromise}
+     */
+
+  }, {
+    key: "getCurrentChapter",
+    value: function getCurrentChapter() {
+      return this.get('currentChapter');
+    }
     /**
      * A promise to get the color of the player.
      *
diff --git a/dist/player.js b/dist/player.js
--- a/dist/player.js
+++ b/dist/player.js
@@ -1600,6 +1600,51 @@
       value: function getBuffered() {
         return this.get('buffered');
       }
+      /**
+       * A representation of a chapter.
+       *
+       * @typedef {Object} VimeoChapter
+       * @property {number} startTime The start time of the chapter.
+       * @property {object} title The title of the chapter.
+       * @property {number} index The place in the order of Chapters. Starts at 1.
+       */
+
+      /**
+       * A promise to get chapters for the video.
+       *
+       * @promise GetChaptersPromise
+       * @fulfill {VimeoChapter[]} The chapters for the video.
+       */
+
+      /**
+       * Get an array of all the chapters for the video.
+       *
+       * @return {GetChaptersPromise}
+       */
+
+    }, {
+      key: "getChapters",
+      value: function getChapters() {
+        return this.get('chapters');
+      }
+      /**
+       * A promise to get the currently active chapter.
+       *
+       * @promise GetCurrentChaptersPromise
+       * @fulfill {VimeoChapter|undefined} The current chapter for the video.
+       */
+
+      /**
+       * Get the currently active chapter for the video.
+       *
+       * @return {GetCurrentChaptersPromise}
+       */
+
+    }, {
+      key: "getCurrentChapter",
+      value: function getCurrentChapter() {
+        return this.get('currentChapter');
+      }
       /**
        * A promise to get the color of the player.
        *
diff --git a/dist/player.js.map b/dist/player.js.map
--- a/dist/player.js.map
+++ b/dist/player.js.map
@@ -1 +1 @@
-{"version":3,"file":"player.js","sources":["src/lib/functions.js","src/lib/compatibility-check.js","node_modules/weakmap-polyfill/weakmap-polyfill.js","node_modules/native-promise-only/lib/npo.src.js","src/lib/callbacks.js","src/lib/embed.js","src/lib/postmessage.js","src/player.js"],"sourcesContent":["/**\n * @module lib/functions\n */\n\n/**\n * Check to see this is a node environment.\n * @type {Boolean}\n */\n/* global global */\nexport const isNode = typeof global !== 'undefined' &&\n  ({}).toString.call(global) === '[object global]';\n\n/**\n * Get the name of the method for a given getter or setter.\n *\n * @param {string} prop The name of the property.\n * @param {string} type Either “get” or “set”.\n * @return {string}\n */\nexport function getMethodName(prop, type) {\n    if (prop.indexOf(type.toLowerCase()) === 0) {\n        return prop;\n    }\n\n    return `${type.toLowerCase()}${prop.substr(0, 1).toUpperCase()}${prop.substr(1)}`;\n}\n\n/**\n * Check to see if the object is a DOM Element.\n *\n * @param {*} element The object to check.\n * @return {boolean}\n */\nexport function isDomElement(element) {\n    return Boolean(\n        element && element.nodeType === 1 && 'nodeName' in element &&\n        element.ownerDocument && element.ownerDocument.defaultView\n    );\n}\n\n/**\n * Check to see whether the value is a number.\n *\n * @see http://dl.dropboxusercontent.com/u/35146/js/tests/isNumber.html\n * @param {*} value The value to check.\n * @param {boolean} integer Check if the value is an integer.\n * @return {boolean}\n */\nexport function isInteger(value) {\n    // eslint-disable-next-line eqeqeq\n    return !isNaN(parseFloat(value)) && isFinite(value) && Math.floor(value) == value;\n}\n\n/**\n * Check to see if the URL is a Vimeo url.\n *\n * @param {string} url The url string.\n * @return {boolean}\n */\nexport function isVimeoUrl(url) {\n    return (/^(https?:)?\\/\\/((player|www)\\.)?vimeo\\.com(?=$|\\/)/).test(url);\n}\n\n/**\n * Get the Vimeo URL from an element.\n * The element must have either a data-vimeo-id or data-vimeo-url attribute.\n *\n * @param {object} oEmbedParameters The oEmbed parameters.\n * @return {string}\n */\nexport function getVimeoUrl(oEmbedParameters = {}) {\n    const id = oEmbedParameters.id;\n    const url = oEmbedParameters.url;\n    const idOrUrl = id || url;\n\n    if (!idOrUrl) {\n        throw new Error('An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.');\n    }\n\n    if (isInteger(idOrUrl)) {\n        return `https://vimeo.com/${idOrUrl}`;\n    }\n\n    if (isVimeoUrl(idOrUrl)) {\n        return idOrUrl.replace('http:', 'https:');\n    }\n\n    if (id) {\n        throw new TypeError(`“${id}” is not a valid video id.`);\n    }\n\n    throw new TypeError(`“${idOrUrl}” is not a vimeo.com url.`);\n}\n","import { isNode } from './functions';\n\nconst arrayIndexOfSupport = typeof Array.prototype.indexOf !== 'undefined';\nconst postMessageSupport = typeof window !== 'undefined' && typeof window.postMessage !== 'undefined';\n\nif (!isNode && (!arrayIndexOfSupport || !postMessageSupport)) {\n    throw new Error('Sorry, the Vimeo Player API is not available in this browser.');\n}\n","/*!\n * weakmap-polyfill v2.0.1 - ECMAScript6 WeakMap polyfill\n * https://github.com/polygonplanet/weakmap-polyfill\n * Copyright (c) 2015-2020 Polygon Planet <polygon.planet.aqua@gmail.com>\n * @license MIT\n */\n\n(function(self) {\n  'use strict';\n\n  if (self.WeakMap) {\n    return;\n  }\n\n  var hasOwnProperty = Object.prototype.hasOwnProperty;\n  var defineProperty = function(object, name, value) {\n    if (Object.defineProperty) {\n      Object.defineProperty(object, name, {\n        configurable: true,\n        writable: true,\n        value: value\n      });\n    } else {\n      object[name] = value;\n    }\n  };\n\n  self.WeakMap = (function() {\n\n    // ECMA-262 23.3 WeakMap Objects\n    function WeakMap() {\n      if (this === void 0) {\n        throw new TypeError(\"Constructor WeakMap requires 'new'\");\n      }\n\n      defineProperty(this, '_id', genId('_WeakMap'));\n\n      // ECMA-262 23.3.1.1 WeakMap([iterable])\n      if (arguments.length > 0) {\n        // Currently, WeakMap `iterable` argument is not supported\n        throw new TypeError('WeakMap iterable is not supported');\n      }\n    }\n\n    // ECMA-262 23.3.3.2 WeakMap.prototype.delete(key)\n    defineProperty(WeakMap.prototype, 'delete', function(key) {\n      checkInstance(this, 'delete');\n\n      if (!isObject(key)) {\n        return false;\n      }\n\n      var entry = key[this._id];\n      if (entry && entry[0] === key) {\n        delete key[this._id];\n        return true;\n      }\n\n      return false;\n    });\n\n    // ECMA-262 23.3.3.3 WeakMap.prototype.get(key)\n    defineProperty(WeakMap.prototype, 'get', function(key) {\n      checkInstance(this, 'get');\n\n      if (!isObject(key)) {\n        return void 0;\n      }\n\n      var entry = key[this._id];\n      if (entry && entry[0] === key) {\n        return entry[1];\n      }\n\n      return void 0;\n    });\n\n    // ECMA-262 23.3.3.4 WeakMap.prototype.has(key)\n    defineProperty(WeakMap.prototype, 'has', function(key) {\n      checkInstance(this, 'has');\n\n      if (!isObject(key)) {\n        return false;\n      }\n\n      var entry = key[this._id];\n      if (entry && entry[0] === key) {\n        return true;\n      }\n\n      return false;\n    });\n\n    // ECMA-262 23.3.3.5 WeakMap.prototype.set(key, value)\n    defineProperty(WeakMap.prototype, 'set', function(key, value) {\n      checkInstance(this, 'set');\n\n      if (!isObject(key)) {\n        throw new TypeError('Invalid value used as weak map key');\n      }\n\n      var entry = key[this._id];\n      if (entry && entry[0] === key) {\n        entry[1] = value;\n        return this;\n      }\n\n      defineProperty(key, this._id, [key, value]);\n      return this;\n    });\n\n\n    function checkInstance(x, methodName) {\n      if (!isObject(x) || !hasOwnProperty.call(x, '_id')) {\n        throw new TypeError(\n          methodName + ' method called on incompatible receiver ' +\n          typeof x\n        );\n      }\n    }\n\n    function genId(prefix) {\n      return prefix + '_' + rand() + '.' + rand();\n    }\n\n    function rand() {\n      return Math.random().toString().substring(2);\n    }\n\n\n    defineProperty(WeakMap, '_polyfill', true);\n    return WeakMap;\n  })();\n\n\n  function isObject(x) {\n    return Object(x) === x;\n  }\n\n})(\n  typeof self !== 'undefined' ? self :\n  typeof window !== 'undefined' ? window :\n  typeof global !== 'undefined' ? global : this\n);\n","/*! Native Promise Only\n    v0.8.1 (c) Kyle Simpson\n    MIT License: http://getify.mit-license.org\n*/\n\n(function UMD(name,context,definition){\n\t// special form of UMD for polyfilling across evironments\n\tcontext[name] = context[name] || definition();\n\tif (typeof module != \"undefined\" && module.exports) { module.exports = context[name]; }\n\telse if (typeof define == \"function\" && define.amd) { define(function $AMD$(){ return context[name]; }); }\n})(\"Promise\",typeof global != \"undefined\" ? global : this,function DEF(){\n\t/*jshint validthis:true */\n\t\"use strict\";\n\n\tvar builtInProp, cycle, scheduling_queue,\n\t\tToString = Object.prototype.toString,\n\t\ttimer = (typeof setImmediate != \"undefined\") ?\n\t\t\tfunction timer(fn) { return setImmediate(fn); } :\n\t\t\tsetTimeout\n\t;\n\n\t// dammit, IE8.\n\ttry {\n\t\tObject.defineProperty({},\"x\",{});\n\t\tbuiltInProp = function builtInProp(obj,name,val,config) {\n\t\t\treturn Object.defineProperty(obj,name,{\n\t\t\t\tvalue: val,\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: config !== false\n\t\t\t});\n\t\t};\n\t}\n\tcatch (err) {\n\t\tbuiltInProp = function builtInProp(obj,name,val) {\n\t\t\tobj[name] = val;\n\t\t\treturn obj;\n\t\t};\n\t}\n\n\t// Note: using a queue instead of array for efficiency\n\tscheduling_queue = (function Queue() {\n\t\tvar first, last, item;\n\n\t\tfunction Item(fn,self) {\n\t\t\tthis.fn = fn;\n\t\t\tthis.self = self;\n\t\t\tthis.next = void 0;\n\t\t}\n\n\t\treturn {\n\t\t\tadd: function add(fn,self) {\n\t\t\t\titem = new Item(fn,self);\n\t\t\t\tif (last) {\n\t\t\t\t\tlast.next = item;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfirst = item;\n\t\t\t\t}\n\t\t\t\tlast = item;\n\t\t\t\titem = void 0;\n\t\t\t},\n\t\t\tdrain: function drain() {\n\t\t\t\tvar f = first;\n\t\t\t\tfirst = last = cycle = void 0;\n\n\t\t\t\twhile (f) {\n\t\t\t\t\tf.fn.call(f.self);\n\t\t\t\t\tf = f.next;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t})();\n\n\tfunction schedule(fn,self) {\n\t\tscheduling_queue.add(fn,self);\n\t\tif (!cycle) {\n\t\t\tcycle = timer(scheduling_queue.drain);\n\t\t}\n\t}\n\n\t// promise duck typing\n\tfunction isThenable(o) {\n\t\tvar _then, o_type = typeof o;\n\n\t\tif (o != null &&\n\t\t\t(\n\t\t\t\to_type == \"object\" || o_type == \"function\"\n\t\t\t)\n\t\t) {\n\t\t\t_then = o.then;\n\t\t}\n\t\treturn typeof _then == \"function\" ? _then : false;\n\t}\n\n\tfunction notify() {\n\t\tfor (var i=0; i<this.chain.length; i++) {\n\t\t\tnotifyIsolated(\n\t\t\t\tthis,\n\t\t\t\t(this.state === 1) ? this.chain[i].success : this.chain[i].failure,\n\t\t\t\tthis.chain[i]\n\t\t\t);\n\t\t}\n\t\tthis.chain.length = 0;\n\t}\n\n\t// NOTE: This is a separate function to isolate\n\t// the `try..catch` so that other code can be\n\t// optimized better\n\tfunction notifyIsolated(self,cb,chain) {\n\t\tvar ret, _then;\n\t\ttry {\n\t\t\tif (cb === false) {\n\t\t\t\tchain.reject(self.msg);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (cb === true) {\n\t\t\t\t\tret = self.msg;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tret = cb.call(void 0,self.msg);\n\t\t\t\t}\n\n\t\t\t\tif (ret === chain.promise) {\n\t\t\t\t\tchain.reject(TypeError(\"Promise-chain cycle\"));\n\t\t\t\t}\n\t\t\t\telse if (_then = isThenable(ret)) {\n\t\t\t\t\t_then.call(ret,chain.resolve,chain.reject);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tchain.resolve(ret);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (err) {\n\t\t\tchain.reject(err);\n\t\t}\n\t}\n\n\tfunction resolve(msg) {\n\t\tvar _then, self = this;\n\n\t\t// already triggered?\n\t\tif (self.triggered) { return; }\n\n\t\tself.triggered = true;\n\n\t\t// unwrap\n\t\tif (self.def) {\n\t\t\tself = self.def;\n\t\t}\n\n\t\ttry {\n\t\t\tif (_then = isThenable(msg)) {\n\t\t\t\tschedule(function(){\n\t\t\t\t\tvar def_wrapper = new MakeDefWrapper(self);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t_then.call(msg,\n\t\t\t\t\t\t\tfunction $resolve$(){ resolve.apply(def_wrapper,arguments); },\n\t\t\t\t\t\t\tfunction $reject$(){ reject.apply(def_wrapper,arguments); }\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (err) {\n\t\t\t\t\t\treject.call(def_wrapper,err);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\telse {\n\t\t\t\tself.msg = msg;\n\t\t\t\tself.state = 1;\n\t\t\t\tif (self.chain.length > 0) {\n\t\t\t\t\tschedule(notify,self);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (err) {\n\t\t\treject.call(new MakeDefWrapper(self),err);\n\t\t}\n\t}\n\n\tfunction reject(msg) {\n\t\tvar self = this;\n\n\t\t// already triggered?\n\t\tif (self.triggered) { return; }\n\n\t\tself.triggered = true;\n\n\t\t// unwrap\n\t\tif (self.def) {\n\t\t\tself = self.def;\n\t\t}\n\n\t\tself.msg = msg;\n\t\tself.state = 2;\n\t\tif (self.chain.length > 0) {\n\t\t\tschedule(notify,self);\n\t\t}\n\t}\n\n\tfunction iteratePromises(Constructor,arr,resolver,rejecter) {\n\t\tfor (var idx=0; idx<arr.length; idx++) {\n\t\t\t(function IIFE(idx){\n\t\t\t\tConstructor.resolve(arr[idx])\n\t\t\t\t.then(\n\t\t\t\t\tfunction $resolver$(msg){\n\t\t\t\t\t\tresolver(idx,msg);\n\t\t\t\t\t},\n\t\t\t\t\trejecter\n\t\t\t\t);\n\t\t\t})(idx);\n\t\t}\n\t}\n\n\tfunction MakeDefWrapper(self) {\n\t\tthis.def = self;\n\t\tthis.triggered = false;\n\t}\n\n\tfunction MakeDef(self) {\n\t\tthis.promise = self;\n\t\tthis.state = 0;\n\t\tthis.triggered = false;\n\t\tthis.chain = [];\n\t\tthis.msg = void 0;\n\t}\n\n\tfunction Promise(executor) {\n\t\tif (typeof executor != \"function\") {\n\t\t\tthrow TypeError(\"Not a function\");\n\t\t}\n\n\t\tif (this.__NPO__ !== 0) {\n\t\t\tthrow TypeError(\"Not a promise\");\n\t\t}\n\n\t\t// instance shadowing the inherited \"brand\"\n\t\t// to signal an already \"initialized\" promise\n\t\tthis.__NPO__ = 1;\n\n\t\tvar def = new MakeDef(this);\n\n\t\tthis[\"then\"] = function then(success,failure) {\n\t\t\tvar o = {\n\t\t\t\tsuccess: typeof success == \"function\" ? success : true,\n\t\t\t\tfailure: typeof failure == \"function\" ? failure : false\n\t\t\t};\n\t\t\t// Note: `then(..)` itself can be borrowed to be used against\n\t\t\t// a different promise constructor for making the chained promise,\n\t\t\t// by substituting a different `this` binding.\n\t\t\to.promise = new this.constructor(function extractChain(resolve,reject) {\n\t\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t\t}\n\n\t\t\t\to.resolve = resolve;\n\t\t\t\to.reject = reject;\n\t\t\t});\n\t\t\tdef.chain.push(o);\n\n\t\t\tif (def.state !== 0) {\n\t\t\t\tschedule(notify,def);\n\t\t\t}\n\n\t\t\treturn o.promise;\n\t\t};\n\t\tthis[\"catch\"] = function $catch$(failure) {\n\t\t\treturn this.then(void 0,failure);\n\t\t};\n\n\t\ttry {\n\t\t\texecutor.call(\n\t\t\t\tvoid 0,\n\t\t\t\tfunction publicResolve(msg){\n\t\t\t\t\tresolve.call(def,msg);\n\t\t\t\t},\n\t\t\t\tfunction publicReject(msg) {\n\t\t\t\t\treject.call(def,msg);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\tcatch (err) {\n\t\t\treject.call(def,err);\n\t\t}\n\t}\n\n\tvar PromisePrototype = builtInProp({},\"constructor\",Promise,\n\t\t/*configurable=*/false\n\t);\n\n\t// Note: Android 4 cannot use `Object.defineProperty(..)` here\n\tPromise.prototype = PromisePrototype;\n\n\t// built-in \"brand\" to signal an \"uninitialized\" promise\n\tbuiltInProp(PromisePrototype,\"__NPO__\",0,\n\t\t/*configurable=*/false\n\t);\n\n\tbuiltInProp(Promise,\"resolve\",function Promise$resolve(msg) {\n\t\tvar Constructor = this;\n\n\t\t// spec mandated checks\n\t\t// note: best \"isPromise\" check that's practical for now\n\t\tif (msg && typeof msg == \"object\" && msg.__NPO__ === 1) {\n\t\t\treturn msg;\n\t\t}\n\n\t\treturn new Constructor(function executor(resolve,reject){\n\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t}\n\n\t\t\tresolve(msg);\n\t\t});\n\t});\n\n\tbuiltInProp(Promise,\"reject\",function Promise$reject(msg) {\n\t\treturn new this(function executor(resolve,reject){\n\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t}\n\n\t\t\treject(msg);\n\t\t});\n\t});\n\n\tbuiltInProp(Promise,\"all\",function Promise$all(arr) {\n\t\tvar Constructor = this;\n\n\t\t// spec mandated checks\n\t\tif (ToString.call(arr) != \"[object Array]\") {\n\t\t\treturn Constructor.reject(TypeError(\"Not an array\"));\n\t\t}\n\t\tif (arr.length === 0) {\n\t\t\treturn Constructor.resolve([]);\n\t\t}\n\n\t\treturn new Constructor(function executor(resolve,reject){\n\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t}\n\n\t\t\tvar len = arr.length, msgs = Array(len), count = 0;\n\n\t\t\titeratePromises(Constructor,arr,function resolver(idx,msg) {\n\t\t\t\tmsgs[idx] = msg;\n\t\t\t\tif (++count === len) {\n\t\t\t\t\tresolve(msgs);\n\t\t\t\t}\n\t\t\t},reject);\n\t\t});\n\t});\n\n\tbuiltInProp(Promise,\"race\",function Promise$race(arr) {\n\t\tvar Constructor = this;\n\n\t\t// spec mandated checks\n\t\tif (ToString.call(arr) != \"[object Array]\") {\n\t\t\treturn Constructor.reject(TypeError(\"Not an array\"));\n\t\t}\n\n\t\treturn new Constructor(function executor(resolve,reject){\n\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t}\n\n\t\t\titeratePromises(Constructor,arr,function resolver(idx,msg){\n\t\t\t\tresolve(msg);\n\t\t\t},reject);\n\t\t});\n\t});\n\n\treturn Promise;\n});\n","/**\n * @module lib/callbacks\n */\n\nexport const callbackMap = new WeakMap();\n\n/**\n * Store a callback for a method or event for a player.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name.\n * @param {(function(this:Player, *): void|{resolve: function, reject: function})} callback\n *        The callback to call or an object with resolve and reject functions for a promise.\n * @return {void}\n */\nexport function storeCallback(player, name, callback) {\n    const playerCallbacks = callbackMap.get(player.element) || {};\n\n    if (!(name in playerCallbacks)) {\n        playerCallbacks[name] = [];\n    }\n\n    playerCallbacks[name].push(callback);\n    callbackMap.set(player.element, playerCallbacks);\n}\n\n/**\n * Get the callbacks for a player and event or method.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name\n * @return {function[]}\n */\nexport function getCallbacks(player, name) {\n    const playerCallbacks = callbackMap.get(player.element) || {};\n    return playerCallbacks[name] || [];\n}\n\n/**\n * Remove a stored callback for a method or event for a player.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name\n * @param {function} [callback] The specific callback to remove.\n * @return {boolean} Was this the last callback?\n */\nexport function removeCallback(player, name, callback) {\n    const playerCallbacks = callbackMap.get(player.element) || {};\n\n    if (!playerCallbacks[name]) {\n        return true;\n    }\n\n    // If no callback is passed, remove all callbacks for the event\n    if (!callback) {\n        playerCallbacks[name] = [];\n        callbackMap.set(player.element, playerCallbacks);\n\n        return true;\n    }\n\n    const index = playerCallbacks[name].indexOf(callback);\n\n    if (index !== -1) {\n        playerCallbacks[name].splice(index, 1);\n    }\n\n    callbackMap.set(player.element, playerCallbacks);\n    return playerCallbacks[name] && playerCallbacks[name].length === 0;\n}\n\n/**\n * Return the first stored callback for a player and event or method.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name.\n * @return {function} The callback, or false if there were none\n */\nexport function shiftCallbacks(player, name) {\n    const playerCallbacks = getCallbacks(player, name);\n\n    if (playerCallbacks.length < 1) {\n        return false;\n    }\n\n    const callback = playerCallbacks.shift();\n    removeCallback(player, name, callback);\n    return callback;\n}\n\n/**\n * Move callbacks associated with an element to another element.\n *\n * @param {HTMLElement} oldElement The old element.\n * @param {HTMLElement} newElement The new element.\n * @return {void}\n */\nexport function swapCallbacks(oldElement, newElement) {\n    const playerCallbacks = callbackMap.get(oldElement);\n\n    callbackMap.set(newElement, playerCallbacks);\n    callbackMap.delete(oldElement);\n}\n","/**\n * @module lib/embed\n */\n\nimport { isVimeoUrl, getVimeoUrl } from './functions';\n\nconst oEmbedParameters = [\n    'autopause',\n    'autoplay',\n    'background',\n    'byline',\n    'color',\n    'controls',\n    'dnt',\n    'height',\n    'id',\n    'loop',\n    'maxheight',\n    'maxwidth',\n    'muted',\n    'playsinline',\n    'portrait',\n    'responsive',\n    'speed',\n    'texttrack',\n    'title',\n    'transparent',\n    'url',\n    'width'\n];\n\n/**\n * Get the 'data-vimeo'-prefixed attributes from an element as an object.\n *\n * @param {HTMLElement} element The element.\n * @param {Object} [defaults={}] The default values to use.\n * @return {Object<string, string>}\n */\nexport function getOEmbedParameters(element, defaults = {}) {\n    return oEmbedParameters.reduce((params, param) => {\n        const value = element.getAttribute(`data-vimeo-${param}`);\n\n        if (value || value === '') {\n            params[param] = value === '' ? 1 : value;\n        }\n\n        return params;\n    }, defaults);\n}\n\n/**\n * Create an embed from oEmbed data inside an element.\n *\n * @param {object} data The oEmbed data.\n * @param {HTMLElement} element The element to put the iframe in.\n * @return {HTMLIFrameElement} The iframe embed.\n */\nexport function createEmbed({ html }, element) {\n    if (!element) {\n        throw new TypeError('An element must be provided');\n    }\n\n    if (element.getAttribute('data-vimeo-initialized') !== null) {\n        return element.querySelector('iframe');\n    }\n\n    const div = document.createElement('div');\n    div.innerHTML = html;\n\n    element.appendChild(div.firstChild);\n    element.setAttribute('data-vimeo-initialized', 'true');\n\n    return element.querySelector('iframe');\n}\n\n/**\n * Make an oEmbed call for the specified URL.\n *\n * @param {string} videoUrl The vimeo.com url for the video.\n * @param {Object} [params] Parameters to pass to oEmbed.\n * @param {HTMLElement} element The element.\n * @return {Promise}\n */\nexport function getOEmbedData(videoUrl, params = {}, element) {\n    return new Promise((resolve, reject) => {\n        if (!isVimeoUrl(videoUrl)) {\n            throw new TypeError(`“${videoUrl}” is not a vimeo.com url.`);\n        }\n\n        let url = `https://vimeo.com/api/oembed.json?url=${encodeURIComponent(videoUrl)}`;\n\n        for (const param in params) {\n            if (params.hasOwnProperty(param)) {\n                url += `&${param}=${encodeURIComponent(params[param])}`;\n            }\n        }\n\n        const xhr = 'XDomainRequest' in window ? new XDomainRequest() : new XMLHttpRequest();\n        xhr.open('GET', url, true);\n\n        xhr.onload = function() {\n            if (xhr.status === 404) {\n                reject(new Error(`“${videoUrl}” was not found.`));\n                return;\n            }\n\n            if (xhr.status === 403) {\n                reject(new Error(`“${videoUrl}” is not embeddable.`));\n                return;\n            }\n\n            try {\n                const json = JSON.parse(xhr.responseText);\n                // Check api response for 403 on oembed\n                if (json.domain_status_code === 403) {\n                    // We still want to create the embed to give users visual feedback\n                    createEmbed(json, element);\n                    reject(new Error(`“${videoUrl}” is not embeddable.`));\n                    return;\n                }\n\n                resolve(json);\n            }\n            catch (error) {\n                reject(error);\n            }\n        };\n\n        xhr.onerror = function() {\n            const status = xhr.status ? ` (${xhr.status})` : '';\n            reject(new Error(`There was an error fetching the embed code from Vimeo${status}.`));\n        };\n\n        xhr.send();\n    });\n}\n\n/**\n * Initialize all embeds within a specific element\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nexport function initializeEmbeds(parent = document) {\n    const elements = [].slice.call(parent.querySelectorAll('[data-vimeo-id], [data-vimeo-url]'));\n\n    const handleError = (error) => {\n        if ('console' in window && console.error) {\n            console.error(`There was an error creating an embed: ${error}`);\n        }\n    };\n\n    elements.forEach((element) => {\n        try {\n            // Skip any that have data-vimeo-defer\n            if (element.getAttribute('data-vimeo-defer') !== null) {\n                return;\n            }\n\n            const params = getOEmbedParameters(element);\n            const url = getVimeoUrl(params);\n\n            getOEmbedData(url, params, element).then((data) => {\n                return createEmbed(data, element);\n            }).catch(handleError);\n        }\n        catch (error) {\n            handleError(error);\n        }\n    });\n}\n\n/**\n * Resize embeds when messaged by the player.\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nexport function resizeEmbeds(parent = document) {\n    // Prevent execution if users include the player.js script multiple times.\n    if (window.VimeoPlayerResizeEmbeds_) {\n        return;\n    }\n    window.VimeoPlayerResizeEmbeds_ = true;\n\n    const onMessage = (event) => {\n        if (!isVimeoUrl(event.origin)) {\n            return;\n        }\n\n        // 'spacechange' is fired only on embeds with cards\n        if (!event.data || event.data.event !== 'spacechange') {\n            return;\n        }\n\n        const iframes = parent.querySelectorAll('iframe');\n\n        for (let i = 0; i < iframes.length; i++) {\n            if (iframes[i].contentWindow !== event.source) {\n                continue;\n            }\n\n            // Change padding-bottom of the enclosing div to accommodate\n            // card carousel without distorting aspect ratio\n            const space = iframes[i].parentElement;\n            space.style.paddingBottom = `${event.data.data[0].bottom}px`;\n\n            break;\n        }\n    };\n\n    window.addEventListener('message', onMessage);\n}\n","/**\n * @module lib/postmessage\n */\n\nimport { getCallbacks, removeCallback, shiftCallbacks } from './callbacks';\n\n/**\n * Parse a message received from postMessage.\n *\n * @param {*} data The data received from postMessage.\n * @return {object}\n */\nexport function parseMessageData(data) {\n    if (typeof data === 'string') {\n        try {\n            data = JSON.parse(data);\n        }\n        catch (error) {\n            // If the message cannot be parsed, throw the error as a warning\n            console.warn(error);\n            return {};\n        }\n    }\n\n    return data;\n}\n\n/**\n * Post a message to the specified target.\n *\n * @param {Player} player The player object to use.\n * @param {string} method The API method to call.\n * @param {object} params The parameters to send to the player.\n * @return {void}\n */\nexport function postMessage(player, method, params) {\n    if (!player.element.contentWindow || !player.element.contentWindow.postMessage) {\n        return;\n    }\n\n    let message = {\n        method\n    };\n\n    if (params !== undefined) {\n        message.value = params;\n    }\n\n    // IE 8 and 9 do not support passing messages, so stringify them\n    const ieVersion = parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\\d+).*$/, '$1'));\n    if (ieVersion >= 8 && ieVersion < 10) {\n        message = JSON.stringify(message);\n    }\n\n    player.element.contentWindow.postMessage(message, player.origin);\n}\n\n/**\n * Parse the data received from a message event.\n *\n * @param {Player} player The player that received the message.\n * @param {(Object|string)} data The message data. Strings will be parsed into JSON.\n * @return {void}\n */\nexport function processData(player, data) {\n    data = parseMessageData(data);\n    let callbacks = [];\n    let param;\n\n    if (data.event) {\n        if (data.event === 'error') {\n            const promises = getCallbacks(player, data.data.method);\n\n            promises.forEach((promise) => {\n                const error = new Error(data.data.message);\n                error.name = data.data.name;\n\n                promise.reject(error);\n                removeCallback(player, data.data.method, promise);\n            });\n        }\n\n        callbacks = getCallbacks(player, `event:${data.event}`);\n        param = data.data;\n    }\n    else if (data.method) {\n        const callback = shiftCallbacks(player, data.method);\n\n        if (callback) {\n            callbacks.push(callback);\n            param = data.value;\n        }\n    }\n\n    callbacks.forEach((callback) => {\n        try {\n            if (typeof callback === 'function') {\n                callback.call(player, param);\n                return;\n            }\n\n            callback.resolve(param);\n        }\n        catch (e) {\n            // empty\n        }\n    });\n}\n","import './lib/compatibility-check';\n\nimport 'weakmap-polyfill';\nimport Promise from 'native-promise-only';\n\nimport { storeCallback, getCallbacks, removeCallback, swapCallbacks } from './lib/callbacks';\nimport { getMethodName, isDomElement, isVimeoUrl, getVimeoUrl, isNode } from './lib/functions';\nimport { getOEmbedParameters, getOEmbedData, createEmbed, initializeEmbeds, resizeEmbeds } from './lib/embed';\nimport { parseMessageData, postMessage, processData } from './lib/postmessage';\n\nconst playerMap = new WeakMap();\nconst readyMap = new WeakMap();\n\nclass Player {\n    /**\n     * Create a Player.\n     *\n     * @param {(HTMLIFrameElement|HTMLElement|string|jQuery)} element A reference to the Vimeo\n     *        player iframe, and id, or a jQuery object.\n     * @param {object} [options] oEmbed parameters to use when creating an embed in the element.\n     * @return {Player}\n     */\n    constructor(element, options = {}) {\n        /* global jQuery */\n        if (window.jQuery && element instanceof jQuery) {\n            if (element.length > 1 && window.console && console.warn) {\n                console.warn('A jQuery object with multiple elements was passed, using the first element.');\n            }\n\n            element = element[0];\n        }\n\n        // Find an element by ID\n        if (typeof document !== 'undefined' && typeof element === 'string') {\n            element = document.getElementById(element);\n        }\n\n        // Not an element!\n        if (!isDomElement(element)) {\n            throw new TypeError('You must pass either a valid element or a valid id.');\n        }\n\n        // Already initialized an embed in this div, so grab the iframe\n        if (element.nodeName !== 'IFRAME') {\n            const iframe = element.querySelector('iframe');\n\n            if (iframe) {\n                element = iframe;\n            }\n        }\n\n        // iframe url is not a Vimeo url\n        if (element.nodeName === 'IFRAME' && !isVimeoUrl(element.getAttribute('src') || '')) {\n            throw new Error('The player element passed isn’t a Vimeo embed.');\n        }\n\n        // If there is already a player object in the map, return that\n        if (playerMap.has(element)) {\n            return playerMap.get(element);\n        }\n\n        this._window = element.ownerDocument.defaultView;\n        this.element = element;\n        this.origin = '*';\n\n        const readyPromise = new Promise((resolve, reject) => {\n            this._onMessage = (event) => {\n                if (!isVimeoUrl(event.origin) || this.element.contentWindow !== event.source) {\n                    return;\n                }\n\n                if (this.origin === '*') {\n                    this.origin = event.origin;\n                }\n\n                const data = parseMessageData(event.data);\n                const isError = data && data.event === 'error';\n                const isReadyError = isError && data.data && data.data.method === 'ready';\n\n                if (isReadyError) {\n                    const error = new Error(data.data.message);\n                    error.name = data.data.name;\n                    reject(error);\n                    return;\n                }\n\n                const isReadyEvent = data && data.event === 'ready';\n                const isPingResponse = data && data.method === 'ping';\n\n                if (isReadyEvent || isPingResponse) {\n                    this.element.setAttribute('data-ready', 'true');\n                    resolve();\n                    return;\n                }\n\n                processData(this, data);\n            };\n\n            this._window.addEventListener('message', this._onMessage);\n\n            if (this.element.nodeName !== 'IFRAME') {\n                const params = getOEmbedParameters(element, options);\n                const url = getVimeoUrl(params);\n\n                getOEmbedData(url, params, element).then((data) => {\n                    const iframe = createEmbed(data, element);\n                    // Overwrite element with the new iframe,\n                    // but store reference to the original element\n                    this.element = iframe;\n                    this._originalElement = element;\n\n                    swapCallbacks(element, iframe);\n                    playerMap.set(this.element, this);\n\n                    return data;\n                }).catch(reject);\n            }\n        });\n\n        // Store a copy of this Player in the map\n        readyMap.set(this, readyPromise);\n        playerMap.set(this.element, this);\n\n        // Send a ping to the iframe so the ready promise will be resolved if\n        // the player is already ready.\n        if (this.element.nodeName === 'IFRAME') {\n            postMessage(this, 'ping');\n        }\n\n        return this;\n    }\n\n    /**\n     * Get a promise for a method.\n     *\n     * @param {string} name The API method to call.\n     * @param {Object} [args={}] Arguments to send via postMessage.\n     * @return {Promise}\n     */\n    callMethod(name, args = {}) {\n        return new Promise((resolve, reject) => {\n            // We are storing the resolve/reject handlers to call later, so we\n            // can’t return here.\n            // eslint-disable-next-line promise/always-return\n            return this.ready().then(() => {\n                storeCallback(this, name, {\n                    resolve,\n                    reject\n                });\n\n                postMessage(this, name, args);\n            }).catch(reject);\n        });\n    }\n\n    /**\n     * Get a promise for the value of a player property.\n     *\n     * @param {string} name The property name\n     * @return {Promise}\n     */\n    get(name) {\n        return new Promise((resolve, reject) => {\n            name = getMethodName(name, 'get');\n\n            // We are storing the resolve/reject handlers to call later, so we\n            // can’t return here.\n            // eslint-disable-next-line promise/always-return\n            return this.ready().then(() => {\n                storeCallback(this, name, {\n                    resolve,\n                    reject\n                });\n\n                postMessage(this, name);\n            }).catch(reject);\n        });\n    }\n\n    /**\n     * Get a promise for setting the value of a player property.\n     *\n     * @param {string} name The API method to call.\n     * @param {mixed} value The value to set.\n     * @return {Promise}\n     */\n    set(name, value) {\n        return new Promise((resolve, reject) => {\n            name = getMethodName(name, 'set');\n\n            if (value === undefined || value === null) {\n                throw new TypeError('There must be a value to set.');\n            }\n\n            // We are storing the resolve/reject handlers to call later, so we\n            // can’t return here.\n            // eslint-disable-next-line promise/always-return\n            return this.ready().then(() => {\n                storeCallback(this, name, {\n                    resolve,\n                    reject\n                });\n\n                postMessage(this, name, value);\n            }).catch(reject);\n        });\n    }\n\n    /**\n     * Add an event listener for the specified event. Will call the\n     * callback with a single parameter, `data`, that contains the data for\n     * that event.\n     *\n     * @param {string} eventName The name of the event.\n     * @param {function(*)} callback The function to call when the event fires.\n     * @return {void}\n     */\n    on(eventName, callback) {\n        if (!eventName) {\n            throw new TypeError('You must pass an event name.');\n        }\n\n        if (!callback) {\n            throw new TypeError('You must pass a callback function.');\n        }\n\n        if (typeof callback !== 'function') {\n            throw new TypeError('The callback must be a function.');\n        }\n\n        const callbacks = getCallbacks(this, `event:${eventName}`);\n        if (callbacks.length === 0) {\n            this.callMethod('addEventListener', eventName).catch(() => {\n                // Ignore the error. There will be an error event fired that\n                // will trigger the error callback if they are listening.\n            });\n        }\n\n        storeCallback(this, `event:${eventName}`, callback);\n    }\n\n    /**\n     * Remove an event listener for the specified event. Will remove all\n     * listeners for that event if a `callback` isn’t passed, or only that\n     * specific callback if it is passed.\n     *\n     * @param {string} eventName The name of the event.\n     * @param {function} [callback] The specific callback to remove.\n     * @return {void}\n     */\n    off(eventName, callback) {\n        if (!eventName) {\n            throw new TypeError('You must pass an event name.');\n        }\n\n        if (callback && typeof callback !== 'function') {\n            throw new TypeError('The callback must be a function.');\n        }\n\n        const lastCallback = removeCallback(this, `event:${eventName}`, callback);\n\n        // If there are no callbacks left, remove the listener\n        if (lastCallback) {\n            this.callMethod('removeEventListener', eventName).catch((e) => {\n                // Ignore the error. There will be an error event fired that\n                // will trigger the error callback if they are listening.\n            });\n        }\n    }\n\n    /**\n     * A promise to load a new video.\n     *\n     * @promise LoadVideoPromise\n     * @fulfill {number} The video with this id successfully loaded.\n     * @reject {TypeError} The id was not a number.\n     */\n    /**\n     * Load a new video into this embed. The promise will be resolved if\n     * the video is successfully loaded, or it will be rejected if it could\n     * not be loaded.\n     *\n     * @param {number|object} options The id of the video or an object with embed options.\n     * @return {LoadVideoPromise}\n     */\n    loadVideo(options) {\n        return this.callMethod('loadVideo', options);\n    }\n\n    /**\n     * A promise to perform an action when the Player is ready.\n     *\n     * @todo document errors\n     * @promise LoadVideoPromise\n     * @fulfill {void}\n     */\n    /**\n     * Trigger a function when the player iframe has initialized. You do not\n     * need to wait for `ready` to trigger to begin adding event listeners\n     * or calling other methods.\n     *\n     * @return {ReadyPromise}\n     */\n    ready() {\n        const readyPromise = readyMap.get(this) || new Promise((resolve, reject) => {\n            reject(new Error('Unknown player. Probably unloaded.'));\n        });\n        return Promise.resolve(readyPromise);\n    }\n\n    /**\n     * A promise to add a cue point to the player.\n     *\n     * @promise AddCuePointPromise\n     * @fulfill {string} The id of the cue point to use for removeCuePoint.\n     * @reject {RangeError} the time was less than 0 or greater than the\n     *         video’s duration.\n     * @reject {UnsupportedError} Cue points are not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Add a cue point to the player.\n     *\n     * @param {number} time The time for the cue point.\n     * @param {object} [data] Arbitrary data to be returned with the cue point.\n     * @return {AddCuePointPromise}\n     */\n    addCuePoint(time, data = {}) {\n        return this.callMethod('addCuePoint', { time, data });\n    }\n\n    /**\n     * A promise to remove a cue point from the player.\n     *\n     * @promise AddCuePointPromise\n     * @fulfill {string} The id of the cue point that was removed.\n     * @reject {InvalidCuePoint} The cue point with the specified id was not\n     *         found.\n     * @reject {UnsupportedError} Cue points are not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Remove a cue point from the video.\n     *\n     * @param {string} id The id of the cue point to remove.\n     * @return {RemoveCuePointPromise}\n     */\n    removeCuePoint(id) {\n        return this.callMethod('removeCuePoint', id);\n    }\n\n    /**\n     * A representation of a text track on a video.\n     *\n     * @typedef {Object} VimeoTextTrack\n     * @property {string} language The ISO language code.\n     * @property {string} kind The kind of track it is (captions or subtitles).\n     * @property {string} label The human‐readable label for the track.\n     */\n    /**\n     * A promise to enable a text track.\n     *\n     * @promise EnableTextTrackPromise\n     * @fulfill {VimeoTextTrack} The text track that was enabled.\n     * @reject {InvalidTrackLanguageError} No track was available with the\n     *         specified language.\n     * @reject {InvalidTrackError} No track was available with the specified\n     *         language and kind.\n     */\n    /**\n     * Enable the text track with the specified language, and optionally the\n     * specified kind (captions or subtitles).\n     *\n     * When set via the API, the track language will not change the viewer’s\n     * stored preference.\n     *\n     * @param {string} language The two‐letter language code.\n     * @param {string} [kind] The kind of track to enable (captions or subtitles).\n     * @return {EnableTextTrackPromise}\n     */\n    enableTextTrack(language, kind) {\n        if (!language) {\n            throw new TypeError('You must pass a language.');\n        }\n\n        return this.callMethod('enableTextTrack', {\n            language,\n            kind\n        });\n    }\n\n    /**\n     * A promise to disable the active text track.\n     *\n     * @promise DisableTextTrackPromise\n     * @fulfill {void} The track was disabled.\n     */\n    /**\n     * Disable the currently-active text track.\n     *\n     * @return {DisableTextTrackPromise}\n     */\n    disableTextTrack() {\n        return this.callMethod('disableTextTrack');\n    }\n\n    /**\n     * A promise to pause the video.\n     *\n     * @promise PausePromise\n     * @fulfill {void} The video was paused.\n     */\n    /**\n     * Pause the video if it’s playing.\n     *\n     * @return {PausePromise}\n     */\n    pause() {\n        return this.callMethod('pause');\n    }\n\n    /**\n     * A promise to play the video.\n     *\n     * @promise PlayPromise\n     * @fulfill {void} The video was played.\n     */\n    /**\n     * Play the video if it’s paused. **Note:** on iOS and some other\n     * mobile devices, you cannot programmatically trigger play. Once the\n     * viewer has tapped on the play button in the player, however, you\n     * will be able to use this function.\n     *\n     * @return {PlayPromise}\n     */\n    play() {\n        return this.callMethod('play');\n    }\n\n    /**\n     * A promise to unload the video.\n     *\n     * @promise UnloadPromise\n     * @fulfill {void} The video was unloaded.\n     */\n    /**\n     * Return the player to its initial state.\n     *\n     * @return {UnloadPromise}\n     */\n    unload() {\n        return this.callMethod('unload');\n    }\n\n    /**\n     * Cleanup the player and remove it from the DOM\n     *\n     * It won't be usable and a new one should be constructed\n     *  in order to do any operations.\n     *\n     * @return {Promise}\n     */\n    destroy() {\n        return new Promise((resolve) => {\n            readyMap.delete(this);\n            playerMap.delete(this.element);\n\n            if (this._originalElement) {\n                playerMap.delete(this._originalElement);\n                this._originalElement.removeAttribute('data-vimeo-initialized');\n            }\n\n            if (this.element && this.element.nodeName === 'IFRAME' && this.element.parentNode) {\n                this.element.parentNode.removeChild(this.element);\n            }\n\n            this._window.removeEventListener('message', this._onMessage);\n\n            resolve();\n        });\n    }\n\n    /**\n     * A promise to get the autopause behavior of the video.\n     *\n     * @promise GetAutopausePromise\n     * @fulfill {boolean} Whether autopause is turned on or off.\n     * @reject {UnsupportedError} Autopause is not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Get the autopause behavior for this player.\n     *\n     * @return {GetAutopausePromise}\n     */\n    getAutopause() {\n        return this.get('autopause');\n    }\n\n    /**\n     * A promise to set the autopause behavior of the video.\n     *\n     * @promise SetAutopausePromise\n     * @fulfill {boolean} Whether autopause is turned on or off.\n     * @reject {UnsupportedError} Autopause is not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Enable or disable the autopause behavior of this player.\n     *\n     * By default, when another video is played in the same browser, this\n     * player will automatically pause. Unless you have a specific reason\n     * for doing so, we recommend that you leave autopause set to the\n     * default (`true`).\n     *\n     * @param {boolean} autopause\n     * @return {SetAutopausePromise}\n     */\n    setAutopause(autopause) {\n        return this.set('autopause', autopause);\n    }\n\n    /**\n     * A promise to get the buffered property of the video.\n     *\n     * @promise GetBufferedPromise\n     * @fulfill {Array} Buffered Timeranges converted to an Array.\n     */\n    /**\n     * Get the buffered property of the video.\n     *\n     * @return {GetBufferedPromise}\n     */\n    getBuffered() {\n        return this.get('buffered');\n    }\n\n    /**\n     * A promise to get the color of the player.\n     *\n     * @promise GetColorPromise\n     * @fulfill {string} The hex color of the player.\n     */\n    /**\n     * Get the color for this player.\n     *\n     * @return {GetColorPromise}\n     */\n    getColor() {\n        return this.get('color');\n    }\n\n    /**\n     * A promise to set the color of the player.\n     *\n     * @promise SetColorPromise\n     * @fulfill {string} The color was successfully set.\n     * @reject {TypeError} The string was not a valid hex or rgb color.\n     * @reject {ContrastError} The color was set, but the contrast is\n     *         outside of the acceptable range.\n     * @reject {EmbedSettingsError} The owner of the player has chosen to\n     *         use a specific color.\n     */\n    /**\n     * Set the color of this player to a hex or rgb string. Setting the\n     * color may fail if the owner of the video has set their embed\n     * preferences to force a specific color.\n     *\n     * @param {string} color The hex or rgb color string to set.\n     * @return {SetColorPromise}\n     */\n    setColor(color) {\n        return this.set('color', color);\n    }\n\n    /**\n     * A representation of a cue point.\n     *\n     * @typedef {Object} VimeoCuePoint\n     * @property {number} time The time of the cue point.\n     * @property {object} data The data passed when adding the cue point.\n     * @property {string} id The unique id for use with removeCuePoint.\n     */\n    /**\n     * A promise to get the cue points of a video.\n     *\n     * @promise GetCuePointsPromise\n     * @fulfill {VimeoCuePoint[]} The cue points added to the video.\n     * @reject {UnsupportedError} Cue points are not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Get an array of the cue points added to the video.\n     *\n     * @return {GetCuePointsPromise}\n     */\n    getCuePoints() {\n        return this.get('cuePoints');\n    }\n\n    /**\n     * A promise to get the current time of the video.\n     *\n     * @promise GetCurrentTimePromise\n     * @fulfill {number} The current time in seconds.\n     */\n    /**\n     * Get the current playback position in seconds.\n     *\n     * @return {GetCurrentTimePromise}\n     */\n    getCurrentTime() {\n        return this.get('currentTime');\n    }\n\n    /**\n     * A promise to set the current time of the video.\n     *\n     * @promise SetCurrentTimePromise\n     * @fulfill {number} The actual current time that was set.\n     * @reject {RangeError} the time was less than 0 or greater than the\n     *         video’s duration.\n     */\n    /**\n     * Set the current playback position in seconds. If the player was\n     * paused, it will remain paused. Likewise, if the player was playing,\n     * it will resume playing once the video has buffered.\n     *\n     * You can provide an accurate time and the player will attempt to seek\n     * to as close to that time as possible. The exact time will be the\n     * fulfilled value of the promise.\n     *\n     * @param {number} currentTime\n     * @return {SetCurrentTimePromise}\n     */\n    setCurrentTime(currentTime) {\n        return this.set('currentTime', currentTime);\n    }\n\n    /**\n     * A promise to get the duration of the video.\n     *\n     * @promise GetDurationPromise\n     * @fulfill {number} The duration in seconds.\n     */\n    /**\n     * Get the duration of the video in seconds. It will be rounded to the\n     * nearest second before playback begins, and to the nearest thousandth\n     * of a second after playback begins.\n     *\n     * @return {GetDurationPromise}\n     */\n    getDuration() {\n        return this.get('duration');\n    }\n\n    /**\n     * A promise to get the ended state of the video.\n     *\n     * @promise GetEndedPromise\n     * @fulfill {boolean} Whether or not the video has ended.\n     */\n    /**\n     * Get the ended state of the video. The video has ended if\n     * `currentTime === duration`.\n     *\n     * @return {GetEndedPromise}\n     */\n    getEnded() {\n        return this.get('ended');\n    }\n\n    /**\n     * A promise to get the loop state of the player.\n     *\n     * @promise GetLoopPromise\n     * @fulfill {boolean} Whether or not the player is set to loop.\n     */\n    /**\n     * Get the loop state of the player.\n     *\n     * @return {GetLoopPromise}\n     */\n    getLoop() {\n        return this.get('loop');\n    }\n\n    /**\n     * A promise to set the loop state of the player.\n     *\n     * @promise SetLoopPromise\n     * @fulfill {boolean} The loop state that was set.\n     */\n    /**\n     * Set the loop state of the player. When set to `true`, the player\n     * will start over immediately once playback ends.\n     *\n     * @param {boolean} loop\n     * @return {SetLoopPromise}\n     */\n    setLoop(loop) {\n        return this.set('loop', loop);\n    }\n\n\n    /**\n     * A promise to set the muted state of the player.\n     *\n     * @promise SetMutedPromise\n     * @fulfill {boolean} The muted state that was set.\n     */\n    /**\n     * Set the muted state of the player. When set to `true`, the player\n     * volume will be muted.\n     *\n     * @param {boolean} muted\n     * @return {SetMutedPromise}\n     */\n    setMuted(muted) {\n        return this.set('muted', muted);\n    }\n\n    /**\n     * A promise to get the muted state of the player.\n     *\n     * @promise GetMutedPromise\n     * @fulfill {boolean} Whether or not the player is muted.\n     */\n    /**\n     * Get the muted state of the player.\n     *\n     * @return {GetMutedPromise}\n     */\n    getMuted() {\n        return this.get('muted');\n    }\n\n    /**\n     * A promise to get the paused state of the player.\n     *\n     * @promise GetLoopPromise\n     * @fulfill {boolean} Whether or not the video is paused.\n     */\n    /**\n     * Get the paused state of the player.\n     *\n     * @return {GetLoopPromise}\n     */\n    getPaused() {\n        return this.get('paused');\n    }\n\n    /**\n     * A promise to get the playback rate of the player.\n     *\n     * @promise GetPlaybackRatePromise\n     * @fulfill {number} The playback rate of the player on a scale from 0.5 to 2.\n     */\n    /**\n     * Get the playback rate of the player on a scale from `0.5` to `2`.\n     *\n     * @return {GetPlaybackRatePromise}\n     */\n    getPlaybackRate() {\n        return this.get('playbackRate');\n    }\n\n    /**\n     * A promise to set the playbackrate of the player.\n     *\n     * @promise SetPlaybackRatePromise\n     * @fulfill {number} The playback rate was set.\n     * @reject {RangeError} The playback rate was less than 0.5 or greater than 2.\n     */\n    /**\n     * Set the playback rate of the player on a scale from `0.5` to `2`. When set\n     * via the API, the playback rate will not be synchronized to other\n     * players or stored as the viewer's preference.\n     *\n     * @param {number} playbackRate\n     * @return {SetPlaybackRatePromise}\n     */\n    setPlaybackRate(playbackRate) {\n        return this.set('playbackRate', playbackRate);\n    }\n\n    /**\n     * A promise to get the played property of the video.\n     *\n     * @promise GetPlayedPromise\n     * @fulfill {Array} Played Timeranges converted to an Array.\n     */\n    /**\n     * Get the played property of the video.\n     *\n     * @return {GetPlayedPromise}\n     */\n    getPlayed() {\n        return this.get('played');\n    }\n\n    /**\n     * A promise to get the seekable property of the video.\n     *\n     * @promise GetSeekablePromise\n     * @fulfill {Array} Seekable Timeranges converted to an Array.\n     */\n    /**\n     * Get the seekable property of the video.\n     *\n     * @return {GetSeekablePromise}\n     */\n    getSeekable() {\n        return this.get('seekable');\n    }\n\n    /**\n     * A promise to get the seeking property of the player.\n     *\n     * @promise GetSeekingPromise\n     * @fulfill {boolean} Whether or not the player is currently seeking.\n     */\n    /**\n     * Get if the player is currently seeking.\n     *\n     * @return {GetSeekingPromise}\n     */\n    getSeeking() {\n        return this.get('seeking');\n    }\n\n    /**\n     * A promise to get the text tracks of a video.\n     *\n     * @promise GetTextTracksPromise\n     * @fulfill {VimeoTextTrack[]} The text tracks associated with the video.\n     */\n    /**\n     * Get an array of the text tracks that exist for the video.\n     *\n     * @return {GetTextTracksPromise}\n     */\n    getTextTracks() {\n        return this.get('textTracks');\n    }\n\n    /**\n     * A promise to get the embed code for the video.\n     *\n     * @promise GetVideoEmbedCodePromise\n     * @fulfill {string} The `<iframe>` embed code for the video.\n     */\n    /**\n     * Get the `<iframe>` embed code for the video.\n     *\n     * @return {GetVideoEmbedCodePromise}\n     */\n    getVideoEmbedCode() {\n        return this.get('videoEmbedCode');\n    }\n\n    /**\n     * A promise to get the id of the video.\n     *\n     * @promise GetVideoIdPromise\n     * @fulfill {number} The id of the video.\n     */\n    /**\n     * Get the id of the video.\n     *\n     * @return {GetVideoIdPromise}\n     */\n    getVideoId() {\n        return this.get('videoId');\n    }\n\n    /**\n     * A promise to get the title of the video.\n     *\n     * @promise GetVideoTitlePromise\n     * @fulfill {number} The title of the video.\n     */\n    /**\n     * Get the title of the video.\n     *\n     * @return {GetVideoTitlePromise}\n     */\n    getVideoTitle() {\n        return this.get('videoTitle');\n    }\n\n    /**\n     * A promise to get the native width of the video.\n     *\n     * @promise GetVideoWidthPromise\n     * @fulfill {number} The native width of the video.\n     */\n    /**\n     * Get the native width of the currently‐playing video. The width of\n     * the highest‐resolution available will be used before playback begins.\n     *\n     * @return {GetVideoWidthPromise}\n     */\n    getVideoWidth() {\n        return this.get('videoWidth');\n    }\n\n    /**\n     * A promise to get the native height of the video.\n     *\n     * @promise GetVideoHeightPromise\n     * @fulfill {number} The native height of the video.\n     */\n    /**\n     * Get the native height of the currently‐playing video. The height of\n     * the highest‐resolution available will be used before playback begins.\n     *\n     * @return {GetVideoHeightPromise}\n     */\n    getVideoHeight() {\n        return this.get('videoHeight');\n    }\n\n    /**\n     * A promise to get the vimeo.com url for the video.\n     *\n     * @promise GetVideoUrlPromise\n     * @fulfill {number} The vimeo.com url for the video.\n     * @reject {PrivacyError} The url isn’t available because of the video’s privacy setting.\n     */\n    /**\n     * Get the vimeo.com url for the video.\n     *\n     * @return {GetVideoUrlPromise}\n     */\n    getVideoUrl() {\n        return this.get('videoUrl');\n    }\n\n    /**\n     * A promise to get the volume level of the player.\n     *\n     * @promise GetVolumePromise\n     * @fulfill {number} The volume level of the player on a scale from 0 to 1.\n     */\n    /**\n     * Get the current volume level of the player on a scale from `0` to `1`.\n     *\n     * Most mobile devices do not support an independent volume from the\n     * system volume. In those cases, this method will always return `1`.\n     *\n     * @return {GetVolumePromise}\n     */\n    getVolume() {\n        return this.get('volume');\n    }\n\n    /**\n     * A promise to set the volume level of the player.\n     *\n     * @promise SetVolumePromise\n     * @fulfill {number} The volume was set.\n     * @reject {RangeError} The volume was less than 0 or greater than 1.\n     */\n    /**\n     * Set the volume of the player on a scale from `0` to `1`. When set\n     * via the API, the volume level will not be synchronized to other\n     * players or stored as the viewer’s preference.\n     *\n     * Most mobile devices do not support setting the volume. An error will\n     * *not* be triggered in that situation.\n     *\n     * @param {number} volume\n     * @return {SetVolumePromise}\n     */\n    setVolume(volume) {\n        return this.set('volume', volume);\n    }\n}\n\n// Setup embed only if this is not a node environment\nif (!isNode) {\n    initializeEmbeds();\n    resizeEmbeds();\n}\n\nexport default Player;\n"],"names":["isNode","global","toString","call","getMethodName","prop","type","indexOf","toLowerCase","substr","toUpperCase","isDomElement","element","Boolean","nodeType","ownerDocument","defaultView","isInteger","value","isNaN","parseFloat","isFinite","Math","floor","isVimeoUrl","url","test","getVimeoUrl","oEmbedParameters","id","idOrUrl","Error","replace","TypeError","arrayIndexOfSupport","Array","prototype","postMessageSupport","window","postMessage","self","WeakMap","hasOwnProperty","Object","defineProperty","object","name","configurable","writable","genId","arguments","length","key","checkInstance","isObject","entry","_id","x","methodName","prefix","rand","random","substring","this","UMD","context","definition","module","exports","DEF","builtInProp","cycle","scheduling_queue","ToString","timer","setImmediate","fn","setTimeout","obj","val","config","err","Queue","first","last","item","Item","next","add","drain","f","schedule","isThenable","o","_then","o_type","then","notify","i","chain","notifyIsolated","state","success","failure","cb","ret","reject","msg","promise","resolve","triggered","def","def_wrapper","MakeDefWrapper","$resolve$","apply","$reject$","iteratePromises","Constructor","arr","resolver","rejecter","idx","IIFE","$resolver$","MakeDef","Promise","executor","__NPO__","constructor","extractChain","push","$catch$","publicResolve","publicReject","PromisePrototype","Promise$resolve","Promise$reject","Promise$all","len","msgs","count","Promise$race","callbackMap","storeCallback","player","callback","playerCallbacks","get","set","getCallbacks","removeCallback","index","splice","shiftCallbacks","shift","swapCallbacks","oldElement","newElement","delete","getOEmbedParameters","defaults","reduce","params","param","getAttribute","createEmbed","html","querySelector","div","document","createElement","innerHTML","appendChild","firstChild","setAttribute","getOEmbedData","videoUrl","encodeURIComponent","xhr","XDomainRequest","XMLHttpRequest","open","onload","status","json","JSON","parse","responseText","domain_status_code","error","onerror","send","initializeEmbeds","parent","elements","slice","querySelectorAll","handleError","console","forEach","data","catch","resizeEmbeds","VimeoPlayerResizeEmbeds_","onMessage","event","origin","iframes","contentWindow","source","space","parentElement","style","paddingBottom","bottom","addEventListener","parseMessageData","warn","method","message","undefined","ieVersion","navigator","userAgent","stringify","processData","callbacks","promises","e","playerMap","readyMap","Player","options","jQuery","getElementById","nodeName","iframe","has","_window","readyPromise","_onMessage","isError","isReadyError","isReadyEvent","isPingResponse","_originalElement","args","ready","eventName","callMethod","lastCallback","time","language","kind","removeAttribute","parentNode","removeChild","removeEventListener","autopause","color","currentTime","loop","muted","playbackRate","volume"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;;;;EAIA;;;;;EAIA;EACO,IAAMA,MAAM,GAAG,OAAOC,MAAP,KAAkB,WAAlB,IACnB,EAAD,CAAKC,QAAL,CAAcC,IAAd,CAAmBF,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,KAAKA,GAAL,CAAS,SAAT,CAAP;EACH;EAED;;;;;;;EAMA;;;;;;;;sCAKgB;EACZ,aAAO,KAAKA,GAAL,CAAS,YAAT,CAAP;EACH;EAED;;;;;;;EAMA;;;;;;;;0CAKoB;EAChB,aAAO,KAAKA,GAAL,CAAS,gBAAT,CAAP;EACH;EAED;;;;;;;EAMA;;;;;;;;mCAKa;EACT,aAAO,KAAKA,GAAL,CAAS,SAAT,CAAP;EACH;EAED;;;;;;;EAMA;;;;;;;;sCAKgB;EACZ,aAAO,KAAKA,GAAL,CAAS,YAAT,CAAP;EACH;EAED;;;;;;;EAMA;;;;;;;;;sCAMgB;EACZ,aAAO,KAAKA,GAAL,CAAS,YAAT,CAAP;EACH;EAED;;;;;;;EAMA;;;;;;;;;uCAMiB;EACb,aAAO,KAAKA,GAAL,CAAS,aAAT,CAAP;EACH;EAED;;;;;;;;EAOA;;;;;;;;oCAKc;EACV,aAAO,KAAKA,GAAL,CAAS,UAAT,CAAP;EACH;EAED;;;;;;;EAMA;;;;;;;;;;;kCAQY;EACR,aAAO,KAAKA,GAAL,CAAS,QAAT,CAAP;EACH;EAED;;;;;;;;EAOA;;;;;;;;;;;;;;gCAWUqH,QAAQ;EACd,aAAO,KAAKpH,GAAL,CAAS,QAAT,EAAmBoH,MAAnB,CAAP;EACH;;;;;;;EAIL,IAAI,CAACzQ,MAAL,EAAa;EACTiM,EAAAA,gBAAgB;EAChBU,EAAAA,YAAY;EACf;;;;;;;;"}
\ No newline at end of file
+{"version":3,"file":"player.js","sources":["src/lib/functions.js","src/lib/compatibility-check.js","node_modules/weakmap-polyfill/weakmap-polyfill.js","node_modules/native-promise-only/lib/npo.src.js","src/lib/callbacks.js","src/lib/embed.js","src/lib/postmessage.js","src/player.js"],"sourcesContent":["/**\n * @module lib/functions\n */\n\n/**\n * Check to see this is a node environment.\n * @type {Boolean}\n */\n/* global global */\nexport const isNode = typeof global !== 'undefined' &&\n  ({}).toString.call(global) === '[object global]';\n\n/**\n * Get the name of the method for a given getter or setter.\n *\n * @param {string} prop The name of the property.\n * @param {string} type Either “get” or “set”.\n * @return {string}\n */\nexport function getMethodName(prop, type) {\n    if (prop.indexOf(type.toLowerCase()) === 0) {\n        return prop;\n    }\n\n    return `${type.toLowerCase()}${prop.substr(0, 1).toUpperCase()}${prop.substr(1)}`;\n}\n\n/**\n * Check to see if the object is a DOM Element.\n *\n * @param {*} element The object to check.\n * @return {boolean}\n */\nexport function isDomElement(element) {\n    return Boolean(\n        element && element.nodeType === 1 && 'nodeName' in element &&\n        element.ownerDocument && element.ownerDocument.defaultView\n    );\n}\n\n/**\n * Check to see whether the value is a number.\n *\n * @see http://dl.dropboxusercontent.com/u/35146/js/tests/isNumber.html\n * @param {*} value The value to check.\n * @param {boolean} integer Check if the value is an integer.\n * @return {boolean}\n */\nexport function isInteger(value) {\n    // eslint-disable-next-line eqeqeq\n    return !isNaN(parseFloat(value)) && isFinite(value) && Math.floor(value) == value;\n}\n\n/**\n * Check to see if the URL is a Vimeo url.\n *\n * @param {string} url The url string.\n * @return {boolean}\n */\nexport function isVimeoUrl(url) {\n    return (/^(https?:)?\\/\\/((player|www)\\.)?vimeo\\.com(?=$|\\/)/).test(url);\n}\n\n/**\n * Get the Vimeo URL from an element.\n * The element must have either a data-vimeo-id or data-vimeo-url attribute.\n *\n * @param {object} oEmbedParameters The oEmbed parameters.\n * @return {string}\n */\nexport function getVimeoUrl(oEmbedParameters = {}) {\n    const id = oEmbedParameters.id;\n    const url = oEmbedParameters.url;\n    const idOrUrl = id || url;\n\n    if (!idOrUrl) {\n        throw new Error('An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.');\n    }\n\n    if (isInteger(idOrUrl)) {\n        return `https://vimeo.com/${idOrUrl}`;\n    }\n\n    if (isVimeoUrl(idOrUrl)) {\n        return idOrUrl.replace('http:', 'https:');\n    }\n\n    if (id) {\n        throw new TypeError(`“${id}” is not a valid video id.`);\n    }\n\n    throw new TypeError(`“${idOrUrl}” is not a vimeo.com url.`);\n}\n","import { isNode } from './functions';\n\nconst arrayIndexOfSupport = typeof Array.prototype.indexOf !== 'undefined';\nconst postMessageSupport = typeof window !== 'undefined' && typeof window.postMessage !== 'undefined';\n\nif (!isNode && (!arrayIndexOfSupport || !postMessageSupport)) {\n    throw new Error('Sorry, the Vimeo Player API is not available in this browser.');\n}\n","/*!\n * weakmap-polyfill v2.0.1 - ECMAScript6 WeakMap polyfill\n * https://github.com/polygonplanet/weakmap-polyfill\n * Copyright (c) 2015-2020 Polygon Planet <polygon.planet.aqua@gmail.com>\n * @license MIT\n */\n\n(function(self) {\n  'use strict';\n\n  if (self.WeakMap) {\n    return;\n  }\n\n  var hasOwnProperty = Object.prototype.hasOwnProperty;\n  var defineProperty = function(object, name, value) {\n    if (Object.defineProperty) {\n      Object.defineProperty(object, name, {\n        configurable: true,\n        writable: true,\n        value: value\n      });\n    } else {\n      object[name] = value;\n    }\n  };\n\n  self.WeakMap = (function() {\n\n    // ECMA-262 23.3 WeakMap Objects\n    function WeakMap() {\n      if (this === void 0) {\n        throw new TypeError(\"Constructor WeakMap requires 'new'\");\n      }\n\n      defineProperty(this, '_id', genId('_WeakMap'));\n\n      // ECMA-262 23.3.1.1 WeakMap([iterable])\n      if (arguments.length > 0) {\n        // Currently, WeakMap `iterable` argument is not supported\n        throw new TypeError('WeakMap iterable is not supported');\n      }\n    }\n\n    // ECMA-262 23.3.3.2 WeakMap.prototype.delete(key)\n    defineProperty(WeakMap.prototype, 'delete', function(key) {\n      checkInstance(this, 'delete');\n\n      if (!isObject(key)) {\n        return false;\n      }\n\n      var entry = key[this._id];\n      if (entry && entry[0] === key) {\n        delete key[this._id];\n        return true;\n      }\n\n      return false;\n    });\n\n    // ECMA-262 23.3.3.3 WeakMap.prototype.get(key)\n    defineProperty(WeakMap.prototype, 'get', function(key) {\n      checkInstance(this, 'get');\n\n      if (!isObject(key)) {\n        return void 0;\n      }\n\n      var entry = key[this._id];\n      if (entry && entry[0] === key) {\n        return entry[1];\n      }\n\n      return void 0;\n    });\n\n    // ECMA-262 23.3.3.4 WeakMap.prototype.has(key)\n    defineProperty(WeakMap.prototype, 'has', function(key) {\n      checkInstance(this, 'has');\n\n      if (!isObject(key)) {\n        return false;\n      }\n\n      var entry = key[this._id];\n      if (entry && entry[0] === key) {\n        return true;\n      }\n\n      return false;\n    });\n\n    // ECMA-262 23.3.3.5 WeakMap.prototype.set(key, value)\n    defineProperty(WeakMap.prototype, 'set', function(key, value) {\n      checkInstance(this, 'set');\n\n      if (!isObject(key)) {\n        throw new TypeError('Invalid value used as weak map key');\n      }\n\n      var entry = key[this._id];\n      if (entry && entry[0] === key) {\n        entry[1] = value;\n        return this;\n      }\n\n      defineProperty(key, this._id, [key, value]);\n      return this;\n    });\n\n\n    function checkInstance(x, methodName) {\n      if (!isObject(x) || !hasOwnProperty.call(x, '_id')) {\n        throw new TypeError(\n          methodName + ' method called on incompatible receiver ' +\n          typeof x\n        );\n      }\n    }\n\n    function genId(prefix) {\n      return prefix + '_' + rand() + '.' + rand();\n    }\n\n    function rand() {\n      return Math.random().toString().substring(2);\n    }\n\n\n    defineProperty(WeakMap, '_polyfill', true);\n    return WeakMap;\n  })();\n\n\n  function isObject(x) {\n    return Object(x) === x;\n  }\n\n})(\n  typeof self !== 'undefined' ? self :\n  typeof window !== 'undefined' ? window :\n  typeof global !== 'undefined' ? global : this\n);\n","/*! Native Promise Only\n    v0.8.1 (c) Kyle Simpson\n    MIT License: http://getify.mit-license.org\n*/\n\n(function UMD(name,context,definition){\n\t// special form of UMD for polyfilling across evironments\n\tcontext[name] = context[name] || definition();\n\tif (typeof module != \"undefined\" && module.exports) { module.exports = context[name]; }\n\telse if (typeof define == \"function\" && define.amd) { define(function $AMD$(){ return context[name]; }); }\n})(\"Promise\",typeof global != \"undefined\" ? global : this,function DEF(){\n\t/*jshint validthis:true */\n\t\"use strict\";\n\n\tvar builtInProp, cycle, scheduling_queue,\n\t\tToString = Object.prototype.toString,\n\t\ttimer = (typeof setImmediate != \"undefined\") ?\n\t\t\tfunction timer(fn) { return setImmediate(fn); } :\n\t\t\tsetTimeout\n\t;\n\n\t// dammit, IE8.\n\ttry {\n\t\tObject.defineProperty({},\"x\",{});\n\t\tbuiltInProp = function builtInProp(obj,name,val,config) {\n\t\t\treturn Object.defineProperty(obj,name,{\n\t\t\t\tvalue: val,\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: config !== false\n\t\t\t});\n\t\t};\n\t}\n\tcatch (err) {\n\t\tbuiltInProp = function builtInProp(obj,name,val) {\n\t\t\tobj[name] = val;\n\t\t\treturn obj;\n\t\t};\n\t}\n\n\t// Note: using a queue instead of array for efficiency\n\tscheduling_queue = (function Queue() {\n\t\tvar first, last, item;\n\n\t\tfunction Item(fn,self) {\n\t\t\tthis.fn = fn;\n\t\t\tthis.self = self;\n\t\t\tthis.next = void 0;\n\t\t}\n\n\t\treturn {\n\t\t\tadd: function add(fn,self) {\n\t\t\t\titem = new Item(fn,self);\n\t\t\t\tif (last) {\n\t\t\t\t\tlast.next = item;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfirst = item;\n\t\t\t\t}\n\t\t\t\tlast = item;\n\t\t\t\titem = void 0;\n\t\t\t},\n\t\t\tdrain: function drain() {\n\t\t\t\tvar f = first;\n\t\t\t\tfirst = last = cycle = void 0;\n\n\t\t\t\twhile (f) {\n\t\t\t\t\tf.fn.call(f.self);\n\t\t\t\t\tf = f.next;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t})();\n\n\tfunction schedule(fn,self) {\n\t\tscheduling_queue.add(fn,self);\n\t\tif (!cycle) {\n\t\t\tcycle = timer(scheduling_queue.drain);\n\t\t}\n\t}\n\n\t// promise duck typing\n\tfunction isThenable(o) {\n\t\tvar _then, o_type = typeof o;\n\n\t\tif (o != null &&\n\t\t\t(\n\t\t\t\to_type == \"object\" || o_type == \"function\"\n\t\t\t)\n\t\t) {\n\t\t\t_then = o.then;\n\t\t}\n\t\treturn typeof _then == \"function\" ? _then : false;\n\t}\n\n\tfunction notify() {\n\t\tfor (var i=0; i<this.chain.length; i++) {\n\t\t\tnotifyIsolated(\n\t\t\t\tthis,\n\t\t\t\t(this.state === 1) ? this.chain[i].success : this.chain[i].failure,\n\t\t\t\tthis.chain[i]\n\t\t\t);\n\t\t}\n\t\tthis.chain.length = 0;\n\t}\n\n\t// NOTE: This is a separate function to isolate\n\t// the `try..catch` so that other code can be\n\t// optimized better\n\tfunction notifyIsolated(self,cb,chain) {\n\t\tvar ret, _then;\n\t\ttry {\n\t\t\tif (cb === false) {\n\t\t\t\tchain.reject(self.msg);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (cb === true) {\n\t\t\t\t\tret = self.msg;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tret = cb.call(void 0,self.msg);\n\t\t\t\t}\n\n\t\t\t\tif (ret === chain.promise) {\n\t\t\t\t\tchain.reject(TypeError(\"Promise-chain cycle\"));\n\t\t\t\t}\n\t\t\t\telse if (_then = isThenable(ret)) {\n\t\t\t\t\t_then.call(ret,chain.resolve,chain.reject);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tchain.resolve(ret);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (err) {\n\t\t\tchain.reject(err);\n\t\t}\n\t}\n\n\tfunction resolve(msg) {\n\t\tvar _then, self = this;\n\n\t\t// already triggered?\n\t\tif (self.triggered) { return; }\n\n\t\tself.triggered = true;\n\n\t\t// unwrap\n\t\tif (self.def) {\n\t\t\tself = self.def;\n\t\t}\n\n\t\ttry {\n\t\t\tif (_then = isThenable(msg)) {\n\t\t\t\tschedule(function(){\n\t\t\t\t\tvar def_wrapper = new MakeDefWrapper(self);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t_then.call(msg,\n\t\t\t\t\t\t\tfunction $resolve$(){ resolve.apply(def_wrapper,arguments); },\n\t\t\t\t\t\t\tfunction $reject$(){ reject.apply(def_wrapper,arguments); }\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (err) {\n\t\t\t\t\t\treject.call(def_wrapper,err);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\telse {\n\t\t\t\tself.msg = msg;\n\t\t\t\tself.state = 1;\n\t\t\t\tif (self.chain.length > 0) {\n\t\t\t\t\tschedule(notify,self);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (err) {\n\t\t\treject.call(new MakeDefWrapper(self),err);\n\t\t}\n\t}\n\n\tfunction reject(msg) {\n\t\tvar self = this;\n\n\t\t// already triggered?\n\t\tif (self.triggered) { return; }\n\n\t\tself.triggered = true;\n\n\t\t// unwrap\n\t\tif (self.def) {\n\t\t\tself = self.def;\n\t\t}\n\n\t\tself.msg = msg;\n\t\tself.state = 2;\n\t\tif (self.chain.length > 0) {\n\t\t\tschedule(notify,self);\n\t\t}\n\t}\n\n\tfunction iteratePromises(Constructor,arr,resolver,rejecter) {\n\t\tfor (var idx=0; idx<arr.length; idx++) {\n\t\t\t(function IIFE(idx){\n\t\t\t\tConstructor.resolve(arr[idx])\n\t\t\t\t.then(\n\t\t\t\t\tfunction $resolver$(msg){\n\t\t\t\t\t\tresolver(idx,msg);\n\t\t\t\t\t},\n\t\t\t\t\trejecter\n\t\t\t\t);\n\t\t\t})(idx);\n\t\t}\n\t}\n\n\tfunction MakeDefWrapper(self) {\n\t\tthis.def = self;\n\t\tthis.triggered = false;\n\t}\n\n\tfunction MakeDef(self) {\n\t\tthis.promise = self;\n\t\tthis.state = 0;\n\t\tthis.triggered = false;\n\t\tthis.chain = [];\n\t\tthis.msg = void 0;\n\t}\n\n\tfunction Promise(executor) {\n\t\tif (typeof executor != \"function\") {\n\t\t\tthrow TypeError(\"Not a function\");\n\t\t}\n\n\t\tif (this.__NPO__ !== 0) {\n\t\t\tthrow TypeError(\"Not a promise\");\n\t\t}\n\n\t\t// instance shadowing the inherited \"brand\"\n\t\t// to signal an already \"initialized\" promise\n\t\tthis.__NPO__ = 1;\n\n\t\tvar def = new MakeDef(this);\n\n\t\tthis[\"then\"] = function then(success,failure) {\n\t\t\tvar o = {\n\t\t\t\tsuccess: typeof success == \"function\" ? success : true,\n\t\t\t\tfailure: typeof failure == \"function\" ? failure : false\n\t\t\t};\n\t\t\t// Note: `then(..)` itself can be borrowed to be used against\n\t\t\t// a different promise constructor for making the chained promise,\n\t\t\t// by substituting a different `this` binding.\n\t\t\to.promise = new this.constructor(function extractChain(resolve,reject) {\n\t\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t\t}\n\n\t\t\t\to.resolve = resolve;\n\t\t\t\to.reject = reject;\n\t\t\t});\n\t\t\tdef.chain.push(o);\n\n\t\t\tif (def.state !== 0) {\n\t\t\t\tschedule(notify,def);\n\t\t\t}\n\n\t\t\treturn o.promise;\n\t\t};\n\t\tthis[\"catch\"] = function $catch$(failure) {\n\t\t\treturn this.then(void 0,failure);\n\t\t};\n\n\t\ttry {\n\t\t\texecutor.call(\n\t\t\t\tvoid 0,\n\t\t\t\tfunction publicResolve(msg){\n\t\t\t\t\tresolve.call(def,msg);\n\t\t\t\t},\n\t\t\t\tfunction publicReject(msg) {\n\t\t\t\t\treject.call(def,msg);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\tcatch (err) {\n\t\t\treject.call(def,err);\n\t\t}\n\t}\n\n\tvar PromisePrototype = builtInProp({},\"constructor\",Promise,\n\t\t/*configurable=*/false\n\t);\n\n\t// Note: Android 4 cannot use `Object.defineProperty(..)` here\n\tPromise.prototype = PromisePrototype;\n\n\t// built-in \"brand\" to signal an \"uninitialized\" promise\n\tbuiltInProp(PromisePrototype,\"__NPO__\",0,\n\t\t/*configurable=*/false\n\t);\n\n\tbuiltInProp(Promise,\"resolve\",function Promise$resolve(msg) {\n\t\tvar Constructor = this;\n\n\t\t// spec mandated checks\n\t\t// note: best \"isPromise\" check that's practical for now\n\t\tif (msg && typeof msg == \"object\" && msg.__NPO__ === 1) {\n\t\t\treturn msg;\n\t\t}\n\n\t\treturn new Constructor(function executor(resolve,reject){\n\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t}\n\n\t\t\tresolve(msg);\n\t\t});\n\t});\n\n\tbuiltInProp(Promise,\"reject\",function Promise$reject(msg) {\n\t\treturn new this(function executor(resolve,reject){\n\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t}\n\n\t\t\treject(msg);\n\t\t});\n\t});\n\n\tbuiltInProp(Promise,\"all\",function Promise$all(arr) {\n\t\tvar Constructor = this;\n\n\t\t// spec mandated checks\n\t\tif (ToString.call(arr) != \"[object Array]\") {\n\t\t\treturn Constructor.reject(TypeError(\"Not an array\"));\n\t\t}\n\t\tif (arr.length === 0) {\n\t\t\treturn Constructor.resolve([]);\n\t\t}\n\n\t\treturn new Constructor(function executor(resolve,reject){\n\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t}\n\n\t\t\tvar len = arr.length, msgs = Array(len), count = 0;\n\n\t\t\titeratePromises(Constructor,arr,function resolver(idx,msg) {\n\t\t\t\tmsgs[idx] = msg;\n\t\t\t\tif (++count === len) {\n\t\t\t\t\tresolve(msgs);\n\t\t\t\t}\n\t\t\t},reject);\n\t\t});\n\t});\n\n\tbuiltInProp(Promise,\"race\",function Promise$race(arr) {\n\t\tvar Constructor = this;\n\n\t\t// spec mandated checks\n\t\tif (ToString.call(arr) != \"[object Array]\") {\n\t\t\treturn Constructor.reject(TypeError(\"Not an array\"));\n\t\t}\n\n\t\treturn new Constructor(function executor(resolve,reject){\n\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t}\n\n\t\t\titeratePromises(Constructor,arr,function resolver(idx,msg){\n\t\t\t\tresolve(msg);\n\t\t\t},reject);\n\t\t});\n\t});\n\n\treturn Promise;\n});\n","/**\n * @module lib/callbacks\n */\n\nexport const callbackMap = new WeakMap();\n\n/**\n * Store a callback for a method or event for a player.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name.\n * @param {(function(this:Player, *): void|{resolve: function, reject: function})} callback\n *        The callback to call or an object with resolve and reject functions for a promise.\n * @return {void}\n */\nexport function storeCallback(player, name, callback) {\n    const playerCallbacks = callbackMap.get(player.element) || {};\n\n    if (!(name in playerCallbacks)) {\n        playerCallbacks[name] = [];\n    }\n\n    playerCallbacks[name].push(callback);\n    callbackMap.set(player.element, playerCallbacks);\n}\n\n/**\n * Get the callbacks for a player and event or method.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name\n * @return {function[]}\n */\nexport function getCallbacks(player, name) {\n    const playerCallbacks = callbackMap.get(player.element) || {};\n    return playerCallbacks[name] || [];\n}\n\n/**\n * Remove a stored callback for a method or event for a player.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name\n * @param {function} [callback] The specific callback to remove.\n * @return {boolean} Was this the last callback?\n */\nexport function removeCallback(player, name, callback) {\n    const playerCallbacks = callbackMap.get(player.element) || {};\n\n    if (!playerCallbacks[name]) {\n        return true;\n    }\n\n    // If no callback is passed, remove all callbacks for the event\n    if (!callback) {\n        playerCallbacks[name] = [];\n        callbackMap.set(player.element, playerCallbacks);\n\n        return true;\n    }\n\n    const index = playerCallbacks[name].indexOf(callback);\n\n    if (index !== -1) {\n        playerCallbacks[name].splice(index, 1);\n    }\n\n    callbackMap.set(player.element, playerCallbacks);\n    return playerCallbacks[name] && playerCallbacks[name].length === 0;\n}\n\n/**\n * Return the first stored callback for a player and event or method.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name.\n * @return {function} The callback, or false if there were none\n */\nexport function shiftCallbacks(player, name) {\n    const playerCallbacks = getCallbacks(player, name);\n\n    if (playerCallbacks.length < 1) {\n        return false;\n    }\n\n    const callback = playerCallbacks.shift();\n    removeCallback(player, name, callback);\n    return callback;\n}\n\n/**\n * Move callbacks associated with an element to another element.\n *\n * @param {HTMLElement} oldElement The old element.\n * @param {HTMLElement} newElement The new element.\n * @return {void}\n */\nexport function swapCallbacks(oldElement, newElement) {\n    const playerCallbacks = callbackMap.get(oldElement);\n\n    callbackMap.set(newElement, playerCallbacks);\n    callbackMap.delete(oldElement);\n}\n","/**\n * @module lib/embed\n */\n\nimport { isVimeoUrl, getVimeoUrl } from './functions';\n\nconst oEmbedParameters = [\n    'autopause',\n    'autoplay',\n    'background',\n    'byline',\n    'color',\n    'controls',\n    'dnt',\n    'height',\n    'id',\n    'loop',\n    'maxheight',\n    'maxwidth',\n    'muted',\n    'playsinline',\n    'portrait',\n    'responsive',\n    'speed',\n    'texttrack',\n    'title',\n    'transparent',\n    'url',\n    'width'\n];\n\n/**\n * Get the 'data-vimeo'-prefixed attributes from an element as an object.\n *\n * @param {HTMLElement} element The element.\n * @param {Object} [defaults={}] The default values to use.\n * @return {Object<string, string>}\n */\nexport function getOEmbedParameters(element, defaults = {}) {\n    return oEmbedParameters.reduce((params, param) => {\n        const value = element.getAttribute(`data-vimeo-${param}`);\n\n        if (value || value === '') {\n            params[param] = value === '' ? 1 : value;\n        }\n\n        return params;\n    }, defaults);\n}\n\n/**\n * Create an embed from oEmbed data inside an element.\n *\n * @param {object} data The oEmbed data.\n * @param {HTMLElement} element The element to put the iframe in.\n * @return {HTMLIFrameElement} The iframe embed.\n */\nexport function createEmbed({ html }, element) {\n    if (!element) {\n        throw new TypeError('An element must be provided');\n    }\n\n    if (element.getAttribute('data-vimeo-initialized') !== null) {\n        return element.querySelector('iframe');\n    }\n\n    const div = document.createElement('div');\n    div.innerHTML = html;\n\n    element.appendChild(div.firstChild);\n    element.setAttribute('data-vimeo-initialized', 'true');\n\n    return element.querySelector('iframe');\n}\n\n/**\n * Make an oEmbed call for the specified URL.\n *\n * @param {string} videoUrl The vimeo.com url for the video.\n * @param {Object} [params] Parameters to pass to oEmbed.\n * @param {HTMLElement} element The element.\n * @return {Promise}\n */\nexport function getOEmbedData(videoUrl, params = {}, element) {\n    return new Promise((resolve, reject) => {\n        if (!isVimeoUrl(videoUrl)) {\n            throw new TypeError(`“${videoUrl}” is not a vimeo.com url.`);\n        }\n\n        let url = `https://vimeo.com/api/oembed.json?url=${encodeURIComponent(videoUrl)}`;\n\n        for (const param in params) {\n            if (params.hasOwnProperty(param)) {\n                url += `&${param}=${encodeURIComponent(params[param])}`;\n            }\n        }\n\n        const xhr = 'XDomainRequest' in window ? new XDomainRequest() : new XMLHttpRequest();\n        xhr.open('GET', url, true);\n\n        xhr.onload = function() {\n            if (xhr.status === 404) {\n                reject(new Error(`“${videoUrl}” was not found.`));\n                return;\n            }\n\n            if (xhr.status === 403) {\n                reject(new Error(`“${videoUrl}” is not embeddable.`));\n                return;\n            }\n\n            try {\n                const json = JSON.parse(xhr.responseText);\n                // Check api response for 403 on oembed\n                if (json.domain_status_code === 403) {\n                    // We still want to create the embed to give users visual feedback\n                    createEmbed(json, element);\n                    reject(new Error(`“${videoUrl}” is not embeddable.`));\n                    return;\n                }\n\n                resolve(json);\n            }\n            catch (error) {\n                reject(error);\n            }\n        };\n\n        xhr.onerror = function() {\n            const status = xhr.status ? ` (${xhr.status})` : '';\n            reject(new Error(`There was an error fetching the embed code from Vimeo${status}.`));\n        };\n\n        xhr.send();\n    });\n}\n\n/**\n * Initialize all embeds within a specific element\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nexport function initializeEmbeds(parent = document) {\n    const elements = [].slice.call(parent.querySelectorAll('[data-vimeo-id], [data-vimeo-url]'));\n\n    const handleError = (error) => {\n        if ('console' in window && console.error) {\n            console.error(`There was an error creating an embed: ${error}`);\n        }\n    };\n\n    elements.forEach((element) => {\n        try {\n            // Skip any that have data-vimeo-defer\n            if (element.getAttribute('data-vimeo-defer') !== null) {\n                return;\n            }\n\n            const params = getOEmbedParameters(element);\n            const url = getVimeoUrl(params);\n\n            getOEmbedData(url, params, element).then((data) => {\n                return createEmbed(data, element);\n            }).catch(handleError);\n        }\n        catch (error) {\n            handleError(error);\n        }\n    });\n}\n\n/**\n * Resize embeds when messaged by the player.\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nexport function resizeEmbeds(parent = document) {\n    // Prevent execution if users include the player.js script multiple times.\n    if (window.VimeoPlayerResizeEmbeds_) {\n        return;\n    }\n    window.VimeoPlayerResizeEmbeds_ = true;\n\n    const onMessage = (event) => {\n        if (!isVimeoUrl(event.origin)) {\n            return;\n        }\n\n        // 'spacechange' is fired only on embeds with cards\n        if (!event.data || event.data.event !== 'spacechange') {\n            return;\n        }\n\n        const iframes = parent.querySelectorAll('iframe');\n\n        for (let i = 0; i < iframes.length; i++) {\n            if (iframes[i].contentWindow !== event.source) {\n                continue;\n            }\n\n            // Change padding-bottom of the enclosing div to accommodate\n            // card carousel without distorting aspect ratio\n            const space = iframes[i].parentElement;\n            space.style.paddingBottom = `${event.data.data[0].bottom}px`;\n\n            break;\n        }\n    };\n\n    window.addEventListener('message', onMessage);\n}\n","/**\n * @module lib/postmessage\n */\n\nimport { getCallbacks, removeCallback, shiftCallbacks } from './callbacks';\n\n/**\n * Parse a message received from postMessage.\n *\n * @param {*} data The data received from postMessage.\n * @return {object}\n */\nexport function parseMessageData(data) {\n    if (typeof data === 'string') {\n        try {\n            data = JSON.parse(data);\n        }\n        catch (error) {\n            // If the message cannot be parsed, throw the error as a warning\n            console.warn(error);\n            return {};\n        }\n    }\n\n    return data;\n}\n\n/**\n * Post a message to the specified target.\n *\n * @param {Player} player The player object to use.\n * @param {string} method The API method to call.\n * @param {object} params The parameters to send to the player.\n * @return {void}\n */\nexport function postMessage(player, method, params) {\n    if (!player.element.contentWindow || !player.element.contentWindow.postMessage) {\n        return;\n    }\n\n    let message = {\n        method\n    };\n\n    if (params !== undefined) {\n        message.value = params;\n    }\n\n    // IE 8 and 9 do not support passing messages, so stringify them\n    const ieVersion = parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\\d+).*$/, '$1'));\n    if (ieVersion >= 8 && ieVersion < 10) {\n        message = JSON.stringify(message);\n    }\n\n    player.element.contentWindow.postMessage(message, player.origin);\n}\n\n/**\n * Parse the data received from a message event.\n *\n * @param {Player} player The player that received the message.\n * @param {(Object|string)} data The message data. Strings will be parsed into JSON.\n * @return {void}\n */\nexport function processData(player, data) {\n    data = parseMessageData(data);\n    let callbacks = [];\n    let param;\n\n    if (data.event) {\n        if (data.event === 'error') {\n            const promises = getCallbacks(player, data.data.method);\n\n            promises.forEach((promise) => {\n                const error = new Error(data.data.message);\n                error.name = data.data.name;\n\n                promise.reject(error);\n                removeCallback(player, data.data.method, promise);\n            });\n        }\n\n        callbacks = getCallbacks(player, `event:${data.event}`);\n        param = data.data;\n    }\n    else if (data.method) {\n        const callback = shiftCallbacks(player, data.method);\n\n        if (callback) {\n            callbacks.push(callback);\n            param = data.value;\n        }\n    }\n\n    callbacks.forEach((callback) => {\n        try {\n            if (typeof callback === 'function') {\n                callback.call(player, param);\n                return;\n            }\n\n            callback.resolve(param);\n        }\n        catch (e) {\n            // empty\n        }\n    });\n}\n","import './lib/compatibility-check';\n\nimport 'weakmap-polyfill';\nimport Promise from 'native-promise-only';\n\nimport { storeCallback, getCallbacks, removeCallback, swapCallbacks } from './lib/callbacks';\nimport { getMethodName, isDomElement, isVimeoUrl, getVimeoUrl, isNode } from './lib/functions';\nimport { getOEmbedParameters, getOEmbedData, createEmbed, initializeEmbeds, resizeEmbeds } from './lib/embed';\nimport { parseMessageData, postMessage, processData } from './lib/postmessage';\n\nconst playerMap = new WeakMap();\nconst readyMap = new WeakMap();\n\nclass Player {\n    /**\n     * Create a Player.\n     *\n     * @param {(HTMLIFrameElement|HTMLElement|string|jQuery)} element A reference to the Vimeo\n     *        player iframe, and id, or a jQuery object.\n     * @param {object} [options] oEmbed parameters to use when creating an embed in the element.\n     * @return {Player}\n     */\n    constructor(element, options = {}) {\n        /* global jQuery */\n        if (window.jQuery && element instanceof jQuery) {\n            if (element.length > 1 && window.console && console.warn) {\n                console.warn('A jQuery object with multiple elements was passed, using the first element.');\n            }\n\n            element = element[0];\n        }\n\n        // Find an element by ID\n        if (typeof document !== 'undefined' && typeof element === 'string') {\n            element = document.getElementById(element);\n        }\n\n        // Not an element!\n        if (!isDomElement(element)) {\n            throw new TypeError('You must pass either a valid element or a valid id.');\n        }\n\n        // Already initialized an embed in this div, so grab the iframe\n        if (element.nodeName !== 'IFRAME') {\n            const iframe = element.querySelector('iframe');\n\n            if (iframe) {\n                element = iframe;\n            }\n        }\n\n        // iframe url is not a Vimeo url\n        if (element.nodeName === 'IFRAME' && !isVimeoUrl(element.getAttribute('src') || '')) {\n            throw new Error('The player element passed isn’t a Vimeo embed.');\n        }\n\n        // If there is already a player object in the map, return that\n        if (playerMap.has(element)) {\n            return playerMap.get(element);\n        }\n\n        this._window = element.ownerDocument.defaultView;\n        this.element = element;\n        this.origin = '*';\n\n        const readyPromise = new Promise((resolve, reject) => {\n            this._onMessage = (event) => {\n                if (!isVimeoUrl(event.origin) || this.element.contentWindow !== event.source) {\n                    return;\n                }\n\n                if (this.origin === '*') {\n                    this.origin = event.origin;\n                }\n\n                const data = parseMessageData(event.data);\n                const isError = data && data.event === 'error';\n                const isReadyError = isError && data.data && data.data.method === 'ready';\n\n                if (isReadyError) {\n                    const error = new Error(data.data.message);\n                    error.name = data.data.name;\n                    reject(error);\n                    return;\n                }\n\n                const isReadyEvent = data && data.event === 'ready';\n                const isPingResponse = data && data.method === 'ping';\n\n                if (isReadyEvent || isPingResponse) {\n                    this.element.setAttribute('data-ready', 'true');\n                    resolve();\n                    return;\n                }\n\n                processData(this, data);\n            };\n\n            this._window.addEventListener('message', this._onMessage);\n\n            if (this.element.nodeName !== 'IFRAME') {\n                const params = getOEmbedParameters(element, options);\n                const url = getVimeoUrl(params);\n\n                getOEmbedData(url, params, element).then((data) => {\n                    const iframe = createEmbed(data, element);\n                    // Overwrite element with the new iframe,\n                    // but store reference to the original element\n                    this.element = iframe;\n                    this._originalElement = element;\n\n                    swapCallbacks(element, iframe);\n                    playerMap.set(this.element, this);\n\n                    return data;\n                }).catch(reject);\n            }\n        });\n\n        // Store a copy of this Player in the map\n        readyMap.set(this, readyPromise);\n        playerMap.set(this.element, this);\n\n        // Send a ping to the iframe so the ready promise will be resolved if\n        // the player is already ready.\n        if (this.element.nodeName === 'IFRAME') {\n            postMessage(this, 'ping');\n        }\n\n        return this;\n    }\n\n    /**\n     * Get a promise for a method.\n     *\n     * @param {string} name The API method to call.\n     * @param {Object} [args={}] Arguments to send via postMessage.\n     * @return {Promise}\n     */\n    callMethod(name, args = {}) {\n        return new Promise((resolve, reject) => {\n            // We are storing the resolve/reject handlers to call later, so we\n            // can’t return here.\n            // eslint-disable-next-line promise/always-return\n            return this.ready().then(() => {\n                storeCallback(this, name, {\n                    resolve,\n                    reject\n                });\n\n                postMessage(this, name, args);\n            }).catch(reject);\n        });\n    }\n\n    /**\n     * Get a promise for the value of a player property.\n     *\n     * @param {string} name The property name\n     * @return {Promise}\n     */\n    get(name) {\n        return new Promise((resolve, reject) => {\n            name = getMethodName(name, 'get');\n\n            // We are storing the resolve/reject handlers to call later, so we\n            // can’t return here.\n            // eslint-disable-next-line promise/always-return\n            return this.ready().then(() => {\n                storeCallback(this, name, {\n                    resolve,\n                    reject\n                });\n\n                postMessage(this, name);\n            }).catch(reject);\n        });\n    }\n\n    /**\n     * Get a promise for setting the value of a player property.\n     *\n     * @param {string} name The API method to call.\n     * @param {mixed} value The value to set.\n     * @return {Promise}\n     */\n    set(name, value) {\n        return new Promise((resolve, reject) => {\n            name = getMethodName(name, 'set');\n\n            if (value === undefined || value === null) {\n                throw new TypeError('There must be a value to set.');\n            }\n\n            // We are storing the resolve/reject handlers to call later, so we\n            // can’t return here.\n            // eslint-disable-next-line promise/always-return\n            return this.ready().then(() => {\n                storeCallback(this, name, {\n                    resolve,\n                    reject\n                });\n\n                postMessage(this, name, value);\n            }).catch(reject);\n        });\n    }\n\n    /**\n     * Add an event listener for the specified event. Will call the\n     * callback with a single parameter, `data`, that contains the data for\n     * that event.\n     *\n     * @param {string} eventName The name of the event.\n     * @param {function(*)} callback The function to call when the event fires.\n     * @return {void}\n     */\n    on(eventName, callback) {\n        if (!eventName) {\n            throw new TypeError('You must pass an event name.');\n        }\n\n        if (!callback) {\n            throw new TypeError('You must pass a callback function.');\n        }\n\n        if (typeof callback !== 'function') {\n            throw new TypeError('The callback must be a function.');\n        }\n\n        const callbacks = getCallbacks(this, `event:${eventName}`);\n        if (callbacks.length === 0) {\n            this.callMethod('addEventListener', eventName).catch(() => {\n                // Ignore the error. There will be an error event fired that\n                // will trigger the error callback if they are listening.\n            });\n        }\n\n        storeCallback(this, `event:${eventName}`, callback);\n    }\n\n    /**\n     * Remove an event listener for the specified event. Will remove all\n     * listeners for that event if a `callback` isn’t passed, or only that\n     * specific callback if it is passed.\n     *\n     * @param {string} eventName The name of the event.\n     * @param {function} [callback] The specific callback to remove.\n     * @return {void}\n     */\n    off(eventName, callback) {\n        if (!eventName) {\n            throw new TypeError('You must pass an event name.');\n        }\n\n        if (callback && typeof callback !== 'function') {\n            throw new TypeError('The callback must be a function.');\n        }\n\n        const lastCallback = removeCallback(this, `event:${eventName}`, callback);\n\n        // If there are no callbacks left, remove the listener\n        if (lastCallback) {\n            this.callMethod('removeEventListener', eventName).catch((e) => {\n                // Ignore the error. There will be an error event fired that\n                // will trigger the error callback if they are listening.\n            });\n        }\n    }\n\n    /**\n     * A promise to load a new video.\n     *\n     * @promise LoadVideoPromise\n     * @fulfill {number} The video with this id successfully loaded.\n     * @reject {TypeError} The id was not a number.\n     */\n    /**\n     * Load a new video into this embed. The promise will be resolved if\n     * the video is successfully loaded, or it will be rejected if it could\n     * not be loaded.\n     *\n     * @param {number|object} options The id of the video or an object with embed options.\n     * @return {LoadVideoPromise}\n     */\n    loadVideo(options) {\n        return this.callMethod('loadVideo', options);\n    }\n\n    /**\n     * A promise to perform an action when the Player is ready.\n     *\n     * @todo document errors\n     * @promise LoadVideoPromise\n     * @fulfill {void}\n     */\n    /**\n     * Trigger a function when the player iframe has initialized. You do not\n     * need to wait for `ready` to trigger to begin adding event listeners\n     * or calling other methods.\n     *\n     * @return {ReadyPromise}\n     */\n    ready() {\n        const readyPromise = readyMap.get(this) || new Promise((resolve, reject) => {\n            reject(new Error('Unknown player. Probably unloaded.'));\n        });\n        return Promise.resolve(readyPromise);\n    }\n\n    /**\n     * A promise to add a cue point to the player.\n     *\n     * @promise AddCuePointPromise\n     * @fulfill {string} The id of the cue point to use for removeCuePoint.\n     * @reject {RangeError} the time was less than 0 or greater than the\n     *         video’s duration.\n     * @reject {UnsupportedError} Cue points are not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Add a cue point to the player.\n     *\n     * @param {number} time The time for the cue point.\n     * @param {object} [data] Arbitrary data to be returned with the cue point.\n     * @return {AddCuePointPromise}\n     */\n    addCuePoint(time, data = {}) {\n        return this.callMethod('addCuePoint', { time, data });\n    }\n\n    /**\n     * A promise to remove a cue point from the player.\n     *\n     * @promise AddCuePointPromise\n     * @fulfill {string} The id of the cue point that was removed.\n     * @reject {InvalidCuePoint} The cue point with the specified id was not\n     *         found.\n     * @reject {UnsupportedError} Cue points are not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Remove a cue point from the video.\n     *\n     * @param {string} id The id of the cue point to remove.\n     * @return {RemoveCuePointPromise}\n     */\n    removeCuePoint(id) {\n        return this.callMethod('removeCuePoint', id);\n    }\n\n    /**\n     * A representation of a text track on a video.\n     *\n     * @typedef {Object} VimeoTextTrack\n     * @property {string} language The ISO language code.\n     * @property {string} kind The kind of track it is (captions or subtitles).\n     * @property {string} label The human‐readable label for the track.\n     */\n    /**\n     * A promise to enable a text track.\n     *\n     * @promise EnableTextTrackPromise\n     * @fulfill {VimeoTextTrack} The text track that was enabled.\n     * @reject {InvalidTrackLanguageError} No track was available with the\n     *         specified language.\n     * @reject {InvalidTrackError} No track was available with the specified\n     *         language and kind.\n     */\n    /**\n     * Enable the text track with the specified language, and optionally the\n     * specified kind (captions or subtitles).\n     *\n     * When set via the API, the track language will not change the viewer’s\n     * stored preference.\n     *\n     * @param {string} language The two‐letter language code.\n     * @param {string} [kind] The kind of track to enable (captions or subtitles).\n     * @return {EnableTextTrackPromise}\n     */\n    enableTextTrack(language, kind) {\n        if (!language) {\n            throw new TypeError('You must pass a language.');\n        }\n\n        return this.callMethod('enableTextTrack', {\n            language,\n            kind\n        });\n    }\n\n    /**\n     * A promise to disable the active text track.\n     *\n     * @promise DisableTextTrackPromise\n     * @fulfill {void} The track was disabled.\n     */\n    /**\n     * Disable the currently-active text track.\n     *\n     * @return {DisableTextTrackPromise}\n     */\n    disableTextTrack() {\n        return this.callMethod('disableTextTrack');\n    }\n\n    /**\n     * A promise to pause the video.\n     *\n     * @promise PausePromise\n     * @fulfill {void} The video was paused.\n     */\n    /**\n     * Pause the video if it’s playing.\n     *\n     * @return {PausePromise}\n     */\n    pause() {\n        return this.callMethod('pause');\n    }\n\n    /**\n     * A promise to play the video.\n     *\n     * @promise PlayPromise\n     * @fulfill {void} The video was played.\n     */\n    /**\n     * Play the video if it’s paused. **Note:** on iOS and some other\n     * mobile devices, you cannot programmatically trigger play. Once the\n     * viewer has tapped on the play button in the player, however, you\n     * will be able to use this function.\n     *\n     * @return {PlayPromise}\n     */\n    play() {\n        return this.callMethod('play');\n    }\n\n    /**\n     * A promise to unload the video.\n     *\n     * @promise UnloadPromise\n     * @fulfill {void} The video was unloaded.\n     */\n    /**\n     * Return the player to its initial state.\n     *\n     * @return {UnloadPromise}\n     */\n    unload() {\n        return this.callMethod('unload');\n    }\n\n    /**\n     * Cleanup the player and remove it from the DOM\n     *\n     * It won't be usable and a new one should be constructed\n     *  in order to do any operations.\n     *\n     * @return {Promise}\n     */\n    destroy() {\n        return new Promise((resolve) => {\n            readyMap.delete(this);\n            playerMap.delete(this.element);\n\n            if (this._originalElement) {\n                playerMap.delete(this._originalElement);\n                this._originalElement.removeAttribute('data-vimeo-initialized');\n            }\n\n            if (this.element && this.element.nodeName === 'IFRAME' && this.element.parentNode) {\n                this.element.parentNode.removeChild(this.element);\n            }\n\n            this._window.removeEventListener('message', this._onMessage);\n\n            resolve();\n        });\n    }\n\n    /**\n     * A promise to get the autopause behavior of the video.\n     *\n     * @promise GetAutopausePromise\n     * @fulfill {boolean} Whether autopause is turned on or off.\n     * @reject {UnsupportedError} Autopause is not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Get the autopause behavior for this player.\n     *\n     * @return {GetAutopausePromise}\n     */\n    getAutopause() {\n        return this.get('autopause');\n    }\n\n    /**\n     * A promise to set the autopause behavior of the video.\n     *\n     * @promise SetAutopausePromise\n     * @fulfill {boolean} Whether autopause is turned on or off.\n     * @reject {UnsupportedError} Autopause is not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Enable or disable the autopause behavior of this player.\n     *\n     * By default, when another video is played in the same browser, this\n     * player will automatically pause. Unless you have a specific reason\n     * for doing so, we recommend that you leave autopause set to the\n     * default (`true`).\n     *\n     * @param {boolean} autopause\n     * @return {SetAutopausePromise}\n     */\n    setAutopause(autopause) {\n        return this.set('autopause', autopause);\n    }\n\n    /**\n     * A promise to get the buffered property of the video.\n     *\n     * @promise GetBufferedPromise\n     * @fulfill {Array} Buffered Timeranges converted to an Array.\n     */\n    /**\n     * Get the buffered property of the video.\n     *\n     * @return {GetBufferedPromise}\n     */\n    getBuffered() {\n        return this.get('buffered');\n    }\n\n    /**\n     * A representation of a chapter.\n     *\n     * @typedef {Object} VimeoChapter\n     * @property {number} startTime The start time of the chapter.\n     * @property {object} title The title of the chapter.\n     * @property {number} index The place in the order of Chapters. Starts at 1.\n     */\n    /**\n     * A promise to get chapters for the video.\n     *\n     * @promise GetChaptersPromise\n     * @fulfill {VimeoChapter[]} The chapters for the video.\n     */\n    /**\n     * Get an array of all the chapters for the video.\n     *\n     * @return {GetChaptersPromise}\n     */\n    getChapters() {\n        return this.get('chapters');\n    }\n\n    /**\n     * A promise to get the currently active chapter.\n     *\n     * @promise GetCurrentChaptersPromise\n     * @fulfill {VimeoChapter|undefined} The current chapter for the video.\n     */\n    /**\n     * Get the currently active chapter for the video.\n     *\n     * @return {GetCurrentChaptersPromise}\n     */\n    getCurrentChapter() {\n        return this.get('currentChapter');\n    }\n\n    /**\n     * A promise to get the color of the player.\n     *\n     * @promise GetColorPromise\n     * @fulfill {string} The hex color of the player.\n     */\n    /**\n     * Get the color for this player.\n     *\n     * @return {GetColorPromise}\n     */\n    getColor() {\n        return this.get('color');\n    }\n\n    /**\n     * A promise to set the color of the player.\n     *\n     * @promise SetColorPromise\n     * @fulfill {string} The color was successfully set.\n     * @reject {TypeError} The string was not a valid hex or rgb color.\n     * @reject {ContrastError} The color was set, but the contrast is\n     *         outside of the acceptable range.\n     * @reject {EmbedSettingsError} The owner of the player has chosen to\n     *         use a specific color.\n     */\n    /**\n     * Set the color of this player to a hex or rgb string. Setting the\n     * color may fail if the owner of the video has set their embed\n     * preferences to force a specific color.\n     *\n     * @param {string} color The hex or rgb color string to set.\n     * @return {SetColorPromise}\n     */\n    setColor(color) {\n        return this.set('color', color);\n    }\n\n    /**\n     * A representation of a cue point.\n     *\n     * @typedef {Object} VimeoCuePoint\n     * @property {number} time The time of the cue point.\n     * @property {object} data The data passed when adding the cue point.\n     * @property {string} id The unique id for use with removeCuePoint.\n     */\n    /**\n     * A promise to get the cue points of a video.\n     *\n     * @promise GetCuePointsPromise\n     * @fulfill {VimeoCuePoint[]} The cue points added to the video.\n     * @reject {UnsupportedError} Cue points are not supported with the current\n     *         player or browser.\n     */\n    /**\n     * Get an array of the cue points added to the video.\n     *\n     * @return {GetCuePointsPromise}\n     */\n    getCuePoints() {\n        return this.get('cuePoints');\n    }\n\n    /**\n     * A promise to get the current time of the video.\n     *\n     * @promise GetCurrentTimePromise\n     * @fulfill {number} The current time in seconds.\n     */\n    /**\n     * Get the current playback position in seconds.\n     *\n     * @return {GetCurrentTimePromise}\n     */\n    getCurrentTime() {\n        return this.get('currentTime');\n    }\n\n    /**\n     * A promise to set the current time of the video.\n     *\n     * @promise SetCurrentTimePromise\n     * @fulfill {number} The actual current time that was set.\n     * @reject {RangeError} the time was less than 0 or greater than the\n     *         video’s duration.\n     */\n    /**\n     * Set the current playback position in seconds. If the player was\n     * paused, it will remain paused. Likewise, if the player was playing,\n     * it will resume playing once the video has buffered.\n     *\n     * You can provide an accurate time and the player will attempt to seek\n     * to as close to that time as possible. The exact time will be the\n     * fulfilled value of the promise.\n     *\n     * @param {number} currentTime\n     * @return {SetCurrentTimePromise}\n     */\n    setCurrentTime(currentTime) {\n        return this.set('currentTime', currentTime);\n    }\n\n    /**\n     * A promise to get the duration of the video.\n     *\n     * @promise GetDurationPromise\n     * @fulfill {number} The duration in seconds.\n     */\n    /**\n     * Get the duration of the video in seconds. It will be rounded to the\n     * nearest second before playback begins, and to the nearest thousandth\n     * of a second after playback begins.\n     *\n     * @return {GetDurationPromise}\n     */\n    getDuration() {\n        return this.get('duration');\n    }\n\n    /**\n     * A promise to get the ended state of the video.\n     *\n     * @promise GetEndedPromise\n     * @fulfill {boolean} Whether or not the video has ended.\n     */\n    /**\n     * Get the ended state of the video. The video has ended if\n     * `currentTime === duration`.\n     *\n     * @return {GetEndedPromise}\n     */\n    getEnded() {\n        return this.get('ended');\n    }\n\n    /**\n     * A promise to get the loop state of the player.\n     *\n     * @promise GetLoopPromise\n     * @fulfill {boolean} Whether or not the player is set to loop.\n     */\n    /**\n     * Get the loop state of the player.\n     *\n     * @return {GetLoopPromise}\n     */\n    getLoop() {\n        return this.get('loop');\n    }\n\n    /**\n     * A promise to set the loop state of the player.\n     *\n     * @promise SetLoopPromise\n     * @fulfill {boolean} The loop state that was set.\n     */\n    /**\n     * Set the loop state of the player. When set to `true`, the player\n     * will start over immediately once playback ends.\n     *\n     * @param {boolean} loop\n     * @return {SetLoopPromise}\n     */\n    setLoop(loop) {\n        return this.set('loop', loop);\n    }\n\n\n    /**\n     * A promise to set the muted state of the player.\n     *\n     * @promise SetMutedPromise\n     * @fulfill {boolean} The muted state that was set.\n     */\n    /**\n     * Set the muted state of the player. When set to `true`, the player\n     * volume will be muted.\n     *\n     * @param {boolean} muted\n     * @return {SetMutedPromise}\n     */\n    setMuted(muted) {\n        return this.set('muted', muted);\n    }\n\n    /**\n     * A promise to get the muted state of the player.\n     *\n     * @promise GetMutedPromise\n     * @fulfill {boolean} Whether or not the player is muted.\n     */\n    /**\n     * Get the muted state of the player.\n     *\n     * @return {GetMutedPromise}\n     */\n    getMuted() {\n        return this.get('muted');\n    }\n\n    /**\n     * A promise to get the paused state of the player.\n     *\n     * @promise GetLoopPromise\n     * @fulfill {boolean} Whether or not the video is paused.\n     */\n    /**\n     * Get the paused state of the player.\n     *\n     * @return {GetLoopPromise}\n     */\n    getPaused() {\n        return this.get('paused');\n    }\n\n    /**\n     * A promise to get the playback rate of the player.\n     *\n     * @promise GetPlaybackRatePromise\n     * @fulfill {number} The playback rate of the player on a scale from 0.5 to 2.\n     */\n    /**\n     * Get the playback rate of the player on a scale from `0.5` to `2`.\n     *\n     * @return {GetPlaybackRatePromise}\n     */\n    getPlaybackRate() {\n        return this.get('playbackRate');\n    }\n\n    /**\n     * A promise to set the playbackrate of the player.\n     *\n     * @promise SetPlaybackRatePromise\n     * @fulfill {number} The playback rate was set.\n     * @reject {RangeError} The playback rate was less than 0.5 or greater than 2.\n     */\n    /**\n     * Set the playback rate of the player on a scale from `0.5` to `2`. When set\n     * via the API, the playback rate will not be synchronized to other\n     * players or stored as the viewer's preference.\n     *\n     * @param {number} playbackRate\n     * @return {SetPlaybackRatePromise}\n     */\n    setPlaybackRate(playbackRate) {\n        return this.set('playbackRate', playbackRate);\n    }\n\n    /**\n     * A promise to get the played property of the video.\n     *\n     * @promise GetPlayedPromise\n     * @fulfill {Array} Played Timeranges converted to an Array.\n     */\n    /**\n     * Get the played property of the video.\n     *\n     * @return {GetPlayedPromise}\n     */\n    getPlayed() {\n        return this.get('played');\n    }\n\n    /**\n     * A promise to get the seekable property of the video.\n     *\n     * @promise GetSeekablePromise\n     * @fulfill {Array} Seekable Timeranges converted to an Array.\n     */\n    /**\n     * Get the seekable property of the video.\n     *\n     * @return {GetSeekablePromise}\n     */\n    getSeekable() {\n        return this.get('seekable');\n    }\n\n    /**\n     * A promise to get the seeking property of the player.\n     *\n     * @promise GetSeekingPromise\n     * @fulfill {boolean} Whether or not the player is currently seeking.\n     */\n    /**\n     * Get if the player is currently seeking.\n     *\n     * @return {GetSeekingPromise}\n     */\n    getSeeking() {\n        return this.get('seeking');\n    }\n\n    /**\n     * A promise to get the text tracks of a video.\n     *\n     * @promise GetTextTracksPromise\n     * @fulfill {VimeoTextTrack[]} The text tracks associated with the video.\n     */\n    /**\n     * Get an array of the text tracks that exist for the video.\n     *\n     * @return {GetTextTracksPromise}\n     */\n    getTextTracks() {\n        return this.get('textTracks');\n    }\n\n    /**\n     * A promise to get the embed code for the video.\n     *\n     * @promise GetVideoEmbedCodePromise\n     * @fulfill {string} The `<iframe>` embed code for the video.\n     */\n    /**\n     * Get the `<iframe>` embed code for the video.\n     *\n     * @return {GetVideoEmbedCodePromise}\n     */\n    getVideoEmbedCode() {\n        return this.get('videoEmbedCode');\n    }\n\n    /**\n     * A promise to get the id of the video.\n     *\n     * @promise GetVideoIdPromise\n     * @fulfill {number} The id of the video.\n     */\n    /**\n     * Get the id of the video.\n     *\n     * @return {GetVideoIdPromise}\n     */\n    getVideoId() {\n        return this.get('videoId');\n    }\n\n    /**\n     * A promise to get the title of the video.\n     *\n     * @promise GetVideoTitlePromise\n     * @fulfill {number} The title of the video.\n     */\n    /**\n     * Get the title of the video.\n     *\n     * @return {GetVideoTitlePromise}\n     */\n    getVideoTitle() {\n        return this.get('videoTitle');\n    }\n\n    /**\n     * A promise to get the native width of the video.\n     *\n     * @promise GetVideoWidthPromise\n     * @fulfill {number} The native width of the video.\n     */\n    /**\n     * Get the native width of the currently‐playing video. The width of\n     * the highest‐resolution available will be used before playback begins.\n     *\n     * @return {GetVideoWidthPromise}\n     */\n    getVideoWidth() {\n        return this.get('videoWidth');\n    }\n\n    /**\n     * A promise to get the native height of the video.\n     *\n     * @promise GetVideoHeightPromise\n     * @fulfill {number} The native height of the video.\n     */\n    /**\n     * Get the native height of the currently‐playing video. The height of\n     * the highest‐resolution available will be used before playback begins.\n     *\n     * @return {GetVideoHeightPromise}\n     */\n    getVideoHeight() {\n        return this.get('videoHeight');\n    }\n\n    /**\n     * A promise to get the vimeo.com url for the video.\n     *\n     * @promise GetVideoUrlPromise\n     * @fulfill {number} The vimeo.com url for the video.\n     * @reject {PrivacyError} The url isn’t available because of the video’s privacy setting.\n     */\n    /**\n     * Get the vimeo.com url for the video.\n     *\n     * @return {GetVideoUrlPromise}\n     */\n    getVideoUrl() {\n        return this.get('videoUrl');\n    }\n\n    /**\n     * A promise to get the volume level of the player.\n     *\n     * @promise GetVolumePromise\n     * @fulfill {number} The volume level of the player on a scale from 0 to 1.\n     */\n    /**\n     * Get the current volume level of the player on a scale from `0` to `1`.\n     *\n     * Most mobile devices do not support an independent volume from the\n     * system volume. In those cases, this method will always return `1`.\n     *\n     * @return {GetVolumePromise}\n     */\n    getVolume() {\n        return this.get('volume');\n    }\n\n    /**\n     * A promise to set the volume level of the player.\n     *\n     * @promise SetVolumePromise\n     * @fulfill {number} The volume was set.\n     * @reject {RangeError} The volume was less than 0 or greater than 1.\n     */\n    /**\n     * Set the volume of the player on a scale from `0` to `1`. When set\n     * via the API, the volume level will not be synchronized to other\n     * players or stored as the viewer’s preference.\n     *\n     * Most mobile devices do not support setting the volume. An error will\n     * *not* be triggered in that situation.\n     *\n     * @param {number} volume\n     * @return {SetVolumePromise}\n     */\n    setVolume(volume) {\n        return this.set('volume', volume);\n    }\n}\n\n// Setup embed only if this is not a node environment\nif (!isNode) {\n    initializeEmbeds();\n    resizeEmbeds();\n}\n\nexport default Player;\n"],"names":["isNode","global","toString","call","getMethodName","prop","type","indexOf","toLowerCase","substr","toUpperCase","isDomElement","element","Boolean","nodeType","ownerDocument","defaultView","isInteger","value","isNaN","parseFloat","isFinite","Math","floor","isVimeoUrl","url","test","getVimeoUrl","oEmbedParameters","id","idOrUrl","Error","replace","TypeError","arrayIndexOfSupport","Array","prototype","postMessageSupport","window","postMessage","self","WeakMap","hasOwnProperty","Object","defineProperty","object","name","configurable","writable","genId","arguments","length","key","checkInstance","isObject","entry","_id","x","methodName","prefix","rand","random","substring","this","UMD","context","definition","module","exports","DEF","builtInProp","cycle","scheduling_queue","ToString","timer","setImmediate","fn","setTimeout","obj","val","config","err","Queue","first","last","item","Item","next","add","drain","f","schedule","isThenable","o","_then","o_type","then","notify","i","chain","notifyIsolated","state","success","failure","cb","ret","reject","msg","promise","resolve","triggered","def","def_wrapper","MakeDefWrapper","$resolve$","apply","$reject$","iteratePromises","Constructor","arr","resolver","rejecter","idx","IIFE","$resolver$","MakeDef","Promise","executor","__NPO__","constructor","extractChain","push","$catch$","publicResolve","publicReject","PromisePrototype","Promise$resolve","Promise$reject","Promise$all","len","msgs","count","Promise$race","callbackMap","storeCallback","player","callback","playerCallbacks","get","set","getCallbacks","removeCallback","index","splice","shiftCallbacks","shift","swapCallbacks","oldElement","newElement","delete","getOEmbedParameters","defaults","reduce","params","param","getAttribute","createEmbed","html","querySelector","div","document","createElement","innerHTML","appendChild","firstChild","setAttribute","getOEmbedData","videoUrl","encodeURIComponent","xhr","XDomainRequest","XMLHttpRequest","open","onload","status","json","JSON","parse","responseText","domain_status_code","error","onerror","send","initializeEmbeds","parent","elements","slice","querySelectorAll","handleError","console","forEach","data","catch","resizeEmbeds","VimeoPlayerResizeEmbeds_","onMessage","event","origin","iframes","contentWindow","source","space","parentElement","style","paddingBottom","bottom","addEventListener","parseMessageData","warn","method","message","undefined","ieVersion","navigator","userAgent","stringify","processData","callbacks","promises","e","playerMap","readyMap","Player","options","jQuery","getElementById","nodeName","iframe","has","_window","readyPromise","_onMessage","isError","isReadyError","isReadyEvent","isPingResponse","_originalElement","args","ready","eventName","callMethod","lastCallback","time","language","kind","removeAttribute","parentNode","removeChild","removeEventListener","autopause","color","currentTime","loop","muted","playbackRate","volume"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;;;;EAIA;;;;;EAIA;EACO,IAAMA,MAAM,GAAG,OAAOC,MAAP,KAAkB,WAAlB,IACnB,EAAD,CAAKC,QAAL,CAAcC,IAAd,CAAmBF,MAAnB,MAA+B,iBAD1B;EAGP;;;;;;;;EAOO,SAASG,aAAT,CAAuBC,IAAvB,EAA6BC,IAA7B,EAAmC;EACtC,MAAID,IAAI,CAACE,OAAL,CAAaD,IAAI,CAACE,WAAL,EAAb,MAAqC,CAAzC,EAA4C;EACxC,WAAOH,IAAP;EACH;;EAED,mBAAUC,IAAI,CAACE,WAAL,EAAV,SAA+BH,IAAI,CAACI,MAAL,CAAY,CAAZ,EAAe,CAAf,EAAkBC,WAAlB,EAA/B,SAAiEL,IAAI,CAACI,MAAL,CAAY,CAAZ,CAAjE;EACH;EAED;;;;;;;EAMO,SAASE,YAAT,CAAsBC,OAAtB,EAA+B;EAClC,SAAOC,OAAO,CACVD,OAAO,IAAIA,OAAO,CAACE,QAAR,KAAqB,CAAhC,IAAqC,cAAcF,OAAnD,IACAA,OAAO,CAACG,aADR,IACyBH,OAAO,CAACG,aAAR,CAAsBC,WAFrC,CAAd;EAIH;EAED;;;;;;;;;EAQO,SAASC,SAAT,CAAmBC,KAAnB,EAA0B;EAC7B;EACA,SAAO,CAACC,KAAK,CAACC,UAAU,CAACF,KAAD,CAAX,CAAN,IAA6BG,QAAQ,CAACH,KAAD,CAArC,IAAgDI,IAAI,CAACC,KAAL,CAAWL,KAAX,KAAqBA,KAA5E;EACH;EAED;;;;;;;EAMO,SAASM,UAAT,CAAoBC,GAApB,EAAyB;EAC5B,SAAQ,oDAAD,CAAuDC,IAAvD,CAA4DD,GAA5D,CAAP;EACH;EAED;;;;;;;;EAOO,SAASE,WAAT,GAA4C;EAAA,MAAvBC,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EAAmBoH,MAAnB,CAAP;EACH;;;;;;;EAIL,IAAI,CAACzQ,MAAL,EAAa;EACTiM,EAAAA,gBAAgB;EAChBU,EAAAA,YAAY;EACf;;;;;;;;"}
\ No newline at end of file
diff --git a/dist/player.min.js b/dist/player.min.js
--- a/dist/player.min.js
+++ b/dist/player.min.js
@@ -1,2 +1,2 @@
 /*! @vimeo/player v2.10.1 | (c) 2020 Vimeo | MIT License | https://github.com/vimeo/player.js */
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e=e||self).Vimeo=e.Vimeo||{},e.Vimeo.Player=t())}(this,function(){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var e="undefined"!=typeof global&&"[object global]"==={}.toString.call(global);function i(e,t){return 0===e.indexOf(t.toLowerCase())?e:"".concat(t.toLowerCase()).concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}function s(e){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(e)}function o(e){var t,n=0<arguments.length&&void 0!==e?e:{},r=n.id,o=n.url,i=r||o;if(!i)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(t=i,!isNaN(parseFloat(t))&&isFinite(t)&&Math.floor(t)==t)return"https://vimeo.com/".concat(i);if(s(i))return i.replace("http:","https:");if(r)throw new TypeError("“".concat(r,"” is not a valid video id."));throw new TypeError("“".concat(i,"” is not a vimeo.com url."))}var t=void 0!==Array.prototype.indexOf,n="undefined"!=typeof window&&void 0!==window.postMessage;if(!(e||t&&n))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(e){if(!e.WeakMap){var n=Object.prototype.hasOwnProperty,r=function(e,t,n){Object.defineProperty?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}):e[t]=n};e.WeakMap=(r(t.prototype,"delete",function(e){if(o(this,"delete"),!a(e))return!1;var t=e[this._id];return!(!t||t[0]!==e||(delete e[this._id],0))}),r(t.prototype,"get",function(e){if(o(this,"get"),a(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}}),r(t.prototype,"has",function(e){if(o(this,"has"),!a(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)}),r(t.prototype,"set",function(e,t){if(o(this,"set"),!a(e))throw new TypeError("Invalid value used as weak map key");var n=e[this._id];return n&&n[0]===e?n[1]=t:r(e,this._id,[e,t]),this}),r(t,"_polyfill",!0),t)}function t(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(r(this,"_id","_WeakMap"+"_"+i()+"."+i()),0<arguments.length)throw new TypeError("WeakMap iterable is not supported")}function o(e,t){if(!a(e)||!n.call(e,"_id"))throw new TypeError(t+" method called on incompatible receiver "+typeof e)}function i(){return Math.random().toString().substring(2)}function a(e){return Object(e)===e}}("undefined"!=typeof self?self:"undefined"!=typeof window?window:a);var u,l=(function(e){var t,n,r;r=function(){var t,n,r,o,i,a,e=Object.prototype.toString,u="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(e){t=function(e,t,n){return e[t]=n,e}}function c(e,t){this.fn=e,this.self=t,this.next=void 0}function s(e,t){r.add(e,t),n=n||u(r.drain)}function l(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function f(){for(var e=0;e<this.chain.length;e++)d(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function d(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=l(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}function h(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,0<t.chain.length&&s(f,t))}function v(e,n,r,o){for(var t=0;t<n.length;t++)!function(t){e.resolve(n[t]).then(function(e){r(t,e)},o)}(t)}function p(e){this.def=e,this.triggered=!1}function y(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function m(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var r=new y(this);this.then=function(e,t){var n={success:"function"!=typeof e||e,failure:"function"==typeof t&&t};return n.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");n.resolve=e,n.reject=t}),r.chain.push(n),0!==r.state&&s(f,r),n.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){(function e(n){var r,o=this;if(!o.triggered){o.triggered=!0,o.def&&(o=o.def);try{(r=l(n))?s(function(){var t=new p(o);try{r.call(n,function(){e.apply(t,arguments)},function(){h.apply(t,arguments)})}catch(e){h.call(t,e)}}):(o.msg=n,o.state=1,0<o.chain.length&&s(f,o))}catch(e){h.call(new p(o),e)}}}).call(r,e)},function(e){h.call(r,e)})}catch(e){h.call(r,e)}}var g=t({},"constructor",m,!(r={add:function(e,t){a=new c(e,t),i?i.next=a:o=a,i=a,a=void 0},drain:function(){var e=o;for(o=i=n=void 0;e;)e.fn.call(e.self),e=e.next}}));return t(m.prototype=g,"__NPO__",0,!1),t(m,"resolve",function(n){return n&&"object"==typeof n&&1===n.__NPO__?n:new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");e(n)})}),t(m,"reject",function(n){return new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");t(n)})}),t(m,"all",function(t){var a=this;return"[object Array]"!=e.call(t)?a.reject(TypeError("Not an array")):0===t.length?a.resolve([]):new a(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");var r=t.length,o=Array(r),i=0;v(a,t,function(e,t){o[e]=t,++i===r&&n(o)},e)})}),t(m,"race",function(t){var r=this;return"[object Array]"!=e.call(t)?r.reject(TypeError("Not an array")):new r(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");v(r,t,function(e,t){n(t)},e)})}),m},(n=a)[t="Promise"]=n[t]||r(),e.exports&&(e.exports=n[t])}(u={exports:{}},u.exports),u.exports),f=new WeakMap;function c(e,t,n){var r=f.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),f.set(e.element,r)}function d(e,t){return(f.get(e.element)||{})[t]||[]}function h(e,t,n){var r=f.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],f.set(e.element,r),!0;var o=r[t].indexOf(n);return-1!==o&&r[t].splice(o,1),f.set(e.element,r),r[t]&&0===r[t].length}var v=["autopause","autoplay","background","byline","color","controls","dnt","height","id","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","texttrack","title","transparent","url","width"];function p(r,e){var t=1<arguments.length&&void 0!==e?e:{};return v.reduce(function(e,t){var n=r.getAttribute("data-vimeo-".concat(t));return!n&&""!==n||(e[t]=""===n?1:n),e},t)}function y(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function m(i,e,t){var a=1<arguments.length&&void 0!==e?e:{},u=2<arguments.length?t:void 0;return new Promise(function(t,n){if(!s(i))throw new TypeError("“".concat(i,"” is not a vimeo.com url."));var e="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(i));for(var r in a)a.hasOwnProperty(r)&&(e+="&".concat(r,"=").concat(encodeURIComponent(a[r])));var o=new("XDomainRequest"in window?XDomainRequest:XMLHttpRequest);o.open("GET",e,!0),o.onload=function(){if(404!==o.status)if(403!==o.status)try{var e=JSON.parse(o.responseText);if(403===e.domain_status_code)return y(e,u),void n(new Error("“".concat(i,"” is not embeddable.")));t(e)}catch(e){n(e)}else n(new Error("“".concat(i,"” is not embeddable.")));else n(new Error("“".concat(i,"” was not found.")))},o.onerror=function(){var e=o.status?" (".concat(o.status,")"):"";n(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},o.send()})}function g(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return console.warn(e),{}}return e}function w(e,t,n){if(e.element.contentWindow&&e.element.contentWindow.postMessage){var r={method:t};void 0!==n&&(r.value=n);var o=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));8<=o&&o<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin)}}function b(n,r){var t,e=[];if((r=g(r)).event){if("error"===r.event)d(n,r.data.method).forEach(function(e){var t=new Error(r.data.message);t.name=r.data.name,e.reject(t),h(n,r.data.method,e)});e=d(n,"event:".concat(r.event)),t=r.data}else if(r.method){var o=function(e,t){var n=d(e,t);if(n.length<1)return!1;var r=n.shift();return h(e,t,r),r}(n,r.method);o&&(e.push(o),t=r.value)}e.forEach(function(e){try{if("function"==typeof e)return void e.call(n,t);e.resolve(t)}catch(e){}})}var k=new WeakMap,E=new WeakMap,Player=function(){function Player(u){var e,c=this,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Player),window.jQuery&&u instanceof jQuery&&(1<u.length&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),u=u[0]),"undefined"!=typeof document&&"string"==typeof u&&(u=document.getElementById(u)),e=u,!Boolean(e&&1===e.nodeType&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==u.nodeName){var n=u.querySelector("iframe");n&&(u=n)}if("IFRAME"===u.nodeName&&!s(u.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(k.has(u))return k.get(u);this._window=u.ownerDocument.defaultView,this.element=u,this.origin="*";var r=new l(function(i,a){if(c._onMessage=function(e){if(s(e.origin)&&c.element.contentWindow===e.source){"*"===c.origin&&(c.origin=e.origin);var t=g(e.data);if(t&&"error"===t.event&&t.data&&"ready"===t.data.method){var n=new Error(t.data.message);return n.name=t.data.name,void a(n)}var r=t&&"ready"===t.event,o=t&&"ping"===t.method;if(r||o)return c.element.setAttribute("data-ready","true"),void i();b(c,t)}},c._window.addEventListener("message",c._onMessage),"IFRAME"!==c.element.nodeName){var e=p(u,t);m(o(e),e,u).then(function(e){var t,n,r,o=y(e,u);return c.element=o,c._originalElement=u,t=u,n=o,r=f.get(t),f.set(n,r),f.delete(t),k.set(c.element,c),e}).catch(a)}});return E.set(this,r),k.set(this.element,this),"IFRAME"===this.element.nodeName&&w(this,"ping"),this}var e,t,n;return e=Player,(t=[{key:"callMethod",value:function(n,e){var r=this,o=1<arguments.length&&void 0!==e?e:{};return new l(function(e,t){return r.ready().then(function(){c(r,n,{resolve:e,reject:t}),w(r,n,o)}).catch(t)})}},{key:"get",value:function(n){var r=this;return new l(function(e,t){return n=i(n,"get"),r.ready().then(function(){c(r,n,{resolve:e,reject:t}),w(r,n)}).catch(t)})}},{key:"set",value:function(n,r){var o=this;return new l(function(e,t){if(n=i(n,"set"),null==r)throw new TypeError("There must be a value to set.");return o.ready().then(function(){c(o,n,{resolve:e,reject:t}),w(o,n,r)}).catch(t)})}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===d(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch(function(){}),c(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");h(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch(function(e){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=E.get(this)||new l(function(e,t){t(new Error("Unknown player. Probably unloaded."))});return l.resolve(e)}},{key:"addCuePoint",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:{};return this.callMethod("addCuePoint",{time:e,data:n})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var t=this;return new l(function(e){E.delete(t),k.delete(t.element),t._originalElement&&(k.delete(t._originalElement),t._originalElement.removeAttribute("data-vimeo-initialized")),t.element&&"IFRAME"===t.element.nodeName&&t.element.parentNode&&t.element.parentNode.removeChild(t.element),t._window.removeEventListener("message",t._onMessage),e()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}])&&r(e.prototype,t),n&&r(e,n),Player}();return e||(function(e){function n(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))}var t=0<arguments.length&&void 0!==e?e:document;[].slice.call(t.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")).forEach(function(t){try{if(null!==t.getAttribute("data-vimeo-defer"))return;var e=p(t);m(o(e),e,t).then(function(e){return y(e,t)}).catch(n)}catch(e){n(e)}})}(),function(e){var r=0<arguments.length&&void 0!==e?e:document;if(!window.VimeoPlayerResizeEmbeds_){window.VimeoPlayerResizeEmbeds_=!0;window.addEventListener("message",function(e){if(s(e.origin)&&e.data&&"spacechange"===e.data.event)for(var t=r.querySelectorAll("iframe"),n=0;n<t.length;n++)if(t[n].contentWindow===e.source){t[n].parentElement.style.paddingBottom="".concat(e.data.data[0].bottom,"px");break}})}}()),Player});
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e=e||self).Vimeo=e.Vimeo||{},e.Vimeo.Player=t())}(this,function(){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var e="undefined"!=typeof global&&"[object global]"==={}.toString.call(global);function i(e,t){return 0===e.indexOf(t.toLowerCase())?e:"".concat(t.toLowerCase()).concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}function s(e){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(e)}function o(e){var t,n=0<arguments.length&&void 0!==e?e:{},r=n.id,o=n.url,i=r||o;if(!i)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(t=i,!isNaN(parseFloat(t))&&isFinite(t)&&Math.floor(t)==t)return"https://vimeo.com/".concat(i);if(s(i))return i.replace("http:","https:");if(r)throw new TypeError("“".concat(r,"” is not a valid video id."));throw new TypeError("“".concat(i,"” is not a vimeo.com url."))}var t=void 0!==Array.prototype.indexOf,n="undefined"!=typeof window&&void 0!==window.postMessage;if(!(e||t&&n))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(e){if(!e.WeakMap){var n=Object.prototype.hasOwnProperty,r=function(e,t,n){Object.defineProperty?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}):e[t]=n};e.WeakMap=(r(t.prototype,"delete",function(e){if(o(this,"delete"),!a(e))return!1;var t=e[this._id];return!(!t||t[0]!==e||(delete e[this._id],0))}),r(t.prototype,"get",function(e){if(o(this,"get"),a(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}}),r(t.prototype,"has",function(e){if(o(this,"has"),!a(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)}),r(t.prototype,"set",function(e,t){if(o(this,"set"),!a(e))throw new TypeError("Invalid value used as weak map key");var n=e[this._id];return n&&n[0]===e?n[1]=t:r(e,this._id,[e,t]),this}),r(t,"_polyfill",!0),t)}function t(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(r(this,"_id","_WeakMap"+"_"+i()+"."+i()),0<arguments.length)throw new TypeError("WeakMap iterable is not supported")}function o(e,t){if(!a(e)||!n.call(e,"_id"))throw new TypeError(t+" method called on incompatible receiver "+typeof e)}function i(){return Math.random().toString().substring(2)}function a(e){return Object(e)===e}}("undefined"!=typeof self?self:"undefined"!=typeof window?window:a);var u,l=(function(e){var t,n,r;r=function(){var t,n,r,o,i,a,e=Object.prototype.toString,u="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(e){t=function(e,t,n){return e[t]=n,e}}function c(e,t){this.fn=e,this.self=t,this.next=void 0}function s(e,t){r.add(e,t),n=n||u(r.drain)}function l(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function f(){for(var e=0;e<this.chain.length;e++)d(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function d(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=l(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}function h(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,0<t.chain.length&&s(f,t))}function v(e,n,r,o){for(var t=0;t<n.length;t++)!function(t){e.resolve(n[t]).then(function(e){r(t,e)},o)}(t)}function p(e){this.def=e,this.triggered=!1}function y(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function m(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var r=new y(this);this.then=function(e,t){var n={success:"function"!=typeof e||e,failure:"function"==typeof t&&t};return n.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");n.resolve=e,n.reject=t}),r.chain.push(n),0!==r.state&&s(f,r),n.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){(function e(n){var r,o=this;if(!o.triggered){o.triggered=!0,o.def&&(o=o.def);try{(r=l(n))?s(function(){var t=new p(o);try{r.call(n,function(){e.apply(t,arguments)},function(){h.apply(t,arguments)})}catch(e){h.call(t,e)}}):(o.msg=n,o.state=1,0<o.chain.length&&s(f,o))}catch(e){h.call(new p(o),e)}}}).call(r,e)},function(e){h.call(r,e)})}catch(e){h.call(r,e)}}var g=t({},"constructor",m,!(r={add:function(e,t){a=new c(e,t),i?i.next=a:o=a,i=a,a=void 0},drain:function(){var e=o;for(o=i=n=void 0;e;)e.fn.call(e.self),e=e.next}}));return t(m.prototype=g,"__NPO__",0,!1),t(m,"resolve",function(n){return n&&"object"==typeof n&&1===n.__NPO__?n:new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");e(n)})}),t(m,"reject",function(n){return new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");t(n)})}),t(m,"all",function(t){var a=this;return"[object Array]"!=e.call(t)?a.reject(TypeError("Not an array")):0===t.length?a.resolve([]):new a(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");var r=t.length,o=Array(r),i=0;v(a,t,function(e,t){o[e]=t,++i===r&&n(o)},e)})}),t(m,"race",function(t){var r=this;return"[object Array]"!=e.call(t)?r.reject(TypeError("Not an array")):new r(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");v(r,t,function(e,t){n(t)},e)})}),m},(n=a)[t="Promise"]=n[t]||r(),e.exports&&(e.exports=n[t])}(u={exports:{}},u.exports),u.exports),f=new WeakMap;function c(e,t,n){var r=f.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),f.set(e.element,r)}function d(e,t){return(f.get(e.element)||{})[t]||[]}function h(e,t,n){var r=f.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],f.set(e.element,r),!0;var o=r[t].indexOf(n);return-1!==o&&r[t].splice(o,1),f.set(e.element,r),r[t]&&0===r[t].length}var v=["autopause","autoplay","background","byline","color","controls","dnt","height","id","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","texttrack","title","transparent","url","width"];function p(r,e){var t=1<arguments.length&&void 0!==e?e:{};return v.reduce(function(e,t){var n=r.getAttribute("data-vimeo-".concat(t));return!n&&""!==n||(e[t]=""===n?1:n),e},t)}function y(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function m(i,e,t){var a=1<arguments.length&&void 0!==e?e:{},u=2<arguments.length?t:void 0;return new Promise(function(t,n){if(!s(i))throw new TypeError("“".concat(i,"” is not a vimeo.com url."));var e="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(i));for(var r in a)a.hasOwnProperty(r)&&(e+="&".concat(r,"=").concat(encodeURIComponent(a[r])));var o=new("XDomainRequest"in window?XDomainRequest:XMLHttpRequest);o.open("GET",e,!0),o.onload=function(){if(404!==o.status)if(403!==o.status)try{var e=JSON.parse(o.responseText);if(403===e.domain_status_code)return y(e,u),void n(new Error("“".concat(i,"” is not embeddable.")));t(e)}catch(e){n(e)}else n(new Error("“".concat(i,"” is not embeddable.")));else n(new Error("“".concat(i,"” was not found.")))},o.onerror=function(){var e=o.status?" (".concat(o.status,")"):"";n(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},o.send()})}function g(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return console.warn(e),{}}return e}function w(e,t,n){if(e.element.contentWindow&&e.element.contentWindow.postMessage){var r={method:t};void 0!==n&&(r.value=n);var o=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));8<=o&&o<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin)}}function b(n,r){var t,e=[];if((r=g(r)).event){if("error"===r.event)d(n,r.data.method).forEach(function(e){var t=new Error(r.data.message);t.name=r.data.name,e.reject(t),h(n,r.data.method,e)});e=d(n,"event:".concat(r.event)),t=r.data}else if(r.method){var o=function(e,t){var n=d(e,t);if(n.length<1)return!1;var r=n.shift();return h(e,t,r),r}(n,r.method);o&&(e.push(o),t=r.value)}e.forEach(function(e){try{if("function"==typeof e)return void e.call(n,t);e.resolve(t)}catch(e){}})}var k=new WeakMap,E=new WeakMap,Player=function(){function Player(u){var e,c=this,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Player),window.jQuery&&u instanceof jQuery&&(1<u.length&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),u=u[0]),"undefined"!=typeof document&&"string"==typeof u&&(u=document.getElementById(u)),e=u,!Boolean(e&&1===e.nodeType&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==u.nodeName){var n=u.querySelector("iframe");n&&(u=n)}if("IFRAME"===u.nodeName&&!s(u.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(k.has(u))return k.get(u);this._window=u.ownerDocument.defaultView,this.element=u,this.origin="*";var r=new l(function(i,a){if(c._onMessage=function(e){if(s(e.origin)&&c.element.contentWindow===e.source){"*"===c.origin&&(c.origin=e.origin);var t=g(e.data);if(t&&"error"===t.event&&t.data&&"ready"===t.data.method){var n=new Error(t.data.message);return n.name=t.data.name,void a(n)}var r=t&&"ready"===t.event,o=t&&"ping"===t.method;if(r||o)return c.element.setAttribute("data-ready","true"),void i();b(c,t)}},c._window.addEventListener("message",c._onMessage),"IFRAME"!==c.element.nodeName){var e=p(u,t);m(o(e),e,u).then(function(e){var t,n,r,o=y(e,u);return c.element=o,c._originalElement=u,t=u,n=o,r=f.get(t),f.set(n,r),f.delete(t),k.set(c.element,c),e}).catch(a)}});return E.set(this,r),k.set(this.element,this),"IFRAME"===this.element.nodeName&&w(this,"ping"),this}var e,t,n;return e=Player,(t=[{key:"callMethod",value:function(n,e){var r=this,o=1<arguments.length&&void 0!==e?e:{};return new l(function(e,t){return r.ready().then(function(){c(r,n,{resolve:e,reject:t}),w(r,n,o)}).catch(t)})}},{key:"get",value:function(n){var r=this;return new l(function(e,t){return n=i(n,"get"),r.ready().then(function(){c(r,n,{resolve:e,reject:t}),w(r,n)}).catch(t)})}},{key:"set",value:function(n,r){var o=this;return new l(function(e,t){if(n=i(n,"set"),null==r)throw new TypeError("There must be a value to set.");return o.ready().then(function(){c(o,n,{resolve:e,reject:t}),w(o,n,r)}).catch(t)})}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===d(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch(function(){}),c(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");h(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch(function(e){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=E.get(this)||new l(function(e,t){t(new Error("Unknown player. Probably unloaded."))});return l.resolve(e)}},{key:"addCuePoint",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:{};return this.callMethod("addCuePoint",{time:e,data:n})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var t=this;return new l(function(e){E.delete(t),k.delete(t.element),t._originalElement&&(k.delete(t._originalElement),t._originalElement.removeAttribute("data-vimeo-initialized")),t.element&&"IFRAME"===t.element.nodeName&&t.element.parentNode&&t.element.parentNode.removeChild(t.element),t._window.removeEventListener("message",t._onMessage),e()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}])&&r(e.prototype,t),n&&r(e,n),Player}();return e||(function(e){function n(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))}var t=0<arguments.length&&void 0!==e?e:document;[].slice.call(t.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")).forEach(function(t){try{if(null!==t.getAttribute("data-vimeo-defer"))return;var e=p(t);m(o(e),e,t).then(function(e){return y(e,t)}).catch(n)}catch(e){n(e)}})}(),function(e){var r=0<arguments.length&&void 0!==e?e:document;if(!window.VimeoPlayerResizeEmbeds_){window.VimeoPlayerResizeEmbeds_=!0;window.addEventListener("message",function(e){if(s(e.origin)&&e.data&&"spacechange"===e.data.event)for(var t=r.querySelectorAll("iframe"),n=0;n<t.length;n++)if(t[n].contentWindow===e.source){t[n].parentElement.style.paddingBottom="".concat(e.data.data[0].bottom,"px");break}})}}()),Player});
diff --git a/dist/player.min.js.map b/dist/player.min.js.map
--- a/dist/player.min.js.map
+++ b/dist/player.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["src/lib/functions.js","src/lib/compatibility-check.js","node_modules/weakmap-polyfill/weakmap-polyfill.js","node_modules/native-promise-only/lib/npo.src.js","src/lib/callbacks.js","src/lib/embed.js","src/lib/postmessage.js","src/player.js"],"names":["isNode","global","toString","call","getMethodName","prop","type","indexOf","toLowerCase","concat","substr","toUpperCase","isVimeoUrl","url","test","getVimeoUrl","value","oEmbedParameters","arguments","length","undefined","id","idOrUrl","Error","isNaN","parseFloat","isFinite","Math","floor","replace","TypeError","arrayIndexOfSupport","Array","prototype","postMessageSupport","window","postMessage","self","WeakMap","hasOwnProperty","Object","defineProperty","object","name","configurable","writable","key","checkInstance","this","isObject","entry","_id","rand","x","methodName","random","substring","context","definition","builtInProp","cycle","scheduling_queue","first","last","item","ToString","timer","setImmediate","fn","setTimeout","obj","val","config","err","Item","next","schedule","add","drain","isThenable","o","_then","o_type","then","notify","i","chain","notifyIsolated","state","success","failure","cb","ret","reject","msg","promise","resolve","triggered","def","iteratePromises","Constructor","arr","resolver","rejecter","idx","MakeDefWrapper","MakeDef","Promise","executor","__NPO__","constructor","push","def_wrapper","apply","PromisePrototype","f","len","msgs","count","module","exports","callbackMap","storeCallback","player","callback","playerCallbacks","get","element","set","getCallbacks","removeCallback","index","splice","getOEmbedParameters","defaults","reduce","params","param","getAttribute","createEmbed","_ref","html","querySelector","div","document","createElement","innerHTML","appendChild","firstChild","setAttribute","getOEmbedData","videoUrl","encodeURIComponent","xhr","XDomainRequest","XMLHttpRequest","open","onload","status","json","JSON","parse","responseText","domain_status_code","error","onerror","send","parseMessageData","data","console","warn","method","contentWindow","message","ieVersion","navigator","userAgent","stringify","origin","processData","callbacks","event","forEach","shift","shiftCallbacks","e","playerMap","readyMap","Player","_this","options","_classCallCheck","jQuery","getElementById","Boolean","nodeType","ownerDocument","defaultView","nodeName","iframe","has","_window","readyPromise","_onMessage","source","isReadyEvent","isPingResponse","addEventListener","oldElement","newElement","_originalElement","delete","catch","_this2","args","ready","_this3","_this4","eventName","callMethod","time","language","kind","_this5","removeAttribute","parentNode","removeChild","removeEventListener","autopause","color","currentTime","loop","muted","playbackRate","volume","handleError","parent","slice","querySelectorAll","initializeEmbeds","VimeoPlayerResizeEmbeds_","iframes","parentElement","style","paddingBottom","bottom","resizeEmbeds"],"mappings":";8XASO,IAAMA,EAA2B,oBAAXC,QACI,oBAA9B,GAAIC,SAASC,KAAKF,QASd,SAASG,EAAcC,EAAMC,GAChC,OAAyC,IAArCD,EAAKE,QAAQD,EAAKE,eACXH,EAGX,GAAAI,OAAUH,EAAKE,eAAfC,OAA+BJ,EAAKK,OAAO,EAAG,GAAGC,eAAjDF,OAAiEJ,EAAKK,OAAO,IAmC1E,SAASE,EAAWC,GACvB,MAAQ,qDAAsDC,KAAKD,GAUhE,SAASE,EAAT,GAA4C,IAtBzBC,EAsBEC,EAAuB,EAAAC,UAAAC,aAAAC,IAA5C,EAAA,EAAwC,GACrCC,EAAKJ,EAAiBI,GACtBR,EAAMI,EAAiBJ,IACvBS,EAAUD,GAAMR,EAEtB,IAAKS,EACD,MAAM,IAAIC,MAAM,+GAGpB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oBN,GAGnCuB,EAFYvI,EAAYyH,GAELA,EAAQT,GAAS5C,KAAK,SAACqF,GACtC,OAAO7B,EAAY6B,EAAMzC,KAC1BqF,MAAMuB,GAEb,MAAOvE,GACHuE,EAAYvE,ME+yBpB2E,GFpyBG,SAAA,GAAyC,IAAnBH,EAAmB,EAAA1N,UAAAC,aAAAC,IAAzC,EAAA,EAA+B4H,SAElC,IAAI7G,OAAO6M,yBAAX,CAGA7M,OAAO6M,0BAA2B,EA4BlC7M,OAAO4K,iBAAiB,UA1BN,SAAC1B,GACf,GAAKzK,EAAWyK,EAAMH,SAKjBG,EAAMb,MAA6B,gBAArBa,EAAMb,KAAKa,MAM9B,IAFA,IAAM4D,EAAUL,EAAOE,iBAAiB,UAE/BzJ,EAAI,EAAGA,EAAI4J,EAAQ9N,OAAQkE,IAChC,GAAI4J,EAAQ5J,GAAGuF,gBAAkBS,EAAMuB,OAAvC,CAMcqC,EAAQ5J,GAAG6J,cACnBC,MAAMC,cAAZ,GAAA3O,OAA+B4K,EAAMb,KAAKA,KAAK,GAAG6E,OAAlD,MAEA,UEwwBRC"}
\ No newline at end of file
+{"version":3,"sources":["src/lib/functions.js","src/lib/compatibility-check.js","node_modules/weakmap-polyfill/weakmap-polyfill.js","node_modules/native-promise-only/lib/npo.src.js","src/lib/callbacks.js","src/lib/embed.js","src/lib/postmessage.js","src/player.js"],"names":["isNode","global","toString","call","getMethodName","prop","type","indexOf","toLowerCase","concat","substr","toUpperCase","isVimeoUrl","url","test","getVimeoUrl","value","oEmbedParameters","arguments","length","undefined","id","idOrUrl","Error","isNaN","parseFloat","isFinite","Math","floor","replace","TypeError","arrayIndexOfSupport","Array","prototype","postMessageSupport","window","postMessage","self","WeakMap","hasOwnProperty","Object","defineProperty","object","name","configurable","writable","key","checkInstance","this","isObject","entry","_id","rand","x","methodName","random","substring","context","definition","builtInProp","cycle","scheduling_queue","first","last","item","ToString","timer","setImmediate","fn","setTimeout","obj","val","config","err","Item","next","schedule","add","drain","isThenable","o","_then","o_type","then","notify","i","chain","notifyIsolated","state","success","failure","cb","ret","reject","msg","promise","resolve","triggered","def","iteratePromises","Constructor","arr","resolver","rejecter","idx","MakeDefWrapper","MakeDef","Promise","executor","__NPO__","constructor","push","def_wrapper","apply","PromisePrototype","f","len","msgs","count","module","exports","callbackMap","storeCallback","player","callback","playerCallbacks","get","element","set","getCallbacks","removeCallback","index","splice","getOEmbedParameters","defaults","reduce","params","param","getAttribute","createEmbed","_ref","html","querySelector","div","document","createElement","innerHTML","appendChild","firstChild","setAttribute","getOEmbedData","videoUrl","encodeURIComponent","xhr","XDomainRequest","XMLHttpRequest","open","onload","status","json","JSON","parse","responseText","domain_status_code","error","onerror","send","parseMessageData","data","console","warn","method","contentWindow","message","ieVersion","navigator","userAgent","stringify","origin","processData","callbacks","event","forEach","shift","shiftCallbacks","e","playerMap","readyMap","Player","_this","options","_classCallCheck","jQuery","getElementById","Boolean","nodeType","ownerDocument","defaultView","nodeName","iframe","has","_window","readyPromise","_onMessage","source","isReadyEvent","isPingResponse","addEventListener","oldElement","newElement","_originalElement","delete","catch","_this2","args","ready","_this3","_this4","eventName","callMethod","time","language","kind","_this5","removeAttribute","parentNode","removeChild","removeEventListener","autopause","color","currentTime","loop","muted","playbackRate","volume","handleError","parent","slice","querySelectorAll","initializeEmbeds","VimeoPlayerResizeEmbeds_","iframes","parentElement","style","paddingBottom","bottom","resizeEmbeds"],"mappings":";8XASO,IAAMA,EAA2B,oBAAXC,QACI,oBAA9B,GAAIC,SAASC,KAAKF,QASd,SAASG,EAAcC,EAAMC,GAChC,OAAyC,IAArCD,EAAKE,QAAQD,EAAKE,eACXH,EAGX,GAAAI,OAAUH,EAAKE,eAAfC,OAA+BJ,EAAKK,OAAO,EAAG,GAAGC,eAAjDF,OAAiEJ,EAAKK,OAAO,IAmC1E,SAASE,EAAWC,GACvB,MAAQ,qDAAsDC,KAAKD,GAUhE,SAASE,EAAT,GAA4C,IAtBzBC,EAsBEC,EAAuB,EAAAC,U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ALf,IAAnBwE,EAAmB,EAAA1N,UAAAC,aAAAC,IAA7C,EAAA,EAAmC4H,SACrB,GAAG6F,MAAM1O,KAAKyO,EAAOE,iBAAiB,sCAQ9CxD,QAAQ,SAACvD,GACd,IAEI,GAAiD,OAA7CA,EAAQW,aAAa,oBACrB,OAGJ,IAAMF,EAASH,EAAoBN,GAGnCuB,EAFYvI,EAAYyH,GAELA,EAAQT,GAAS5C,KAAK,SAACqF,GACtC,OAAO7B,EAAY6B,EAAMzC,KAC1BqF,MAAMuB,GAEb,MAAOvE,GACHuE,EAAYvE,MEq1BpB2E,GF10BG,SAAA,GAAyC,IAAnBH,EAAmB,EAAA1N,UAAAC,aAAAC,IAAzC,EAAA,EAA+B4H,SAElC,IAAI7G,OAAO6M,yBAAX,CAGA7M,OAAO6M,0BAA2B,EA4BlC7M,OAAO4K,iBAAiB,UA1BN,SAAC1B,GACf,GAAKzK,EAAWyK,EAAMH,SAKjBG,EAAMb,MAA6B,gBAArBa,EAAMb,KAAKa,MAM9B,IAFA,IAAM4D,EAAUL,EAAOE,iBAAiB,UAE/BzJ,EAAI,EAAGA,EAAI4J,EAAQ9N,OAAQkE,IAChC,GAAI4J,EAAQ5J,GAAGuF,gBAAkBS,EAAMuB,OAAvC,CAMcqC,EAAQ5J,GAAG6J,cACnBC,MAAMC,cAAZ,GAAA3O,OAA+B4K,EAAMb,KAAKA,KAAK,GAAG6E,OAAlD,MAEA,UE8yBRC"}
\ No newline at end of file
diff --git a/src/player.js b/src/player.js
--- a/src/player.js
+++ b/src/player.js
@@ -535,6 +535,44 @@ class Player {
         return this.get('buffered');
     }
 
+    /**
+     * A representation of a chapter.
+     *
+     * @typedef {Object} VimeoChapter
+     * @property {number} startTime The start time of the chapter.
+     * @property {object} title The title of the chapter.
+     * @property {number} index The place in the order of Chapters. Starts at 1.
+     */
+    /**
+     * A promise to get chapters for the video.
+     *
+     * @promise GetChaptersPromise
+     * @fulfill {VimeoChapter[]} The chapters for the video.
+     */
+    /**
+     * Get an array of all the chapters for the video.
+     *
+     * @return {GetChaptersPromise}
+     */
+    getChapters() {
+        return this.get('chapters');
+    }
+
+    /**
+     * A promise to get the currently active chapter.
+     *
+     * @promise GetCurrentChaptersPromise
+     * @fulfill {VimeoChapter|undefined} The current chapter for the video.
+     */
+    /**
+     * Get the currently active chapter for the video.
+     *
+     * @return {GetCurrentChaptersPromise}
+     */
+    getCurrentChapter() {
+        return this.get('currentChapter');
+    }
+
     /**
      * A promise to get the color of the player.
      *


Test patch:
diff --git a/test/player-test.js b/test/player-test.js
--- a/test/player-test.js
+++ b/test/player-test.js
@@ -129,6 +129,8 @@ test('player object includes all api methods', (t) => {
     t.true(typeof player.unload === 'function');
     t.true(typeof player.getAutopause === 'function');
     t.true(typeof player.setAutopause === 'function');
+    t.true(typeof player.getChapters === 'function');
+    t.true(typeof player.getCurrentChapter === 'function');
     t.true(typeof player.getColor === 'function');
     t.true(typeof player.setColor === 'function');
     t.true(typeof player.getCurrentTime === 'function');