{"version":3,"sources":["webpack:///webpack/universalModuleDefinition?5ca6","webpack:///video-player.js","webpack:///webpack/bootstrap ae69f7e81e395557566f?42bc","webpack:///./src/index.js","webpack:///./src/models/metadata.js?6494","webpack:///./src/models/player.js?b9cf","webpack:///./src/constants.js?a228","webpack:///./src/views/embed.js?8e1a","webpack:///./src/views/modal.js?614f","webpack:///./package.json"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","0","_interopRequireDefault","obj","__esModule","default","Object","defineProperty","value","VERSION","undefined","_players$","_package","_package2","_player","_player2","_metadata","_metadata2","_embed","_embed2","_constants","_Voonto","Voonto","$","ready","then","app","length","append","MODAL_LAYER_ID","each","config","container$","options","metadata","player","lookup","CONFIG_NAMESPACE","serviceUrl","Error","extend","DEFAULTS","source","data","accountname","videoid","autoplay","author","bumperid","description","edition","link","longdescription","modallayer","muted","name","newsid","playerid","playlistid","playlistorientation","poster","template","videoad","videolive","version","56","_classCallCheck","instance","Constructor","TypeError","_createClass","defineProperties","target","props","i","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","Metadata","_ref","url","promise","ajax","dataType","json","video","59","_buildQueryString","params","push","encodeURIComponent","is","desktop","map","param","join","Player","_this","when","VOCUSER_READY_EVENT","gigyaux","USERTYPE_AD","getUserType","60","LANGUAGE","document","documentElement","lang","split","shift","LAZYLOAD_CLASS","EmbedStates","freeze","EMPTY","WITH_POSTER","WITH_PLAYER","MODAL_LAYER_BOOTSTRAP_OPTIONS","backdrop","keyboard","show","SOURCES","BRIGHTCOVE","YOUTUBE","VIMEO","DAILYMOTION","anonimo","registrado","trial","suscriptor","66","_modal","_modal2","POSTER_TEMPLATE","EmbedView","state","on","fetch","render","isPlayerRendered","isPosterRendered","_this2","replace","setTimeout","find","lazyload","bindPosterEvents","_this3","renderModal","renderEmbed","_this4","off","html","_this5","renderPlayer","renderPoster","67","VIDEOS","VIDEO","PHP","Modal","empty","children","first","modal","bindEvents","renderSocialButtons","tracking","socialButtons","reference_id","substr","toLowerCase","getInstance","trigger","seccion","titular","fechaPrimeraPublicacion","moment","createdAt","format","fechaModificacion","updatedAt","tipoContenido","sistemaPublicacion","firmaAutor","origenContenido","70","main","scripts","start","build","report","contributors","license","devDependencies","babel-core","babel-loader","babel-preset-es2015","chai","chalk","html-webpack-plugin","json-loader","mocha","mocha-loader","webpack","webpack-shell-plugin"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBMS,EACA,SAAUd,EAAQD,EAASM,GAEhC,YAyBA,SAASU,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,GAvBvFG,OAAOC,eAAerB,EAAS,cAC7BsB,OAAO,IAETtB,EAAQuB,QAAUC,ME9DnB,IAWIC,GAXJC,EAAApB,EAAA,IFkEKqB,EAAYX,EAAuBU,GEjExCE,EAAAtB,EAAA,IFqEKuB,EAAWb,EAAuBY,GEpEvCE,EAAAxB,EAAA,IFwEKyB,EAAaf,EAAuBc,GEvEzCE,EAAA1B,EAAA,IF2EK2B,EAAUjB,EAAuBgB,GE1EtCE,EAAA5B,EAAA,IFgFK6B,EE1EOC,OAALC,EF2EEF,EE3EFE,CAGP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sBAAA,UACAC,KAAA,SACAC,MAAA,SACAC,sBAAA,UACAC,cAAA,SACAC,MAAA,SACAC,eAAA,SACAC,QAAA,UACAC,uBAAA","file":"video-player.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"VideoPlayer\"] = factory();\n\telse\n\t\troot[\"VideoPlayer\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"VideoPlayer\"] = factory();\n\telse\n\t\troot[\"VideoPlayer\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.VERSION = undefined;\n\t\n\tvar _package = __webpack_require__(70);\n\t\n\tvar _package2 = _interopRequireDefault(_package);\n\t\n\tvar _player = __webpack_require__(59);\n\t\n\tvar _player2 = _interopRequireDefault(_player);\n\t\n\tvar _metadata = __webpack_require__(56);\n\t\n\tvar _metadata2 = _interopRequireDefault(_metadata);\n\t\n\tvar _embed = __webpack_require__(66);\n\t\n\tvar _embed2 = _interopRequireDefault(_embed);\n\t\n\tvar _constants = __webpack_require__(60);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar _Voonto = Voonto,\n\t $ = _Voonto.$;\n\t\n\tvar _players$;\n\t\n\tVoonto.ready.then(function (app) {\n\t if (!$('#' + _constants.MODAL_LAYER_ID).length) {\n\t $('body').append('
');\n\t }\n\t\n\t _players$ = $('[data-voc-video-player]');\n\t\n\t _players$.each(function () {\n\t var config = void 0,\n\t container$ = void 0,\n\t options = {},\n\t metadata = void 0,\n\t player = void 0;\n\t\n\t config = app.lookup(_constants.CONFIG_NAMESPACE);\n\t if (!config.serviceUrl) {\n\t throw Error('[VideoPlayer] service url is not defined within ' + _constants.CONFIG_NAMESPACE);\n\t }\n\t container$ = $(this);\n\t $.extend(options, _constants.DEFAULTS, {\n\t source: container$.data('voc-video-player-source'),\n\t accountname: container$.data('voc-video-player-accountname'),\n\t videoid: container$.data('voc-video-player-videoid'),\n\t autoplay: container$.data('voc-video-player-autoplay'),\n\t author: container$.data('voc-video-player-author'),\n\t bumperid: container$.data('voc-video-player-bumperid'),\n\t description: container$.data('voc-video-player-description'),\n\t edition: container$.data('voc-video-player-edition'),\n\t link: container$.data('voc-video-player-link'),\n\t longdescription: container$.data('voc-video-player-longdescription'),\n\t modallayer: container$.data('voc-video-player-modallayer'),\n\t muted: container$.data('voc-video-player-muted'),\n\t name: container$.data('voc-video-player-name'),\n\t newsid: container$.data('voc-video-player-newsid'),\n\t playerid: container$.data('voc-video-player-playerid'),\n\t playlistid: container$.data('voc-video-player-playlistid'),\n\t playlistorientation: container$.data('voc-video-player-playlistorientation'),\n\t poster: container$.data('voc-video-player-poster'),\n\t template: container$.data('voc-video-player-template'),\n\t videoad: container$.data('voc-video-player-videoad'),\n\t videolive: container$.data('voc-video-player-videolive')\n\t });\n\t\n\t metadata = new _metadata2.default(options, config.serviceUrl);\n\t player = new _player2.default(options, config.serviceUrl);\n\t new _embed2.default({ metadata: metadata, player: player, container$: container$ });\n\t });\n\t});\n\t\n\tvar VERSION = exports.VERSION = _package2.default.version;\n\n/***/ }),\n\n/***/ 56:\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar Metadata = function () {\n\t function Metadata(_ref, serviceUrl) {\n\t var accountname = _ref.accountname,\n\t source = _ref.source,\n\t videoid = _ref.videoid;\n\t\n\t _classCallCheck(this, Metadata);\n\t\n\t this.metadata = {};\n\t this.url = serviceUrl + '/videos/source/' + source + '/account/' + accountname + '/' + videoid + '.json';\n\t }\n\t\n\t _createClass(Metadata, [{\n\t key: 'fetch',\n\t value: function fetch() {\n\t if (this.promise) {\n\t return this.promise;\n\t }\n\t\n\t this.promise = Voonto.$.ajax(this.url, {\n\t dataType: 'json'\n\t });\n\t\n\t return this.promise.then(function (json) {\n\t return json.video.metadata;\n\t });\n\t }\n\t }]);\n\t\n\t return Metadata;\n\t}();\n\t\n\texports.default = Metadata;\n\n/***/ }),\n\n/***/ 59:\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _constants = __webpack_require__(60);\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar Player = function () {\n\t function Player(_ref, serviceUrl) {\n\t var source = _ref.source,\n\t accountname = _ref.accountname,\n\t videoid = _ref.videoid,\n\t autoplay = _ref.autoplay,\n\t author = _ref.author,\n\t bumperid = _ref.bumperid,\n\t description = _ref.description,\n\t edition = _ref.edition,\n\t link = _ref.link,\n\t longdescription = _ref.longdescription,\n\t modallayer = _ref.modallayer,\n\t muted = _ref.muted,\n\t name = _ref.name,\n\t newsid = _ref.newsid,\n\t playerid = _ref.playerid,\n\t playlistid = _ref.playlistid,\n\t playlistorientation = _ref.playlistorientation,\n\t poster = _ref.poster,\n\t template = _ref.template,\n\t videoad = _ref.videoad,\n\t videolive = _ref.videolive;\n\t\n\t _classCallCheck(this, Player);\n\t\n\t this.options = { source: source, accountname: accountname, videoid: videoid, autoplay: autoplay, author: author, bumperid: bumperid, description: description, edition: edition, link: link, longdescription: longdescription, modallayer: modallayer, muted: muted, name: name, newsid: newsid, playerid: playerid, playlistid: playlistid, playlistorientation: playlistorientation, poster: poster, template: template, videoad: videoad, videolive: videolive };\n\t this.url = serviceUrl + '/videos/source/' + source + '/account/' + accountname + '/' + videoid + '.html';\n\t }\n\t\n\t _createClass(Player, [{\n\t key: 'fetch',\n\t value: function fetch() {\n\t var _this = this;\n\t\n\t if (this.promise) {\n\t return this.promise;\n\t }\n\t\n\t this.promise = Voonto.ready.then(function (app) {\n\t return app.when(_constants.VOCUSER_READY_EVENT).then(function (gigyaux) {\n\t _this.options.videoad = !_this.options.videoad ? _this.options.videoad : _constants.USERTYPE_AD[gigyaux.getUserType()];\n\t _this.url += '?' + _buildQueryString.call(_this);\n\t return Voonto.$.ajax(_this.url, { dataType: 'html' });\n\t });\n\t });\n\t\n\t return this.promise;\n\t }\n\t }]);\n\t\n\t return Player;\n\t}();\n\t\n\texports.default = Player;\n\t\n\t/* Private */\n\t\n\tfunction _buildQueryString() {\n\t var params = [];\n\t\n\t for (var i in this.options) {\n\t if (this.options[i] || typeof this.options[i] === 'boolean') {\n\t params.push({\n\t key: i,\n\t value: encodeURIComponent(this.options[i])\n\t });\n\t }\n\t }\n\t\n\t params.push({\n\t key: 'isdesktop',\n\t value: Voonto.is.desktop()\n\t });\n\t\n\t params.push({\n\t key: 'language',\n\t value: '' + _constants.LANGUAGE\n\t });\n\t\n\t return params.map(function (param) {\n\t return param.key + '=' + param.value;\n\t }).join('&');\n\t}\n\n/***/ }),\n\n/***/ 60:\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\tvar CONFIG_NAMESPACE = exports.CONFIG_NAMESPACE = 'vocento.config.multimedia.videoplayer';\n\tvar LANGUAGE = exports.LANGUAGE = document.documentElement.lang && document.documentElement.lang.split('-').shift() || 'es';\n\tvar LAZYLOAD_CLASS = exports.LAZYLOAD_CLASS = 'lazy';\n\tvar EmbedStates = exports.EmbedStates = Object.freeze({\n\t EMPTY: 0,\n\t WITH_POSTER: 1,\n\t WITH_PLAYER: 2\n\t});\n\tvar VOCUSER_READY_EVENT = exports.VOCUSER_READY_EVENT = 'vocuser:ready';\n\tvar MODAL_LAYER_ID = exports.MODAL_LAYER_ID = 'voc-video-player-modalcontainer';\n\tvar MODAL_LAYER_BOOTSTRAP_OPTIONS = exports.MODAL_LAYER_BOOTSTRAP_OPTIONS = Object.freeze({\n\t backdrop: true,\n\t keyboard: true,\n\t show: true\n\t});\n\tvar DEFAULTS = exports.DEFAULTS = {\n\t autoplay: false,\n\t modallayer: false,\n\t muted: false,\n\t videoad: true,\n\t videolive: false\n\t};\n\tvar SOURCES = exports.SOURCES = Object.freeze({\n\t BRIGHTCOVE: 'brightcove',\n\t YOUTUBE: 'youtube',\n\t VIMEO: 'vimeo',\n\t DAILYMOTION: 'dailymotion'\n\t});\n\tvar USERTYPE_AD = exports.USERTYPE_AD = Object.freeze({\n\t anonimo: true,\n\t registrado: true,\n\t trial: false,\n\t suscriptor: false\n\t});\n\n/***/ }),\n\n/***/ 66:\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _modal = __webpack_require__(67);\n\t\n\tvar _modal2 = _interopRequireDefault(_modal);\n\t\n\tvar _constants = __webpack_require__(60);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar POSTER_TEMPLATE = '\\n\\n\\n';\n\t\n\tvar EmbedView = function () {\n\t function EmbedView(_ref) {\n\t var _this = this;\n\t\n\t var metadata = _ref.metadata,\n\t player = _ref.player,\n\t container$ = _ref.container$;\n\t\n\t _classCallCheck(this, EmbedView);\n\t\n\t this.metadata = metadata;\n\t this.player = player;\n\t this.container$ = container$;\n\t this.state = _constants.EmbedStates.EMPTY;\n\t\n\t this.container$.on('inview', function () {\n\t return _this.metadata.fetch().then(function (metadata) {\n\t _this.metadata.metadata = metadata;\n\t }).then(function () {\n\t return _this.render();\n\t });\n\t });\n\t }\n\t\n\t _createClass(EmbedView, [{\n\t key: 'render',\n\t value: function render() {\n\t if (this.player.options.autoplay && !this.player.options.modallayer) {\n\t this.isPlayerRendered();\n\t } else {\n\t this.isPosterRendered();\n\t }\n\t }\n\t }, {\n\t key: 'renderPoster',\n\t value: function renderPoster() {\n\t var _this2 = this;\n\t\n\t if (!this.player.options.poster) {\n\t this.player.options.poster = this.metadata.metadata.poster;\n\t }\n\t this.container$.append(POSTER_TEMPLATE.replace(/{poster}/g, this.player.options.poster));\n\t setTimeout(function () {\n\t return _this2.container$.find('.' + _constants.LAZYLOAD_CLASS).lazyload();\n\t }, 0);\n\t this.bindPosterEvents();\n\t this.state = _constants.EmbedStates.WITH_POSTER;\n\t }\n\t }, {\n\t key: 'renderPlayer',\n\t value: function renderPlayer() {\n\t var _this3 = this;\n\t\n\t this.player.options.autoplay = true;\n\t if (this.player.options.modallayer) {\n\t this.renderModal();\n\t } else {\n\t this.renderEmbed();\n\t }\n\t this.player.fetch().then(function () {\n\t return _this3.state = _constants.EmbedStates.WITH_PLAYER;\n\t });\n\t }\n\t }, {\n\t key: 'renderEmbed',\n\t value: function renderEmbed() {\n\t var _this4 = this;\n\t\n\t this.container$.off('click');\n\t this.player.fetch().then(function (player) {\n\t _this4.container$.html(player);\n\t });\n\t }\n\t }, {\n\t key: 'renderModal',\n\t value: function renderModal() {\n\t new _modal2.default(this.player, this.metadata.metadata);\n\t }\n\t }, {\n\t key: 'bindPosterEvents',\n\t value: function bindPosterEvents() {\n\t var _this5 = this;\n\t\n\t this.container$.on('click', function () {\n\t return _this5.renderPlayer();\n\t });\n\t }\n\t }, {\n\t key: 'isPosterRendered',\n\t value: function isPosterRendered() {\n\t if (this.state !== _constants.EmbedStates.WITH_POSTER) {\n\t this.renderPoster();\n\t }\n\t }\n\t }, {\n\t key: 'isPlayerRendered',\n\t value: function isPlayerRendered() {\n\t if (this.state !== _constants.EmbedStates.WITH_PLAYER) {\n\t this.renderPlayer();\n\t }\n\t }\n\t }]);\n\t\n\t return EmbedView;\n\t}();\n\t\n\texports.default = EmbedView;\n\n/***/ }),\n\n/***/ 67:\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _constants = __webpack_require__(60);\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar VIDEOS = 'videos',\n\t VIDEO = 'video',\n\t PHP = 'php';\n\t\n\tvar Modal = function () {\n\t function Modal(player, metadata) {\n\t var _this = this;\n\t\n\t _classCallCheck(this, Modal);\n\t\n\t this.player = player;\n\t this.metadata = metadata;\n\t this.container$ = Voonto.$('#' + _constants.MODAL_LAYER_ID);\n\t this.container$.empty();\n\t\n\t this.player.fetch().then(function (player) {\n\t return _this.container$.html(player);\n\t }).then(function () {\n\t return _this.container$.children().first().modal(_constants.MODAL_LAYER_BOOTSTRAP_OPTIONS);\n\t }).then(function () {\n\t return _this.bindEvents();\n\t }).then(function () {\n\t return _this.renderSocialButtons();\n\t }).then(function () {\n\t return _this.tracking();\n\t });\n\t }\n\t\n\t _createClass(Modal, [{\n\t key: 'bindEvents',\n\t value: function bindEvents() {\n\t var _this2 = this;\n\t\n\t this.container$.on('hide.bs.modal', function () {\n\t return _this2.container$.empty();\n\t });\n\t }\n\t }, {\n\t key: 'renderSocialButtons',\n\t value: function renderSocialButtons() {\n\t this.container$.children().first().find('[data-voc-social-buttons]').socialButtons();\n\t }\n\t }, {\n\t key: 'tracking',\n\t value: function tracking() {\n\t var source = 'rl';\n\t\n\t if (this.metadata.reference_id) {\n\t source = this.metadata.reference_id.substr(0, 3);\n\t if (source === 'AG-' || source === 'PG-' || source === 'AT-' || source === 'EP-' || source === 'JM-' || source === 'ACB') {\n\t source = 'agen';\n\t } else {\n\t source = source.split('-').shift().toLowerCase();\n\t }\n\t }\n\t\n\t Voonto.getInstance().trigger('vtm:track', {\n\t seccion: VIDEOS,\n\t titular: this.metadata.name,\n\t fechaPrimeraPublicacion: Voonto.moment(this.metadata.createdAt).format('YYYYMMDDkkmmss'),\n\t fechaModificacion: Voonto.moment(this.metadata.updatedAt).format('YYYYMMDDkkmmss'),\n\t tipoContenido: VIDEO,\n\t sistemaPublicacion: PHP,\n\t firmaAutor: this.metadata.author.name,\n\t origenContenido: source\n\t });\n\t }\n\t }]);\n\t\n\t return Modal;\n\t}();\n\t\n\texports.default = Modal;\n\n/***/ }),\n\n/***/ 70:\n/***/ (function(module, exports) {\n\n\tmodule.exports = {\n\t\t\"name\": \"video-player\",\n\t\t\"version\": \"1.0.8\",\n\t\t\"description\": \"\",\n\t\t\"main\": \"src/index.js\",\n\t\t\"scripts\": {\n\t\t\t\"start\": \"webpack-dev-server\",\n\t\t\t\"build\": \"./node_modules/webpack/bin/webpack.js\",\n\t\t\t\"report\": \"plato -r -d report -l .jshintrc -t video-player src\"\n\t\t},\n\t\t\"contributors\": [\n\t\t\t\"Iván Pérez \",\n\t\t\t\"Jose Manuel Ortega \",\n\t\t\t\"Adolfo Sanz \"\n\t\t],\n\t\t\"license\": \"SEE LICENSE IN LICENSE.md\",\n\t\t\"devDependencies\": {\n\t\t\t\"babel-core\": \"^6.17.0\",\n\t\t\t\"babel-loader\": \"^6.2.5\",\n\t\t\t\"babel-preset-es2015\": \"^6.16.0\",\n\t\t\t\"chai\": \"^3.5.0\",\n\t\t\t\"chalk\": \"^1.1.3\",\n\t\t\t\"html-webpack-plugin\": \"^2.24.1\",\n\t\t\t\"json-loader\": \"^0.5.4\",\n\t\t\t\"mocha\": \"^3.1.0\",\n\t\t\t\"mocha-loader\": \"^1.0.0\",\n\t\t\t\"webpack\": \"^1.13.3\",\n\t\t\t\"webpack-shell-plugin\": \"^0.4.3\"\n\t\t}\n\t};\n\n/***/ })\n\n/******/ })\n});\n;\n\n\n// WEBPACK FOOTER //\n// video-player.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap ae69f7e81e395557566f","import pkg from '../package.json';\nimport Player from './models/player';\nimport Metadata from './models/metadata';\nimport EmbedView from './views/embed';\nimport {\n DEFAULTS,\n CONFIG_NAMESPACE,\n MODAL_LAYER_ID\n} from './constants';\n\nconst {$} = Voonto;\nvar _players$;\n\nVoonto.ready.then((app) => {\n if (!$(`#${MODAL_LAYER_ID}`).length) {\n $('body').append(`
`);\n }\n\n _players$ = $('[data-voc-video-player]');\n\n _players$.each(function() {\n let config, container$, options = {}, metadata, player;\n\n config = app.lookup(CONFIG_NAMESPACE);\n if (!config.serviceUrl) {throw Error(`[VideoPlayer] service url is not defined within ${CONFIG_NAMESPACE}`);}\n container$ = $(this);\n $.extend(options, DEFAULTS, {\n source: container$.data('voc-video-player-source'),\n accountname: container$.data('voc-video-player-accountname'),\n videoid: container$.data('voc-video-player-videoid'),\n autoplay: container$.data('voc-video-player-autoplay'),\n author: container$.data('voc-video-player-author'),\n bumperid: container$.data('voc-video-player-bumperid'),\n description: container$.data('voc-video-player-description'),\n edition: container$.data('voc-video-player-edition'),\n link: container$.data('voc-video-player-link'),\n longdescription: container$.data('voc-video-player-longdescription'),\n modallayer: container$.data('voc-video-player-modallayer'),\n muted: container$.data('voc-video-player-muted'),\n name: container$.data('voc-video-player-name'),\n newsid: container$.data('voc-video-player-newsid'),\n playerid: container$.data('voc-video-player-playerid'),\n playlistid: container$.data('voc-video-player-playlistid'),\n playlistorientation: container$.data('voc-video-player-playlistorientation'),\n poster: container$.data('voc-video-player-poster'),\n template: container$.data('voc-video-player-template'),\n videoad: container$.data('voc-video-player-videoad'),\n videolive: container$.data('voc-video-player-videolive')\n });\n\n metadata = new Metadata(options, config.serviceUrl);\n player = new Player(options, config.serviceUrl);\n new EmbedView({metadata, player, container$});\n });\n});\n\nexport const VERSION = pkg.version;\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","class Metadata {\n constructor({accountname, source, videoid}, serviceUrl) {\n this.metadata = {};\n this.url = `${serviceUrl}/videos/source/${source}/account/${accountname}/${videoid}.json`;\n }\n\n fetch() {\n if (this.promise) {return this.promise;}\n\n this.promise = Voonto.$.ajax(this.url, {\n dataType: 'json'\n });\n\n return this.promise.then((json) => json.video.metadata);\n }\n}\n\nexport default Metadata;\n\n\n\n// WEBPACK FOOTER //\n// ./src/models/metadata.js","import {\n LANGUAGE,\n VOCUSER_READY_EVENT,\n USERTYPE_AD\n} from '../constants';\n\nclass Player {\n constructor({\n source,\n accountname,\n videoid,\n autoplay,\n author,\n bumperid,\n description,\n edition,\n link,\n longdescription,\n modallayer,\n muted,\n name,\n newsid,\n playerid,\n playlistid,\n playlistorientation,\n poster,\n template,\n videoad,\n videolive}, serviceUrl) {\n\n this.options = {source, accountname, videoid, autoplay, author, bumperid, description, edition, link, longdescription, modallayer, muted, name, newsid, playerid, playlistid, playlistorientation, poster, template, videoad, videolive};\n this.url = `${serviceUrl}/videos/source/${source}/account/${accountname}/${videoid}.html`;\n }\n\n fetch() {\n if (this.promise) {return this.promise;}\n\n this.promise = Voonto.ready.then((app) => {\n return app.when(VOCUSER_READY_EVENT).then((gigyaux) => {\n this.options.videoad = !this.options.videoad ? this.options.videoad : USERTYPE_AD[gigyaux.getUserType()];\n this.url += `?${_buildQueryString.call(this)}`;\n return Voonto.$.ajax(this.url, {dataType: 'html'});\n });\n });\n\n return this.promise;\n }\n\n}\n\nexport default Player;\n\n/* Private */\n\nfunction _buildQueryString() {\n var params = [];\n\n for (let i in this.options) {\n if (this.options[i] || typeof this.options[i] === 'boolean') {\n params.push({\n key: i,\n value: encodeURIComponent(this.options[i])\n });\n }\n }\n\n params.push({\n key: 'isdesktop',\n value: Voonto.is.desktop()\n });\n\n params.push({\n key: 'language',\n value: `${LANGUAGE}`\n });\n\n return params.map((param) => {\n return `${param.key}=${param.value}`;\n }).join('&');\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/models/player.js","export const CONFIG_NAMESPACE = 'vocento.config.multimedia.videoplayer';\nexport const LANGUAGE = (document.documentElement.lang && document.documentElement.lang.split('-').shift()) || 'es';\nexport const LAZYLOAD_CLASS = 'lazy';\nexport const EmbedStates = Object.freeze({\n EMPTY: 0b00,\n WITH_POSTER: 0b01,\n WITH_PLAYER: 0b10\n});\nexport const VOCUSER_READY_EVENT = 'vocuser:ready';\nexport const MODAL_LAYER_ID = 'voc-video-player-modalcontainer';\nexport const MODAL_LAYER_BOOTSTRAP_OPTIONS = Object.freeze({\n backdrop: true,\n keyboard: true,\n show: true\n});\nexport const DEFAULTS = {\n autoplay: false,\n modallayer: false,\n muted: false,\n videoad: true,\n videolive: false\n};\nexport const SOURCES = Object.freeze({\n BRIGHTCOVE: 'brightcove',\n YOUTUBE: 'youtube',\n VIMEO: 'vimeo',\n DAILYMOTION: 'dailymotion'\n});\nexport const USERTYPE_AD = Object.freeze({\n anonimo: true,\n registrado: true,\n trial: false,\n suscriptor: false\n});\n\n\n\n// WEBPACK FOOTER //\n// ./src/constants.js","import ModalView from './modal';\nimport {\n EmbedStates,\n LAZYLOAD_CLASS\n} from '../constants';\n\nconst POSTER_TEMPLATE = `\n\n\n`;\n\nclass EmbedView {\n constructor({metadata, player, container$}) {\n this.metadata = metadata;\n this.player = player;\n this.container$ = container$;\n this.state = EmbedStates.EMPTY;\n\n this.container$.on('inview', () => {\n return this.metadata.fetch().then((metadata) => {this.metadata.metadata = metadata;})\n .then(() => this.render());\n });\n }\n\n render() {\n if (this.player.options.autoplay && !this.player.options.modallayer) {\n this.isPlayerRendered();\n } else {\n this.isPosterRendered();\n }\n }\n renderPoster() {\n if (!this.player.options.poster) {\n this.player.options.poster = this.metadata.metadata.poster;\n }\n this.container$.append(POSTER_TEMPLATE.replace(/{poster}/g, this.player.options.poster));\n setTimeout(() => this.container$.find(`.${LAZYLOAD_CLASS}`).lazyload(), 0);\n this.bindPosterEvents();\n this.state = EmbedStates.WITH_POSTER;\n }\n\n renderPlayer() {\n this.player.options.autoplay = true;\n if (this.player.options.modallayer) {\n this.renderModal();\n } else {\n this.renderEmbed();\n }\n this.player.fetch().then(() => this.state = EmbedStates.WITH_PLAYER);\n }\n\n renderEmbed() {\n this.container$.off('click');\n this.player.fetch().then((player) => {this.container$.html(player);});\n }\n\n renderModal() {\n new ModalView(this.player, this.metadata.metadata);\n }\n\n bindPosterEvents() {\n this.container$.on('click', () => this.renderPlayer());\n }\n\n isPosterRendered() {\n if (this.state !== EmbedStates.WITH_POSTER) {this.renderPoster();}\n }\n\n isPlayerRendered() {\n if (this.state !== EmbedStates.WITH_PLAYER) {this.renderPlayer();}\n }\n}\n\nexport default EmbedView;\n\n\n\n// WEBPACK FOOTER //\n// ./src/views/embed.js","import {\n MODAL_LAYER_ID,\n MODAL_LAYER_BOOTSTRAP_OPTIONS\n} from '../constants';\n\nconst\n VIDEOS = 'videos',\n VIDEO = 'video',\n PHP = 'php'\n;\n\nclass Modal {\n constructor(player, metadata) {\n this.player = player;\n this.metadata = metadata;\n this.container$ = Voonto.$(`#${MODAL_LAYER_ID}`);\n this.container$.empty();\n\n this.player.fetch()\n .then((player) => this.container$.html(player))\n .then(() => this.container$.children().first().modal(MODAL_LAYER_BOOTSTRAP_OPTIONS))\n .then(() => this.bindEvents())\n .then(() => this.renderSocialButtons())\n .then(() => this.tracking())\n ;\n }\n\n bindEvents() {\n this.container$.on('hide.bs.modal', () => this.container$.empty());\n }\n\n renderSocialButtons() {\n this.container$.children().first().find('[data-voc-social-buttons]').socialButtons();\n }\n\n tracking() {\n let source = 'rl';\n\n if (this.metadata.reference_id){\n source = this.metadata.reference_id.substr(0, 3);\n if (source === 'AG-' || source === 'PG-' || source === 'AT-' || source === 'EP-' || source === 'JM-' || source === 'ACB') {\n source = 'agen';\n } else {\n source = source.split('-').shift().toLowerCase();\n }\n }\n\n Voonto.getInstance().trigger('vtm:track', {\n seccion: VIDEOS,\n titular: this.metadata.name,\n fechaPrimeraPublicacion: Voonto.moment(this.metadata.createdAt).format('YYYYMMDDkkmmss'),\n fechaModificacion: Voonto.moment(this.metadata.updatedAt).format('YYYYMMDDkkmmss'),\n tipoContenido: VIDEO,\n sistemaPublicacion: PHP,\n firmaAutor: this.metadata.author.name,\n origenContenido: source\n });\n }\n}\n\nexport default Modal;\n\n\n\n// WEBPACK FOOTER //\n// ./src/views/modal.js","module.exports = {\n\t\"name\": \"video-player\",\n\t\"version\": \"1.0.8\",\n\t\"description\": \"\",\n\t\"main\": \"src/index.js\",\n\t\"scripts\": {\n\t\t\"start\": \"webpack-dev-server\",\n\t\t\"build\": \"./node_modules/webpack/bin/webpack.js\",\n\t\t\"report\": \"plato -r -d report -l .jshintrc -t video-player src\"\n\t},\n\t\"contributors\": [\n\t\t\"Iván Pérez \",\n\t\t\"Jose Manuel Ortega \",\n\t\t\"Adolfo Sanz \"\n\t],\n\t\"license\": \"SEE LICENSE IN LICENSE.md\",\n\t\"devDependencies\": {\n\t\t\"babel-core\": \"^6.17.0\",\n\t\t\"babel-loader\": \"^6.2.5\",\n\t\t\"babel-preset-es2015\": \"^6.16.0\",\n\t\t\"chai\": \"^3.5.0\",\n\t\t\"chalk\": \"^1.1.3\",\n\t\t\"html-webpack-plugin\": \"^2.24.1\",\n\t\t\"json-loader\": \"^0.5.4\",\n\t\t\"mocha\": \"^3.1.0\",\n\t\t\"mocha-loader\": \"^1.0.0\",\n\t\t\"webpack\": \"^1.13.3\",\n\t\t\"webpack-shell-plugin\": \"^0.4.3\"\n\t}\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./package.json\n// module id = 70\n// module chunks = 1"],"sourceRoot":""}