平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

5932 lines
247 KiB

  1. /******/ (function(modules) { // webpackBootstrap
  2. /******/ // The module cache
  3. /******/ var installedModules = {};
  4. /******/
  5. /******/ // The require function
  6. /******/ function __webpack_require__(moduleId) {
  7. /******/
  8. /******/ // Check if module is in cache
  9. /******/ if(installedModules[moduleId]) {
  10. /******/ return installedModules[moduleId].exports;
  11. /******/ }
  12. /******/ // Create a new module (and put it into the cache)
  13. /******/ var module = installedModules[moduleId] = {
  14. /******/ i: moduleId,
  15. /******/ l: false,
  16. /******/ exports: {}
  17. /******/ };
  18. /******/
  19. /******/ // Execute the module function
  20. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  21. /******/
  22. /******/ // Flag the module as loaded
  23. /******/ module.l = true;
  24. /******/
  25. /******/ // Return the exports of the module
  26. /******/ return module.exports;
  27. /******/ }
  28. /******/
  29. /******/
  30. /******/ // expose the modules object (__webpack_modules__)
  31. /******/ __webpack_require__.m = modules;
  32. /******/
  33. /******/ // expose the module cache
  34. /******/ __webpack_require__.c = installedModules;
  35. /******/
  36. /******/ // define getter function for harmony exports
  37. /******/ __webpack_require__.d = function(exports, name, getter) {
  38. /******/ if(!__webpack_require__.o(exports, name)) {
  39. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  40. /******/ }
  41. /******/ };
  42. /******/
  43. /******/ // define __esModule on exports
  44. /******/ __webpack_require__.r = function(exports) {
  45. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  46. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  47. /******/ }
  48. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  49. /******/ };
  50. /******/
  51. /******/ // create a fake namespace object
  52. /******/ // mode & 1: value is a module id, require it
  53. /******/ // mode & 2: merge all properties of value into the ns
  54. /******/ // mode & 4: return value when already ns object
  55. /******/ // mode & 8|1: behave like require
  56. /******/ __webpack_require__.t = function(value, mode) {
  57. /******/ if(mode & 1) value = __webpack_require__(value);
  58. /******/ if(mode & 8) return value;
  59. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  60. /******/ var ns = Object.create(null);
  61. /******/ __webpack_require__.r(ns);
  62. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  63. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  64. /******/ return ns;
  65. /******/ };
  66. /******/
  67. /******/ // getDefaultExport function for compatibility with non-harmony modules
  68. /******/ __webpack_require__.n = function(module) {
  69. /******/ var getter = module && module.__esModule ?
  70. /******/ function getDefault() { return module['default']; } :
  71. /******/ function getModuleExports() { return module; };
  72. /******/ __webpack_require__.d(getter, 'a', getter);
  73. /******/ return getter;
  74. /******/ };
  75. /******/
  76. /******/ // Object.prototype.hasOwnProperty.call
  77. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  78. /******/
  79. /******/ // __webpack_public_path__
  80. /******/ __webpack_require__.p = "";
  81. /******/
  82. /******/
  83. /******/ // Load entry module and return exports
  84. /******/ return __webpack_require__(__webpack_require__.s = 6);
  85. /******/ })
  86. /************************************************************************/
  87. /******/ ([
  88. /* 0 */
  89. /***/ (function(module, exports, __webpack_require__) {
  90. "use strict";
  91. /*
  92. MIT License http://www.opensource.org/licenses/mit-license.php
  93. Author Tobias Koppers @sokra
  94. */
  95. // css base code, injected by the css-loader
  96. module.exports = function () {
  97. var list = [];
  98. // return the list of modules as css string
  99. list.toString = function toString() {
  100. var result = [];
  101. for (var i = 0; i < this.length; i++) {
  102. var item = this[i];
  103. if (item[2]) {
  104. result.push("@media " + item[2] + "{" + item[1] + "}");
  105. } else {
  106. result.push(item[1]);
  107. }
  108. }
  109. return result.join("");
  110. };
  111. // import a list of modules into the list
  112. list.i = function (modules, mediaQuery) {
  113. if (typeof modules === "string") modules = [[null, modules, ""]];
  114. var alreadyImportedModules = {};
  115. for (var i = 0; i < this.length; i++) {
  116. var id = this[i][0];
  117. if (typeof id === "number") alreadyImportedModules[id] = true;
  118. }
  119. for (i = 0; i < modules.length; i++) {
  120. var item = modules[i];
  121. // skip already imported module
  122. // this implementation is not 100% perfect for weird media query combinations
  123. // when a module is imported multiple times with different media queries.
  124. // I hope this will never occur (Hey this way we have smaller bundles)
  125. if (typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
  126. if (mediaQuery && !item[2]) {
  127. item[2] = mediaQuery;
  128. } else if (mediaQuery) {
  129. item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
  130. }
  131. list.push(item);
  132. }
  133. }
  134. };
  135. return list;
  136. };
  137. /***/ }),
  138. /* 1 */
  139. /***/ (function(module, exports) {
  140. /*
  141. MIT License http://www.opensource.org/licenses/mit-license.php
  142. Author Tobias Koppers @sokra
  143. */
  144. var stylesInDom = {},
  145. memoize = function(fn) {
  146. var memo;
  147. return function () {
  148. if (typeof memo === "undefined") memo = fn.apply(this, arguments);
  149. return memo;
  150. };
  151. },
  152. isOldIE = memoize(function() {
  153. return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase());
  154. }),
  155. getHeadElement = memoize(function () {
  156. return document.head || document.getElementsByTagName("head")[0];
  157. }),
  158. singletonElement = null,
  159. singletonCounter = 0,
  160. styleElementsInsertedAtTop = [];
  161. module.exports = function(list, options) {
  162. if(typeof DEBUG !== "undefined" && DEBUG) {
  163. if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
  164. }
  165. options = options || {};
  166. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  167. // tags it will allow on a page
  168. if (typeof options.singleton === "undefined") options.singleton = isOldIE();
  169. // By default, add <style> tags to the bottom of <head>.
  170. if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
  171. var styles = listToStyles(list);
  172. addStylesToDom(styles, options);
  173. return function update(newList) {
  174. var mayRemove = [];
  175. for(var i = 0; i < styles.length; i++) {
  176. var item = styles[i];
  177. var domStyle = stylesInDom[item.id];
  178. domStyle.refs--;
  179. mayRemove.push(domStyle);
  180. }
  181. if(newList) {
  182. var newStyles = listToStyles(newList);
  183. addStylesToDom(newStyles, options);
  184. }
  185. for(var i = 0; i < mayRemove.length; i++) {
  186. var domStyle = mayRemove[i];
  187. if(domStyle.refs === 0) {
  188. for(var j = 0; j < domStyle.parts.length; j++)
  189. domStyle.parts[j]();
  190. delete stylesInDom[domStyle.id];
  191. }
  192. }
  193. };
  194. }
  195. function addStylesToDom(styles, options) {
  196. for(var i = 0; i < styles.length; i++) {
  197. var item = styles[i];
  198. var domStyle = stylesInDom[item.id];
  199. if(domStyle) {
  200. domStyle.refs++;
  201. for(var j = 0; j < domStyle.parts.length; j++) {
  202. domStyle.parts[j](item.parts[j]);
  203. }
  204. for(; j < item.parts.length; j++) {
  205. domStyle.parts.push(addStyle(item.parts[j], options));
  206. }
  207. } else {
  208. var parts = [];
  209. for(var j = 0; j < item.parts.length; j++) {
  210. parts.push(addStyle(item.parts[j], options));
  211. }
  212. stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
  213. }
  214. }
  215. }
  216. function listToStyles(list) {
  217. var styles = [];
  218. var newStyles = {};
  219. for(var i = 0; i < list.length; i++) {
  220. var item = list[i];
  221. var id = item[0];
  222. var css = item[1];
  223. var media = item[2];
  224. var sourceMap = item[3];
  225. var part = {css: css, media: media, sourceMap: sourceMap};
  226. if(!newStyles[id])
  227. styles.push(newStyles[id] = {id: id, parts: [part]});
  228. else
  229. newStyles[id].parts.push(part);
  230. }
  231. return styles;
  232. }
  233. function insertStyleElement(options, styleElement) {
  234. var head = getHeadElement();
  235. var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
  236. if (options.insertAt === "top") {
  237. if(!lastStyleElementInsertedAtTop) {
  238. head.insertBefore(styleElement, head.firstChild);
  239. } else if(lastStyleElementInsertedAtTop.nextSibling) {
  240. head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
  241. } else {
  242. head.appendChild(styleElement);
  243. }
  244. styleElementsInsertedAtTop.push(styleElement);
  245. } else if (options.insertAt === "bottom") {
  246. head.appendChild(styleElement);
  247. } else {
  248. throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
  249. }
  250. }
  251. function removeStyleElement(styleElement) {
  252. styleElement.parentNode.removeChild(styleElement);
  253. var idx = styleElementsInsertedAtTop.indexOf(styleElement);
  254. if(idx >= 0) {
  255. styleElementsInsertedAtTop.splice(idx, 1);
  256. }
  257. }
  258. function createStyleElement(options) {
  259. var styleElement = document.createElement("style");
  260. styleElement.type = "text/css";
  261. insertStyleElement(options, styleElement);
  262. return styleElement;
  263. }
  264. function createLinkElement(options) {
  265. var linkElement = document.createElement("link");
  266. linkElement.rel = "stylesheet";
  267. insertStyleElement(options, linkElement);
  268. return linkElement;
  269. }
  270. function addStyle(obj, options) {
  271. var styleElement, update, remove;
  272. if (options.singleton) {
  273. var styleIndex = singletonCounter++;
  274. styleElement = singletonElement || (singletonElement = createStyleElement(options));
  275. update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
  276. remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
  277. } else if(obj.sourceMap &&
  278. typeof URL === "function" &&
  279. typeof URL.createObjectURL === "function" &&
  280. typeof URL.revokeObjectURL === "function" &&
  281. typeof Blob === "function" &&
  282. typeof btoa === "function") {
  283. styleElement = createLinkElement(options);
  284. update = updateLink.bind(null, styleElement);
  285. remove = function() {
  286. removeStyleElement(styleElement);
  287. if(styleElement.href)
  288. URL.revokeObjectURL(styleElement.href);
  289. };
  290. } else {
  291. styleElement = createStyleElement(options);
  292. update = applyToTag.bind(null, styleElement);
  293. remove = function() {
  294. removeStyleElement(styleElement);
  295. };
  296. }
  297. update(obj);
  298. return function updateStyle(newObj) {
  299. if(newObj) {
  300. if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
  301. return;
  302. update(obj = newObj);
  303. } else {
  304. remove();
  305. }
  306. };
  307. }
  308. var replaceText = (function () {
  309. var textStore = [];
  310. return function (index, replacement) {
  311. textStore[index] = replacement;
  312. return textStore.filter(Boolean).join('\n');
  313. };
  314. })();
  315. function applyToSingletonTag(styleElement, index, remove, obj) {
  316. var css = remove ? "" : obj.css;
  317. if (styleElement.styleSheet) {
  318. styleElement.styleSheet.cssText = replaceText(index, css);
  319. } else {
  320. var cssNode = document.createTextNode(css);
  321. var childNodes = styleElement.childNodes;
  322. if (childNodes[index]) styleElement.removeChild(childNodes[index]);
  323. if (childNodes.length) {
  324. styleElement.insertBefore(cssNode, childNodes[index]);
  325. } else {
  326. styleElement.appendChild(cssNode);
  327. }
  328. }
  329. }
  330. function applyToTag(styleElement, obj) {
  331. var css = obj.css;
  332. var media = obj.media;
  333. if(media) {
  334. styleElement.setAttribute("media", media)
  335. }
  336. if(styleElement.styleSheet) {
  337. styleElement.styleSheet.cssText = css;
  338. } else {
  339. while(styleElement.firstChild) {
  340. styleElement.removeChild(styleElement.firstChild);
  341. }
  342. styleElement.appendChild(document.createTextNode(css));
  343. }
  344. }
  345. function updateLink(linkElement, obj) {
  346. var css = obj.css;
  347. var sourceMap = obj.sourceMap;
  348. if(sourceMap) {
  349. // http://stackoverflow.com/a/26603875
  350. css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
  351. }
  352. var blob = new Blob([css], { type: "text/css" });
  353. var oldSrc = linkElement.href;
  354. linkElement.href = URL.createObjectURL(blob);
  355. if(oldSrc)
  356. URL.revokeObjectURL(oldSrc);
  357. }
  358. /***/ }),
  359. /* 2 */
  360. /***/ (function(module, exports, __webpack_require__) {
  361. "use strict";
  362. Object.defineProperty(exports, "__esModule", {
  363. value: true
  364. });
  365. exports.parseDom = parseDom;
  366. function parseDom(html) {
  367. var ele = document.createElement('div');
  368. ele.innerHTML = html;
  369. return ele.childNodes[0];
  370. }
  371. module.exports.cookieSet = function (cname, cvalue, exdays) {
  372. var d = new Date();
  373. d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
  374. var expires = 'expires=' + d.toGMTString();
  375. document.cookie = cname + '=' + escape(cvalue) + '; ' + expires;
  376. };
  377. /***/ }),
  378. /* 3 */
  379. /***/ (function(module, exports, __webpack_require__) {
  380. "use strict";
  381. Object.defineProperty(exports, "__esModule", {
  382. value: true
  383. });
  384. var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  385. var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
  386. return typeof obj === "undefined" ? "undefined" : _typeof2(obj);
  387. } : function (obj) {
  388. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj);
  389. };
  390. // Save the previous value of the device variable.
  391. var previousDevice = window.device;
  392. var device = {};
  393. var changeOrientationList = [];
  394. // Add device as a global object.
  395. window.device = device;
  396. // The <html> element.
  397. var documentElement = window.document.documentElement;
  398. // The client user agent string.
  399. // Lowercase, so we can use the more efficient indexOf(), instead of Regex
  400. var userAgent = window.navigator.userAgent.toLowerCase();
  401. // Detectable television devices.
  402. var television = ['googletv', 'viera', 'smarttv', 'internet.tv', 'netcast', 'nettv', 'appletv', 'boxee', 'kylo', 'roku', 'dlnadoc', 'roku', 'pov_tv', 'hbbtv', 'ce-html'];
  403. // Main functions
  404. // --------------
  405. device.macos = function () {
  406. return find('mac');
  407. };
  408. device.ios = function () {
  409. return device.iphone() || device.ipod() || device.ipad();
  410. };
  411. device.iphone = function () {
  412. return !device.windows() && find('iphone');
  413. };
  414. device.ipod = function () {
  415. return find('ipod');
  416. };
  417. device.ipad = function () {
  418. return find('ipad');
  419. };
  420. device.android = function () {
  421. return !device.windows() && find('android');
  422. };
  423. device.androidPhone = function () {
  424. return device.android() && find('mobile');
  425. };
  426. device.androidTablet = function () {
  427. return device.android() && !find('mobile');
  428. };
  429. device.blackberry = function () {
  430. return find('blackberry') || find('bb10') || find('rim');
  431. };
  432. device.blackberryPhone = function () {
  433. return device.blackberry() && !find('tablet');
  434. };
  435. device.blackberryTablet = function () {
  436. return device.blackberry() && find('tablet');
  437. };
  438. device.windows = function () {
  439. return find('windows');
  440. };
  441. device.windowsPhone = function () {
  442. return device.windows() && find('phone');
  443. };
  444. device.windowsTablet = function () {
  445. return device.windows() && find('touch') && !device.windowsPhone();
  446. };
  447. device.fxos = function () {
  448. return (find('(mobile') || find('(tablet')) && find(' rv:');
  449. };
  450. device.fxosPhone = function () {
  451. return device.fxos() && find('mobile');
  452. };
  453. device.fxosTablet = function () {
  454. return device.fxos() && find('tablet');
  455. };
  456. device.meego = function () {
  457. return find('meego');
  458. };
  459. device.cordova = function () {
  460. return window.cordova && location.protocol === 'file:';
  461. };
  462. device.nodeWebkit = function () {
  463. return _typeof(window.process) === 'object';
  464. };
  465. device.mobile = function () {
  466. return device.androidPhone() || device.iphone() || device.ipod() || device.windowsPhone() || device.blackberryPhone() || device.fxosPhone() || device.meego();
  467. };
  468. device.tablet = function () {
  469. return device.ipad() || device.androidTablet() || device.blackberryTablet() || device.windowsTablet() || device.fxosTablet();
  470. };
  471. device.desktop = function () {
  472. return !device.tablet() && !device.mobile();
  473. };
  474. device.television = function () {
  475. var i = 0;
  476. while (i < television.length) {
  477. if (find(television[i])) {
  478. return true;
  479. }
  480. i++;
  481. }
  482. return false;
  483. };
  484. device.portrait = function () {
  485. if (screen.orientation && Object.prototype.hasOwnProperty.call(window, 'onorientationchange')) {
  486. return screen.orientation.type.includes('portrait');
  487. }
  488. return window.innerHeight / window.innerWidth > 1;
  489. };
  490. device.landscape = function () {
  491. if (screen.orientation && Object.prototype.hasOwnProperty.call(window, 'onorientationchange')) {
  492. return screen.orientation.type.includes('landscape');
  493. }
  494. return window.innerHeight / window.innerWidth < 1;
  495. };
  496. // Public Utility Functions
  497. // ------------------------
  498. // Run device.js in noConflict mode,
  499. // returning the device variable to its previous owner.
  500. device.noConflict = function () {
  501. window.device = previousDevice;
  502. return this;
  503. };
  504. // Private Utility Functions
  505. // -------------------------
  506. // Simple UA string search
  507. function find(needle) {
  508. return userAgent.indexOf(needle) !== -1;
  509. }
  510. // Check if documentElement already has a given class.
  511. function hasClass(className) {
  512. return documentElement.className.match(new RegExp(className, 'i'));
  513. }
  514. // Add one or more CSS classes to the <html> element.
  515. function addClass(className) {
  516. var currentClassNames = null;
  517. if (!hasClass(className)) {
  518. currentClassNames = documentElement.className.replace(/^\s+|\s+$/g, '');
  519. documentElement.className = currentClassNames + ' ' + className;
  520. }
  521. }
  522. // Remove single CSS class from the <html> element.
  523. function removeClass(className) {
  524. if (hasClass(className)) {
  525. documentElement.className = documentElement.className.replace(' ' + className, '');
  526. }
  527. }
  528. // HTML Element Handling
  529. // ---------------------
  530. // Insert the appropriate CSS class based on the _user_agent.
  531. if (device.ios()) {
  532. if (device.ipad()) {
  533. addClass('ios ipad tablet');
  534. } else if (device.iphone()) {
  535. addClass('ios iphone mobile');
  536. } else if (device.ipod()) {
  537. addClass('ios ipod mobile');
  538. }
  539. } else if (device.macos()) {
  540. addClass('macos desktop');
  541. } else if (device.android()) {
  542. if (device.androidTablet()) {
  543. addClass('android tablet');
  544. } else {
  545. addClass('android mobile');
  546. }
  547. } else if (device.blackberry()) {
  548. if (device.blackberryTablet()) {
  549. addClass('blackberry tablet');
  550. } else {
  551. addClass('blackberry mobile');
  552. }
  553. } else if (device.windows()) {
  554. if (device.windowsTablet()) {
  555. addClass('windows tablet');
  556. } else if (device.windowsPhone()) {
  557. addClass('windows mobile');
  558. } else {
  559. addClass('windows desktop');
  560. }
  561. } else if (device.fxos()) {
  562. if (device.fxosTablet()) {
  563. addClass('fxos tablet');
  564. } else {
  565. addClass('fxos mobile');
  566. }
  567. } else if (device.meego()) {
  568. addClass('meego mobile');
  569. } else if (device.nodeWebkit()) {
  570. addClass('node-webkit');
  571. } else if (device.television()) {
  572. addClass('television');
  573. } else if (device.desktop()) {
  574. addClass('desktop');
  575. }
  576. if (device.cordova()) {
  577. addClass('cordova');
  578. }
  579. // Orientation Handling
  580. // --------------------
  581. // Handle device orientation changes.
  582. function handleOrientation() {
  583. if (device.landscape()) {
  584. removeClass('portrait');
  585. addClass('landscape');
  586. walkOnChangeOrientationList('landscape');
  587. } else {
  588. removeClass('landscape');
  589. addClass('portrait');
  590. walkOnChangeOrientationList('portrait');
  591. }
  592. setOrientationCache();
  593. }
  594. function walkOnChangeOrientationList(newOrientation) {
  595. for (var index in changeOrientationList) {
  596. changeOrientationList[index](newOrientation);
  597. }
  598. }
  599. device.onChangeOrientation = function (cb) {
  600. if (typeof cb == 'function') {
  601. changeOrientationList.push(cb);
  602. }
  603. };
  604. // Detect whether device supports orientationchange event,
  605. // otherwise fall back to the resize event.
  606. var orientationEvent = 'resize';
  607. if (Object.prototype.hasOwnProperty.call(window, 'onorientationchange')) {
  608. orientationEvent = 'orientationchange';
  609. }
  610. // Listen for changes in orientation.
  611. if (window.addEventListener) {
  612. window.addEventListener(orientationEvent, handleOrientation, false);
  613. } else if (window.attachEvent) {
  614. window.attachEvent(orientationEvent, handleOrientation);
  615. } else {
  616. window[orientationEvent] = handleOrientation;
  617. }
  618. handleOrientation();
  619. // Public functions to get the current value of type, os, or orientation
  620. // ---------------------------------------------------------------------
  621. function findMatch(arr) {
  622. for (var i = 0; i < arr.length; i++) {
  623. if (device[arr[i]]()) {
  624. return arr[i];
  625. }
  626. }
  627. return 'unknown';
  628. }
  629. device.type = findMatch(['mobile', 'tablet', 'desktop']);
  630. device.os = findMatch(['ios', 'iphone', 'ipad', 'ipod', 'android', 'blackberry', 'windows', 'fxos', 'meego', 'television']);
  631. function setOrientationCache() {
  632. device.orientation = findMatch(['portrait', 'landscape']);
  633. }
  634. setOrientationCache();
  635. exports.default = device;
  636. /***/ }),
  637. /* 4 */
  638. /***/ (function(module, exports) {
  639. module.exports = "data:application/vnd.ms-fontobject;base64,dAcAAMwGAAABAAIAAAAAAAIABQMAAAAAAAABAJABAAAAAExQAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAEbC5FwAAAAAAAAAAAAAAAAAAAAAAABAAaQBjAG8AbgBmAG8AbgB0AAAADgBSAGUAZwB1AGwAYQByAAAAFgBWAGUAcgBzAGkAbwBuACAAMQAuADAAAAAQAGkAYwBvAG4AZgBvAG4AdAAAAAAAAAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzI8mUkYAAABfAAAAFZjbWFwaSfRFAAAAeAAAAGGZ2x5ZqBQoO0AAANwAAAArGhlYWQU+6wjAAAA4AAAADZoaGVhB94DhQAAALwAAAAkaG10eAwBAAAAAAHUAAAADGxvY2EADgBWAAADaAAAAAhtYXhwARAAMAAAARgAAAAgbmFtZT5U/n0AAAQcAAACbXBvc3TD5yXjAAAGjAAAAD8AAQAAA4D/gABcBAEAAAAABAAAAQAAAAAAAAAAAAAAAAAAAAMAAQAAAAEAABe5sBFfDzz1AAsEAAAAAADY7jQTAAAAANjuNBMAAP+ABAADgAAAAAgAAgAAAAAAAAABAAAAAwAkAAMAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAAAAQQAAZAABQAIAokCzAAAAI8CiQLMAAAB6wAyAQgAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA5iPnJgOA/4AAXAOAAIAAAAABAAAAAAAABAAAAAQAAAAEAQAAAAAABQAAAAMAAAAsAAAABAAAAV4AAQAAAAAAWAADAAEAAAAsAAMACgAAAV4ABAAsAAAABgAEAAEAAuYj5yb//wAA5iPnJv//AAAAAAABAAYABgAAAAEAAgAAAQYAAAAAAAAAAAAAAAAAA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uY29tAAoAQwByAGUAYQB0AGUAZAAgAGIAeQAgAGkAYwBvAG4AZgBvAG4AdAAKAGkAYwBvAG4AZgBvAG4AdABSAGUAZwB1AGwAYQByAGkAYwBvAG4AZgBvAG4AdABpAGMAbwBuAGYAbwBuAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwAGkAYwBvAG4AZgBvAG4AdABHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAQIBAwEEAA5hcnJvd2Rvd24tY29weQRwbGF5AAAA"
  640. /***/ }),
  641. /* 5 */
  642. /***/ (function(module, exports) {
  643. module.exports = "data:application/vnd.ms-fontobject;base64,YA8AALgOAAABAAIAAAAAAAIABQMAAAAAAAABAJABAAAAAExQAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAdG5DQQAAAAAAAAAAAAAAAAAAAAAAABAAaQBjAG8AbgBmAG8AbgB0AAAADgBSAGUAZwB1AGwAYQByAAAAFgBWAGUAcgBzAGkAbwBuACAAMQAuADAAAAAQAGkAYwBvAG4AZgBvAG4AdAAAAAAAAAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzJW70yOAAABfAAAAFZjbWFwO8hK/wAAAgQAAAI8Z2x5ZmPo5JYAAARcAAAHLGhlYWQSO9jUAAAA4AAAADZoaGVhB94DjQAAALwAAAAkaG10eC/pAAAAAAHUAAAAMGxvY2EK2AjqAAAEQAAAABptYXhwASAAcgAAARgAAAAgbmFtZT5U/n0AAAuIAAACbXBvc3RSkUPCAAAN+AAAAMAAAQAAA4D/gABcBAAAAAAABAAAAQAAAAAAAAAAAAAAAAAAAAwAAQAAAAEAAEFDbnRfDzz1AAsEAAAAAAD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G4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAECAQMBBAEFAQYBBwEIAQkBCgELAQwBDQABeAUxbXVsdQhza2lwbmV4dAVjbG9zZQRwbGF5DXNraXAtcHJldmlvdXMRYXJyb3ctcm90YXRlLWxlZnQSYXJyb3ctcm90YXRlLXJpZ2h0EmJvZmFuZ3FpLWRhbm11Z3VhbhFib2ZhbmdxaS1kYW5tdWthaQ5uZWlyb25ncWllaHVhbgAA"
  644. /***/ }),
  645. /* 6 */
  646. /***/ (function(module, exports, __webpack_require__) {
  647. __webpack_require__(7);
  648. __webpack_require__(17);
  649. __webpack_require__(22);
  650. __webpack_require__(28);
  651. __webpack_require__(34);
  652. __webpack_require__(39);
  653. __webpack_require__(44);
  654. __webpack_require__(50);
  655. __webpack_require__(55);
  656. __webpack_require__(63);
  657. __webpack_require__(69);
  658. __webpack_require__(74);
  659. __webpack_require__(79);
  660. __webpack_require__(84);
  661. __webpack_require__(90);
  662. __webpack_require__(96);
  663. __webpack_require__(101);
  664. module.exports = __webpack_require__(107);
  665. /***/ }),
  666. /* 7 */
  667. /***/ (function(module, exports, __webpack_require__) {
  668. "use strict";
  669. var _index = __webpack_require__(8);
  670. var _index2 = _interopRequireDefault(_index);
  671. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  672. if (!window.AliPlayerComponent) {
  673. window.AliPlayerComponent = {};
  674. }
  675. window.AliPlayerComponent.AliplayerDanmuComponent = _index2.default;
  676. /***/ }),
  677. /* 8 */
  678. /***/ (function(module, exports, __webpack_require__) {
  679. "use strict";
  680. Object.defineProperty(exports, "__esModule", {
  681. value: true
  682. });
  683. var _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; }; }();
  684. var _index = __webpack_require__(9);
  685. var _index2 = _interopRequireDefault(_index);
  686. var _danmuControl = __webpack_require__(10);
  687. var _danmuControl2 = _interopRequireDefault(_danmuControl);
  688. var _danmuInput = __webpack_require__(11);
  689. var _danmuInput2 = _interopRequireDefault(_danmuInput);
  690. __webpack_require__(12);
  691. var _CommentCoreLibrary = __webpack_require__(14);
  692. __webpack_require__(15);
  693. var _utils = __webpack_require__(2);
  694. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  695. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  696. /**
  697. * 弹幕组件
  698. */
  699. var AliplayerDanmuComponent = function () {
  700. /**
  701. * @constructor 弹幕组件构造函数
  702. * @param {Array danmuList 弹幕数组, 参考 CommentCoreLibrary 文档 https://github.com/jabbany/CommentCoreLibrary/}
  703. * @param {id 或者 Element, sendEl, 发送弹幕的输入框, 默认为 null}
  704. */
  705. function AliplayerDanmuComponent(danmukuList) {
  706. var sendEl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'controlbar';
  707. _classCallCheck(this, AliplayerDanmuComponent);
  708. this.sendEl = sendEl;
  709. this.danmukuList = danmukuList;
  710. this.html = (0, _utils.parseDom)(_index2.default);
  711. this.danmuControlHtml = (0, _utils.parseDom)(_danmuControl2.default);
  712. this.sendEl = sendEl;
  713. this.danmuInput = sendEl === null ? null : (0, _utils.parseDom)(_danmuInput2.default);
  714. this.CM = null;
  715. this.userDanmuOpen = true; // 用户打开关闭弹幕的状态, 默认为 true 打开
  716. }
  717. _createClass(AliplayerDanmuComponent, [{
  718. key: 'createEl',
  719. value: function createEl(el, player) {
  720. var _this = this;
  721. console.log(player);
  722. var lang = player._options && player._options.language;
  723. this.isEn = lang && lang === 'en-us';
  724. if (this.danmuInput !== null) {
  725. this.danmuInput.querySelector('.danmu-input-enter').innerText = this.isEn ? 'Enter' : '发送';
  726. this.danmuInput.querySelector('input').setAttribute('placeholder', this.isEn ? 'Input danmu' : '输入弹幕');
  727. }
  728. this.danmuControlHtml.querySelector('.player-tooltip.close').innerText = this.isEn ? 'Close Bullect' : '关闭弹幕';
  729. this.danmuControlHtml.querySelector('.player-tooltip.open').innerText = this.isEn ? 'Open Bullect' : '打开弹幕';
  730. if (this.sendEl === 'controlbar') {
  731. var danmuInputWrapEle = this.danmuControlHtml.querySelector('.ali-danmu-input-wrap');
  732. danmuInputWrapEle.style.display = 'inline-block';
  733. danmuInputWrapEle.appendChild(this.danmuInput);
  734. } else if (this.sendEl !== null) {
  735. if ((0, _utils.isElement)(this.sendEl)) {
  736. this.sendEl.appendChild(this.danmuInput);
  737. } else if (typeof this.sendEl === 'string') {
  738. var sendEl = document.querySelector(this.sendEl);
  739. if ((0, _utils.isElement)(sendEl)) {
  740. sendEl.appendChild(this.danmuInput);
  741. } else {
  742. throw new Error('sendEl must be an element or selector string');
  743. }
  744. } else {
  745. throw new Error('sendEl must be an element or selector string');
  746. }
  747. }
  748. el.querySelector('.prism-controlbar').appendChild(this.danmuControlHtml);
  749. var videoSiblingElement = el.querySelector('video').nextElementSibling;
  750. if (videoSiblingElement) {
  751. el.insertBefore(this.html, videoSiblingElement);
  752. } else {
  753. el.appendChild(this.html);
  754. }
  755. this.CM = new _CommentCoreLibrary.CommentManager(this.html.querySelector('.danmu')); // 初始化 CommentManager
  756. this.CM.init();
  757. this.CM.load(this.danmukuList);
  758. /* 根据视频播放器的 timeupdate 事件更新弹幕的事件轴 */
  759. el.querySelector('video').ontimeupdate = function () {
  760. if (el.querySelector('video') !== null) {
  761. _this.CM.time(el.querySelector('video').currentTime * 1000);
  762. }
  763. };
  764. var danmuCloseElement = this.danmuControlHtml.querySelector('.icon-danmu-close');
  765. var danmuOpenElement = this.danmuControlHtml.querySelector('.icon-danmu-open');
  766. /* 绑定控制条关闭弹幕处理函数 */
  767. danmuCloseElement.onclick = function () {
  768. _this.userDanmuOpen = false;
  769. danmuCloseElement.style.display = 'none';
  770. danmuOpenElement.style.display = 'inline-block';
  771. _this.CM.clear();
  772. _this.CM.stop();
  773. };
  774. /* 绑定控制条打开弹幕控制条 */
  775. danmuOpenElement.onclick = function () {
  776. danmuOpenElement.style.display = 'none';
  777. danmuCloseElement.style.display = 'inline-block';
  778. _this.userDanmuOpen = true;
  779. _this.CM.start();
  780. };
  781. if (this.danmuInput !== null) {
  782. var danmuInputEle = this.danmuInput.querySelector('.ali-danmu-input input');
  783. var danmuEnter = this.danmuInput.querySelector('.danmu-input-enter');
  784. danmuEnter.onclick = this.sendDanmuHandle.bind(this);
  785. danmuInputEle.onkeydown = function (e) {
  786. if (e.keyCode === 13) {
  787. _this.sendDanmuHandle.call(_this);
  788. }
  789. };
  790. }
  791. }
  792. // 弹幕发送按钮点击事件和弹幕输入框按下 enter 键, 处理事件
  793. }, {
  794. key: 'sendDanmuHandle',
  795. value: function sendDanmuHandle() {
  796. var danmuInputEle = this.danmuInput.querySelector('.ali-danmu-input input');
  797. var danmuText = danmuInputEle.value;
  798. var commentSize = [16, 18, 25, 36, 45];
  799. var commentColor = [0xffffff, 0x0000ff, 0xcc0000, 0xff66ff, 0xffff33];
  800. if (danmuText === '') {
  801. return;
  802. }
  803. this.send({
  804. "mode": 1,
  805. "text": danmuText,
  806. "stime": 1000,
  807. "size": commentSize[this.randomIndex(5)],
  808. "color": commentColor[this.randomIndex(5)]
  809. });
  810. danmuInputEle.value = '';
  811. danmuInputEle.focus();
  812. }
  813. }, {
  814. key: 'randomIndex',
  815. value: function randomIndex(max) {
  816. return Math.floor(Math.random() * max);
  817. }
  818. }, {
  819. key: 'play',
  820. value: function play(player, e) {
  821. if (this.userDanmuOpen) {
  822. this.CM.start();
  823. }
  824. }
  825. }, {
  826. key: 'pause',
  827. value: function pause(player, e) {
  828. if (this.userDanmuOpen) {
  829. this.CM.stop();
  830. }
  831. }
  832. }, {
  833. key: 'send',
  834. value: function send(danmuku) {
  835. this.CM.send(danmuku);
  836. }
  837. /**
  838. * 暴露出去的插入弹幕的方法
  839. * @param {Object danmuku 弹幕对象 只能一条一条插入}
  840. */
  841. }, {
  842. key: 'insert',
  843. value: function insert(danmuku) {
  844. this.CM && this.CM.insert(danmuku);
  845. }
  846. }, {
  847. key: 'dispose',
  848. value: function dispose() {
  849. if (this.danmuInput !== null) {
  850. this.danmuInput.parentNode && this.danmuInput.parentNode.removeChild(this.danmuInput);
  851. }
  852. }
  853. }]);
  854. return AliplayerDanmuComponent;
  855. }();
  856. exports.default = AliplayerDanmuComponent;
  857. /***/ }),
  858. /* 9 */
  859. /***/ (function(module, exports) {
  860. module.exports = "<div class=\"aliplayer-danmuku abp\">\n <div class=\"danmu container\"></div>\n</div>";
  861. /***/ }),
  862. /* 10 */
  863. /***/ (function(module, exports) {
  864. module.exports = "<div class=\"ali-danmuku-control\">\n <div class=\"ali-danmu-input-wrap\"></div>\n <i class=\"iconfont icon-danmu-close\"></i>\n <div class=\"player-tooltip close\"></div>\n <i class=\"iconfont icon-danmu-open\" style=\"display: none;\"></i>\n <div class=\"player-tooltip open\"></div> \n</div>";
  865. /***/ }),
  866. /* 11 */
  867. /***/ (function(module, exports) {
  868. module.exports = "<div class=\"ali-danmu-input\">\n <input type=\"text\" placeholder=\"\">\n <button class=\"danmu-input-enter\"></button>\n</div>";
  869. /***/ }),
  870. /* 12 */
  871. /***/ (function(module, exports, __webpack_require__) {
  872. // style-loader: Adds some css to the DOM by adding a <style> tag
  873. // load the styles
  874. var content = __webpack_require__(13);
  875. if(typeof content === 'string') content = [[module.i, content, '']];
  876. // add the styles to the DOM
  877. var update = __webpack_require__(1)(content, {});
  878. if(content.locals) module.exports = content.locals;
  879. // Hot Module Replacement
  880. if(false) {}
  881. /***/ }),
  882. /* 13 */
  883. /***/ (function(module, exports, __webpack_require__) {
  884. exports = module.exports = __webpack_require__(0)();
  885. // imports
  886. // module
  887. exports.push([module.i, ".aliplayer-danmuku {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%; }\n .aliplayer-danmuku.abp {\n position: absolute; }\n .aliplayer-danmuku.abp .container {\n z-index: 0; }\n .aliplayer-danmuku .danmu {\n position: absolute;\n width: 100%;\n height: 100%; }\n\n.ali-danmuku-control {\n float: right;\n color: #fff;\n margin-right: 5px;\n position: relative;\n display: table-cell;\n margin-top: 8px; }\n .ali-danmuku-control .iconfont {\n font-size: 35px;\n cursor: pointer;\n vertical-align: middle;\n user-select: none;\n line-height: initial; }\n .ali-danmuku-control .iconfont.icon-danmu-close {\n display: inline-block; }\n .ali-danmuku-control .player-tooltip.close, .ali-danmuku-control .player-tooltip.open {\n right: -12px; }\n @media (min-width: 768px) {\n .ali-danmuku-control .icon-danmu-close:hover + .player-tooltip {\n display: block; }\n .ali-danmuku-control .icon-danmu-open:hover + .player-tooltip {\n display: block; } }\n .ali-danmuku-control .ali-danmu-input-wrap {\n width: 200px;\n display: none; }\n\n.ali-danmu-input {\n position: relative;\n width: 100%;\n display: inline-block; }\n .ali-danmu-input input {\n display: inline-block;\n width: 100%;\n padding-right: 40px;\n box-sizing: border-box;\n padding: 5px 40px 5px 5px;\n background-color: rgba(130, 132, 138, 0.4);\n border: 1px solid #c0c4cc;\n font-size: 14px;\n color: #fff;\n border-radius: 3px; }\n .ali-danmu-input input:focus {\n outline: none;\n border-color: #0f84fd; }\n .ali-danmu-input .danmu-input-enter {\n position: absolute;\n right: 0;\n top: 0;\n border: 1px solid;\n color: #fff;\n background-color: #0f84fd;\n border-color: #0f84fd;\n font-size: 12px;\n padding: 6px 7px;\n display: inline-block;\n height: 28px;\n border-radius: 0 3px 3px 0;\n cursor: pointer; }\n .ali-danmu-input .danmu-input-enter:focus {\n outline: none; }\n .ali-danmu-input .danmu-input-enter:hover {\n background-color: #288df5;\n border-color: #288df5; }\n", ""]);
  888. // exports
  889. /***/ }),
  890. /* 14 */
  891. /***/ (function(module, exports, __webpack_require__) {
  892. "use strict";
  893. Object.defineProperty(exports, "__esModule", {
  894. value: true
  895. });
  896. /**
  897. * Binary Search Stubs for JS Arrays
  898. * @license MIT
  899. * @author Jim Chen
  900. */
  901. var BinArray = function () {
  902. var BinArray = {};
  903. BinArray.bsearch = function (arr, what, how) {
  904. if (arr.length === 0) {
  905. return 0;
  906. }
  907. if (how(what, arr[0]) < 0) {
  908. return 0;
  909. }
  910. if (how(what, arr[arr.length - 1]) >= 0) {
  911. return arr.length;
  912. }
  913. var low = 0;
  914. var i = 0;
  915. var count = 0;
  916. var high = arr.length - 1;
  917. while (low <= high) {
  918. i = Math.floor((high + low + 1) / 2);
  919. count++;
  920. if (how(what, arr[i - 1]) >= 0 && how(what, arr[i]) < 0) {
  921. return i;
  922. }
  923. if (how(what, arr[i - 1]) < 0) {
  924. high = i - 1;
  925. } else if (how(what, arr[i]) >= 0) {
  926. low = i;
  927. } else {
  928. console.error('Program Error');
  929. }
  930. if (count > 1500) {
  931. console.error('Too many run cycles.');
  932. }
  933. }
  934. return -1; // Never actually run
  935. };
  936. BinArray.binsert = function (arr, what, how) {
  937. var index = BinArray.bsearch(arr, what, how);
  938. arr.splice(index, 0, what);
  939. return index;
  940. };
  941. return BinArray;
  942. }();
  943. var __extends = undefined && undefined.__extends || function (d, b) {
  944. for (var p in b) {
  945. if (b.hasOwnProperty(p)) d[p] = b[p];
  946. }function __() {
  947. this.constructor = d;
  948. }
  949. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  950. };
  951. var CommentSpaceAllocator = function () {
  952. function CommentSpaceAllocator(width, height) {
  953. if (width === void 0) {
  954. width = 0;
  955. }
  956. if (height === void 0) {
  957. height = 0;
  958. }
  959. this._pools = [[]];
  960. this.avoid = 1;
  961. this._width = width;
  962. this._height = height;
  963. }
  964. CommentSpaceAllocator.prototype.willCollide = function (existing, check) {
  965. return existing.stime + existing.ttl >= check.stime + check.ttl / 2;
  966. };
  967. CommentSpaceAllocator.prototype.pathCheck = function (y, comment, pool) {
  968. var bottom = y + comment.height;
  969. var right = comment.right;
  970. for (var i = 0; i < pool.length; i++) {
  971. if (pool[i].y > bottom || pool[i].bottom < y) {
  972. continue;
  973. } else if (pool[i].right < comment.x || pool[i].x > right) {
  974. if (this.willCollide(pool[i], comment)) {
  975. return false;
  976. } else {
  977. continue;
  978. }
  979. } else {
  980. return false;
  981. }
  982. }
  983. return true;
  984. };
  985. CommentSpaceAllocator.prototype.assign = function (comment, cindex) {
  986. while (this._pools.length <= cindex) {
  987. this._pools.push([]);
  988. }
  989. var pool = this._pools[cindex];
  990. if (pool.length === 0) {
  991. comment.cindex = cindex;
  992. return 0;
  993. } else if (this.pathCheck(0, comment, pool)) {
  994. comment.cindex = cindex;
  995. return 0;
  996. }
  997. var y = 0;
  998. for (var k = 0; k < pool.length; k++) {
  999. y = pool[k].bottom + this.avoid;
  1000. if (y + comment.height > this._height) {
  1001. break;
  1002. }
  1003. if (this.pathCheck(y, comment, pool)) {
  1004. comment.cindex = cindex;
  1005. return y;
  1006. }
  1007. }
  1008. return this.assign(comment, cindex + 1);
  1009. };
  1010. CommentSpaceAllocator.prototype.add = function (comment) {
  1011. if (comment.height > this._height) {
  1012. comment.cindex = -2;
  1013. comment.y = 0;
  1014. } else {
  1015. comment.y = this.assign(comment, 0);
  1016. BinArray.binsert(this._pools[comment.cindex], comment, function (a, b) {
  1017. if (a.bottom < b.bottom) {
  1018. return -1;
  1019. } else if (a.bottom > b.bottom) {
  1020. return 1;
  1021. } else {
  1022. return 0;
  1023. }
  1024. });
  1025. }
  1026. };
  1027. CommentSpaceAllocator.prototype.remove = function (comment) {
  1028. if (comment.cindex < 0) {
  1029. return;
  1030. }
  1031. if (comment.cindex >= this._pools.length) {
  1032. throw new Error("cindex out of bounds");
  1033. }
  1034. var index = this._pools[comment.cindex].indexOf(comment);
  1035. if (index < 0) return;
  1036. this._pools[comment.cindex].splice(index, 1);
  1037. };
  1038. CommentSpaceAllocator.prototype.setBounds = function (width, height) {
  1039. this._width = width;
  1040. this._height = height;
  1041. };
  1042. return CommentSpaceAllocator;
  1043. }();
  1044. var AnchorCommentSpaceAllocator = function (_super) {
  1045. __extends(AnchorCommentSpaceAllocator, _super);
  1046. function AnchorCommentSpaceAllocator() {
  1047. _super.apply(this, arguments);
  1048. }
  1049. AnchorCommentSpaceAllocator.prototype.add = function (comment) {
  1050. _super.prototype.add.call(this, comment);
  1051. comment.x = (this._width - comment.width) / 2;
  1052. };
  1053. AnchorCommentSpaceAllocator.prototype.willCollide = function (a, b) {
  1054. return true;
  1055. };
  1056. AnchorCommentSpaceAllocator.prototype.pathCheck = function (y, comment, pool) {
  1057. var bottom = y + comment.height;
  1058. for (var i = 0; i < pool.length; i++) {
  1059. if (pool[i].y > bottom || pool[i].bottom < y) {
  1060. continue;
  1061. } else {
  1062. return false;
  1063. }
  1064. }
  1065. return true;
  1066. };
  1067. return AnchorCommentSpaceAllocator;
  1068. }(CommentSpaceAllocator);
  1069. //# sourceMappingURL=CommentSpaceAllocator.js.map
  1070. var __extends = undefined && undefined.__extends || function (d, b) {
  1071. for (var p in b) {
  1072. if (b.hasOwnProperty(p)) d[p] = b[p];
  1073. }function __() {
  1074. this.constructor = d;
  1075. }
  1076. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  1077. };
  1078. var CoreComment = function () {
  1079. function CoreComment(parent, init) {
  1080. if (init === void 0) {
  1081. init = {};
  1082. }
  1083. this.mode = 1;
  1084. this.stime = 0;
  1085. this.text = "";
  1086. this.ttl = 4000;
  1087. this.dur = 4000;
  1088. this.cindex = -1;
  1089. this.motion = [];
  1090. this.movable = true;
  1091. this._alphaMotion = null;
  1092. this.absolute = true;
  1093. this.align = 0;
  1094. this._alpha = 1;
  1095. this._size = 25;
  1096. this._color = 0xffffff;
  1097. this._border = false;
  1098. this._shadow = true;
  1099. this._font = "";
  1100. if (!parent) {
  1101. throw new Error("Comment not bound to comment manager.");
  1102. } else {
  1103. this.parent = parent;
  1104. }
  1105. if (init.hasOwnProperty("stime")) {
  1106. this.stime = init["stime"];
  1107. }
  1108. if (init.hasOwnProperty("mode")) {
  1109. this.mode = init["mode"];
  1110. } else {
  1111. this.mode = 1;
  1112. }
  1113. if (init.hasOwnProperty("dur")) {
  1114. this.dur = init["dur"];
  1115. this.ttl = this.dur;
  1116. }
  1117. this.dur *= this.parent.options.global.scale;
  1118. this.ttl *= this.parent.options.global.scale;
  1119. if (init.hasOwnProperty("text")) {
  1120. this.text = init["text"];
  1121. }
  1122. if (init.hasOwnProperty("motion")) {
  1123. this._motionStart = [];
  1124. this._motionEnd = [];
  1125. this.motion = init["motion"];
  1126. var head = 0;
  1127. for (var i = 0; i < init["motion"].length; i++) {
  1128. this._motionStart.push(head);
  1129. var maxDur = 0;
  1130. for (var k in init["motion"][i]) {
  1131. var m = init["motion"][i][k];
  1132. maxDur = Math.max(m.dur, maxDur);
  1133. if (m.easing === null || m.easing === undefined) {
  1134. init["motion"][i][k]["easing"] = CoreComment.LINEAR;
  1135. }
  1136. }
  1137. head += maxDur;
  1138. this._motionEnd.push(head);
  1139. }
  1140. this._curMotion = 0;
  1141. }
  1142. if (init.hasOwnProperty("color")) {
  1143. this._color = init["color"];
  1144. }
  1145. if (init.hasOwnProperty("size")) {
  1146. this._size = init["size"];
  1147. }
  1148. if (init.hasOwnProperty("border")) {
  1149. this._border = init["border"];
  1150. }
  1151. if (init.hasOwnProperty("opacity")) {
  1152. this._alpha = init["opacity"];
  1153. }
  1154. if (init.hasOwnProperty("alpha")) {
  1155. this._alphaMotion = init["alpha"];
  1156. }
  1157. if (init.hasOwnProperty("font")) {
  1158. this._font = init["font"];
  1159. }
  1160. if (init.hasOwnProperty("x")) {
  1161. this._x = init["x"];
  1162. }
  1163. if (init.hasOwnProperty("y")) {
  1164. this._y = init["y"];
  1165. }
  1166. if (init.hasOwnProperty("shadow")) {
  1167. this._shadow = init["shadow"];
  1168. }
  1169. if (init.hasOwnProperty("position")) {
  1170. if (init["position"] === "relative") {
  1171. this.absolute = false;
  1172. if (this.mode < 7) {
  1173. console.warn("Using relative position for CSA comment.");
  1174. }
  1175. }
  1176. }
  1177. }
  1178. CoreComment.prototype.init = function (recycle) {
  1179. if (recycle === void 0) {
  1180. recycle = null;
  1181. }
  1182. if (recycle !== null) {
  1183. this.dom = recycle.dom;
  1184. } else {
  1185. this.dom = document.createElement("div");
  1186. }
  1187. this.dom.className = this.parent.options.global.className;
  1188. this.dom.appendChild(document.createTextNode(this.text));
  1189. this.dom.textContent = this.text;
  1190. this.dom.innerText = this.text;
  1191. this.size = this._size;
  1192. if (this._color != 0xffffff) {
  1193. this.color = this._color;
  1194. }
  1195. this.shadow = this._shadow;
  1196. if (this._border) {
  1197. this.border = this._border;
  1198. }
  1199. if (this._font !== "") {
  1200. this.font = this._font;
  1201. }
  1202. if (this._x !== undefined) {
  1203. this.x = this._x;
  1204. }
  1205. if (this._y !== undefined) {
  1206. this.y = this._y;
  1207. }
  1208. if (this._alpha !== 1 || this.parent.options.global.opacity < 1) {
  1209. this.alpha = this._alpha;
  1210. }
  1211. if (this.motion.length > 0) {
  1212. this.animate();
  1213. }
  1214. };
  1215. Object.defineProperty(CoreComment.prototype, "x", {
  1216. get: function get() {
  1217. if (this._x === null || this._x === undefined) {
  1218. if (this.align % 2 === 0) {
  1219. this._x = this.dom.offsetLeft;
  1220. } else {
  1221. this._x = this.parent.width - this.dom.offsetLeft - this.width;
  1222. }
  1223. }
  1224. if (!this.absolute) {
  1225. return this._x / this.parent.width;
  1226. }
  1227. return this._x;
  1228. },
  1229. set: function set(x) {
  1230. this._x = x;
  1231. if (!this.absolute) {
  1232. this._x *= this.parent.width;
  1233. }
  1234. if (this.align % 2 === 0) {
  1235. this.dom.style.left = this._x + "px";
  1236. } else {
  1237. this.dom.style.right = this._x + "px";
  1238. }
  1239. },
  1240. enumerable: true,
  1241. configurable: true
  1242. });
  1243. Object.defineProperty(CoreComment.prototype, "y", {
  1244. get: function get() {
  1245. if (this._y === null || this._y === undefined) {
  1246. if (this.align < 2) {
  1247. this._y = this.dom.offsetTop;
  1248. } else {
  1249. this._y = this.parent.height - this.dom.offsetTop - this.height;
  1250. }
  1251. }
  1252. if (!this.absolute) {
  1253. return this._y / this.parent.height;
  1254. }
  1255. return this._y;
  1256. },
  1257. set: function set(y) {
  1258. this._y = y;
  1259. if (!this.absolute) {
  1260. this._y *= this.parent.height;
  1261. }
  1262. if (this.align < 2) {
  1263. this.dom.style.top = this._y + "px";
  1264. } else {
  1265. this.dom.style.bottom = this._y + "px";
  1266. }
  1267. },
  1268. enumerable: true,
  1269. configurable: true
  1270. });
  1271. Object.defineProperty(CoreComment.prototype, "bottom", {
  1272. get: function get() {
  1273. return this.y + this.height;
  1274. },
  1275. enumerable: true,
  1276. configurable: true
  1277. });
  1278. Object.defineProperty(CoreComment.prototype, "right", {
  1279. get: function get() {
  1280. return this.x + this.width;
  1281. },
  1282. enumerable: true,
  1283. configurable: true
  1284. });
  1285. Object.defineProperty(CoreComment.prototype, "width", {
  1286. get: function get() {
  1287. if (this._width === null || this._width === undefined) {
  1288. this._width = this.dom.offsetWidth;
  1289. }
  1290. return this._width;
  1291. },
  1292. set: function set(w) {
  1293. this._width = w;
  1294. this.dom.style.width = this._width + "px";
  1295. },
  1296. enumerable: true,
  1297. configurable: true
  1298. });
  1299. Object.defineProperty(CoreComment.prototype, "height", {
  1300. get: function get() {
  1301. if (this._height === null || this._height === undefined) {
  1302. this._height = this.dom.offsetHeight;
  1303. }
  1304. return this._height;
  1305. },
  1306. set: function set(h) {
  1307. this._height = h;
  1308. this.dom.style.height = this._height + "px";
  1309. },
  1310. enumerable: true,
  1311. configurable: true
  1312. });
  1313. Object.defineProperty(CoreComment.prototype, "size", {
  1314. get: function get() {
  1315. return this._size;
  1316. },
  1317. set: function set(s) {
  1318. this._size = s;
  1319. this.dom.style.fontSize = this._size + "px";
  1320. },
  1321. enumerable: true,
  1322. configurable: true
  1323. });
  1324. Object.defineProperty(CoreComment.prototype, "color", {
  1325. get: function get() {
  1326. return this._color;
  1327. },
  1328. set: function set(c) {
  1329. this._color = c;
  1330. var color = c.toString(16);
  1331. color = color.length >= 6 ? color : new Array(6 - color.length + 1).join("0") + color;
  1332. this.dom.style.color = "#" + color;
  1333. if (this._color === 0) {
  1334. this.dom.className = this.parent.options.global.className + " rshadow";
  1335. }
  1336. },
  1337. enumerable: true,
  1338. configurable: true
  1339. });
  1340. Object.defineProperty(CoreComment.prototype, "alpha", {
  1341. get: function get() {
  1342. return this._alpha;
  1343. },
  1344. set: function set(a) {
  1345. this._alpha = a;
  1346. this.dom.style.opacity = Math.min(this._alpha, this.parent.options.global.opacity) + "";
  1347. },
  1348. enumerable: true,
  1349. configurable: true
  1350. });
  1351. Object.defineProperty(CoreComment.prototype, "border", {
  1352. get: function get() {
  1353. return this._border;
  1354. },
  1355. set: function set(b) {
  1356. this._border = b;
  1357. if (this._border) {
  1358. this.dom.style.border = "1px solid #00ffff";
  1359. } else {
  1360. this.dom.style.border = "none";
  1361. }
  1362. },
  1363. enumerable: true,
  1364. configurable: true
  1365. });
  1366. Object.defineProperty(CoreComment.prototype, "shadow", {
  1367. get: function get() {
  1368. return this._shadow;
  1369. },
  1370. set: function set(s) {
  1371. this._shadow = s;
  1372. if (!this._shadow) {
  1373. this.dom.className = this.parent.options.global.className + " noshadow";
  1374. }
  1375. },
  1376. enumerable: true,
  1377. configurable: true
  1378. });
  1379. Object.defineProperty(CoreComment.prototype, "font", {
  1380. get: function get() {
  1381. return this._font;
  1382. },
  1383. set: function set(f) {
  1384. this._font = f;
  1385. if (this._font.length > 0) {
  1386. this.dom.style.fontFamily = this._font;
  1387. } else {
  1388. this.dom.style.fontFamily = "";
  1389. }
  1390. },
  1391. enumerable: true,
  1392. configurable: true
  1393. });
  1394. CoreComment.prototype.time = function (time) {
  1395. this.ttl -= time;
  1396. if (this.ttl < 0) {
  1397. this.ttl = 0;
  1398. }
  1399. if (this.movable) {
  1400. this.update();
  1401. }
  1402. if (this.ttl <= 0) {
  1403. this.finish();
  1404. }
  1405. };
  1406. CoreComment.prototype.update = function () {
  1407. this.animate();
  1408. };
  1409. CoreComment.prototype.invalidate = function () {
  1410. this._x = null;
  1411. this._y = null;
  1412. this._width = null;
  1413. this._height = null;
  1414. };
  1415. CoreComment.prototype._execMotion = function (currentMotion, time) {
  1416. for (var prop in currentMotion) {
  1417. if (currentMotion.hasOwnProperty(prop)) {
  1418. var m = currentMotion[prop];
  1419. this[prop] = m.easing(Math.min(Math.max(time - m.delay, 0), m.dur), m.from, m.to - m.from, m.dur);
  1420. }
  1421. }
  1422. };
  1423. CoreComment.prototype.animate = function () {
  1424. if (this._alphaMotion) {
  1425. this.alpha = (this.dur - this.ttl) * (this._alphaMotion["to"] - this._alphaMotion["from"]) / this.dur + this._alphaMotion["from"];
  1426. }
  1427. if (this.motion.length === 0) {
  1428. return;
  1429. }
  1430. var ttl = Math.max(this.ttl, 0);
  1431. var time = this.dur - ttl - this._motionStart[this._curMotion];
  1432. this._execMotion(this.motion[this._curMotion], time);
  1433. if (this.dur - ttl > this._motionEnd[this._curMotion]) {
  1434. this._curMotion++;
  1435. if (this._curMotion >= this.motion.length) {
  1436. this._curMotion = this.motion.length - 1;
  1437. }
  1438. return;
  1439. }
  1440. };
  1441. CoreComment.prototype.finish = function () {
  1442. this.parent.finish(this);
  1443. };
  1444. CoreComment.prototype.toString = function () {
  1445. return ["[", this.stime, "|", this.ttl, "/", this.dur, "]", "(", this.mode, ")", this.text].join("");
  1446. };
  1447. CoreComment.LINEAR = function (t, b, c, d) {
  1448. return t * c / d + b;
  1449. };
  1450. return CoreComment;
  1451. }();
  1452. var ScrollComment = function (_super) {
  1453. __extends(ScrollComment, _super);
  1454. function ScrollComment(parent, data) {
  1455. _super.call(this, parent, data);
  1456. this.dur *= this.parent.options.scroll.scale;
  1457. this.ttl *= this.parent.options.scroll.scale;
  1458. }
  1459. Object.defineProperty(ScrollComment.prototype, "alpha", {
  1460. set: function set(a) {
  1461. this._alpha = a;
  1462. this.dom.style.opacity = Math.min(Math.min(this._alpha, this.parent.options.global.opacity), this.parent.options.scroll.opacity) + "";
  1463. },
  1464. enumerable: true,
  1465. configurable: true
  1466. });
  1467. ScrollComment.prototype.init = function (recycle) {
  1468. if (recycle === void 0) {
  1469. recycle = null;
  1470. }
  1471. _super.prototype.init.call(this, recycle);
  1472. this.x = this.parent.width;
  1473. if (this.parent.options.scroll.opacity < 1) {
  1474. this.alpha = this._alpha;
  1475. }
  1476. this.absolute = true;
  1477. };
  1478. ScrollComment.prototype.update = function () {
  1479. this.x = this.ttl / this.dur * (this.parent.width + this.width) - this.width;
  1480. };
  1481. return ScrollComment;
  1482. }(CoreComment);
  1483. //# sourceMappingURL=Comment.js.map
  1484. /**
  1485. * Comment Filters Module Simplified (only supports modifiers & types)
  1486. * @license MIT
  1487. * @author Jim Chen
  1488. */
  1489. function CommentFilter() {
  1490. this.modifiers = [];
  1491. this.runtime = null;
  1492. this.allowTypes = {
  1493. "1": true,
  1494. "4": true,
  1495. "5": true,
  1496. "6": true,
  1497. "7": true,
  1498. "8": true,
  1499. "17": true
  1500. };
  1501. this.doModify = function (cmt) {
  1502. for (var k = 0; k < this.modifiers.length; k++) {
  1503. cmt = this.modifiers[k](cmt);
  1504. }
  1505. return cmt;
  1506. };
  1507. this.beforeSend = function (cmt) {
  1508. return cmt;
  1509. };
  1510. this.doValidate = function (cmtData) {
  1511. if (!this.allowTypes[cmtData.mode]) return false;
  1512. return true;
  1513. };
  1514. this.addRule = function (rule) {};
  1515. this.addModifier = function (f) {
  1516. this.modifiers.push(f);
  1517. };
  1518. this.runtimeFilter = function (cmt) {
  1519. if (this.runtime == null) return cmt;
  1520. return this.runtime(cmt);
  1521. };
  1522. this.setRuntimeFilter = function (f) {
  1523. this.runtime = f;
  1524. };
  1525. }
  1526. /*!
  1527. * Comment Core Library CommentManager
  1528. * @license MIT
  1529. * @author Jim Chen
  1530. *
  1531. * Copyright (c) 2014 Jim Chen
  1532. */
  1533. var CommentManager = function () {
  1534. var getRotMatrix = function getRotMatrix(yrot, zrot) {
  1535. // Courtesy of @StarBrilliant, re-adapted to look better
  1536. var DEG2RAD = Math.PI / 180;
  1537. var yr = yrot * DEG2RAD;
  1538. var zr = zrot * DEG2RAD;
  1539. var COS = Math.cos;
  1540. var SIN = Math.sin;
  1541. var matrix = [COS(yr) * COS(zr), COS(yr) * SIN(zr), SIN(yr), 0, -SIN(zr), COS(zr), 0, 0, -SIN(yr) * COS(zr), -SIN(yr) * SIN(zr), COS(yr), 0, 0, 0, 0, 1];
  1542. // CSS does not recognize scientific notation (e.g. 1e-6), truncating it.
  1543. for (var i = 0; i < matrix.length; i++) {
  1544. if (Math.abs(matrix[i]) < 0.000001) {
  1545. matrix[i] = 0;
  1546. }
  1547. }
  1548. return "matrix3d(" + matrix.join(",") + ")";
  1549. };
  1550. function CommentManager(stageObject) {
  1551. var __timer = 0;
  1552. this._listeners = {};
  1553. this._lastPosition = 0;
  1554. this.stage = stageObject;
  1555. this.options = {
  1556. global: {
  1557. opacity: 1,
  1558. scale: 1,
  1559. className: "cmt"
  1560. },
  1561. scroll: {
  1562. opacity: 1,
  1563. scale: 1
  1564. },
  1565. limit: 0
  1566. };
  1567. this.timeline = [];
  1568. this.runline = [];
  1569. this.position = 0;
  1570. this.limiter = 0;
  1571. this.filter = null;
  1572. this.csa = {
  1573. scroll: new CommentSpaceAllocator(0, 0),
  1574. top: new AnchorCommentSpaceAllocator(0, 0),
  1575. bottom: new AnchorCommentSpaceAllocator(0, 0),
  1576. reverse: new CommentSpaceAllocator(0, 0),
  1577. scrollbtm: new CommentSpaceAllocator(0, 0)
  1578. };
  1579. /** Precompute the offset width **/
  1580. this.width = this.stage.offsetWidth;
  1581. this.height = this.stage.offsetHeight;
  1582. this.startTimer = function () {
  1583. if (__timer > 0) return;
  1584. var lastTPos = new Date().getTime();
  1585. var cmMgr = this;
  1586. __timer = window.setInterval(function () {
  1587. var elapsed = new Date().getTime() - lastTPos;
  1588. lastTPos = new Date().getTime();
  1589. cmMgr.onTimerEvent(elapsed, cmMgr);
  1590. }, 10);
  1591. };
  1592. this.stopTimer = function () {
  1593. window.clearInterval(__timer);
  1594. __timer = 0;
  1595. };
  1596. }
  1597. /** Public **/
  1598. CommentManager.prototype.stop = function () {
  1599. this.stopTimer();
  1600. };
  1601. CommentManager.prototype.start = function () {
  1602. this.startTimer();
  1603. };
  1604. CommentManager.prototype.seek = function (time) {
  1605. this.position = BinArray.bsearch(this.timeline, time, function (a, b) {
  1606. if (a < b.stime) return -1;else if (a > b.stime) return 1;else return 0;
  1607. });
  1608. };
  1609. CommentManager.prototype.validate = function (cmt) {
  1610. if (cmt == null) return false;
  1611. return this.filter.doValidate(cmt);
  1612. };
  1613. CommentManager.prototype.load = function (a) {
  1614. this.timeline = a;
  1615. this.timeline.sort(function (a, b) {
  1616. if (a.stime > b.stime) return 2;else if (a.stime < b.stime) return -2;else {
  1617. if (a.date > b.date) return 1;else if (a.date < b.date) return -1;else if (a.dbid != null && b.dbid != null) {
  1618. if (a.dbid > b.dbid) return 1;else if (a.dbid < b.dbid) return -1;
  1619. return 0;
  1620. } else return 0;
  1621. }
  1622. });
  1623. this.dispatchEvent("load");
  1624. };
  1625. CommentManager.prototype.insert = function (c) {
  1626. var index = BinArray.binsert(this.timeline, c, function (a, b) {
  1627. if (a.stime > b.stime) return 2;else if (a.stime < b.stime) return -2;else {
  1628. if (a.date > b.date) return 1;else if (a.date < b.date) return -1;else if (a.dbid != null && b.dbid != null) {
  1629. if (a.dbid > b.dbid) return 1;else if (a.dbid < b.dbid) return -1;
  1630. return 0;
  1631. } else return 0;
  1632. }
  1633. });
  1634. if (index <= this.position) {
  1635. this.position++;
  1636. }
  1637. this.dispatchEvent("insert");
  1638. };
  1639. CommentManager.prototype.clear = function () {
  1640. while (this.runline.length > 0) {
  1641. this.runline[0].finish();
  1642. }
  1643. this.dispatchEvent("clear");
  1644. };
  1645. CommentManager.prototype.setBounds = function () {
  1646. this.width = this.stage.offsetWidth;
  1647. this.height = this.stage.offsetHeight;
  1648. this.dispatchEvent("resize");
  1649. for (var comAlloc in this.csa) {
  1650. this.csa[comAlloc].setBounds(this.width, this.height);
  1651. }
  1652. // Update 3d perspective
  1653. this.stage.style.perspective = this.width * Math.tan(40 * Math.PI / 180) / 2 + "px";
  1654. this.stage.style.webkitPerspective = this.width * Math.tan(40 * Math.PI / 180) / 2 + "px";
  1655. };
  1656. CommentManager.prototype.init = function () {
  1657. this.setBounds();
  1658. if (this.filter == null) {
  1659. this.filter = new CommentFilter(); //Only create a filter if none exist
  1660. }
  1661. };
  1662. CommentManager.prototype.time = function (time) {
  1663. time = time - 1;
  1664. if (this.position >= this.timeline.length || Math.abs(this._lastPosition - time) >= 2000) {
  1665. this.seek(time);
  1666. this._lastPosition = time;
  1667. if (this.timeline.length <= this.position) {
  1668. return;
  1669. }
  1670. } else {
  1671. this._lastPosition = time;
  1672. }
  1673. for (; this.position < this.timeline.length; this.position++) {
  1674. if (this.timeline[this.position]['stime'] <= time) {
  1675. if (this.options.limit > 0 && this.runline.length > this.limiter) {
  1676. continue; // Skip comments but still move the position pointer
  1677. } else if (this.validate(this.timeline[this.position])) {
  1678. this.send(this.timeline[this.position]);
  1679. }
  1680. } else {
  1681. break;
  1682. }
  1683. }
  1684. };
  1685. CommentManager.prototype.rescale = function () {};
  1686. CommentManager.prototype.send = function (data) {
  1687. if (data.mode === 8) {
  1688. console.log(data);
  1689. if (this.scripting) {
  1690. console.log(this.scripting.eval(data.code));
  1691. }
  1692. return;
  1693. }
  1694. if (this.filter != null) {
  1695. data = this.filter.doModify(data);
  1696. if (data == null) return;
  1697. }
  1698. if (data.mode === 1 || data.mode === 2 || data.mode === 6) {
  1699. var cmt = new ScrollComment(this, data);
  1700. } else {
  1701. var cmt = new CoreComment(this, data);
  1702. }
  1703. switch (cmt.mode) {
  1704. case 1:
  1705. cmt.align = 0;break;
  1706. case 2:
  1707. cmt.align = 2;break;
  1708. case 4:
  1709. cmt.align = 2;break;
  1710. case 5:
  1711. cmt.align = 0;break;
  1712. case 6:
  1713. cmt.align = 1;break;
  1714. }
  1715. cmt.init();
  1716. this.stage.appendChild(cmt.dom);
  1717. switch (cmt.mode) {
  1718. default:
  1719. case 1:
  1720. {
  1721. this.csa.scroll.add(cmt);
  1722. }break;
  1723. case 2:
  1724. {
  1725. this.csa.scrollbtm.add(cmt);
  1726. }break;
  1727. case 4:
  1728. {
  1729. this.csa.bottom.add(cmt);
  1730. }break;
  1731. case 5:
  1732. {
  1733. this.csa.top.add(cmt);
  1734. }break;
  1735. case 6:
  1736. {
  1737. this.csa.reverse.add(cmt);
  1738. }break;
  1739. case 17:
  1740. case 7:
  1741. {
  1742. if (data.rY !== 0 || data.rZ !== 0) {
  1743. /** TODO: revise when browser manufacturers make up their mind on Transform APIs **/
  1744. cmt.dom.style.transform = getRotMatrix(data.rY, data.rZ);
  1745. cmt.dom.style.webkitTransform = getRotMatrix(data.rY, data.rZ);
  1746. cmt.dom.style.OTransform = getRotMatrix(data.rY, data.rZ);
  1747. cmt.dom.style.MozTransform = getRotMatrix(data.rY, data.rZ);
  1748. cmt.dom.style.MSTransform = getRotMatrix(data.rY, data.rZ);
  1749. }
  1750. }break;
  1751. }
  1752. cmt.y = cmt.y;
  1753. this.dispatchEvent("enterComment", cmt);
  1754. this.runline.push(cmt);
  1755. };
  1756. CommentManager.prototype.sendComment = function (data) {
  1757. console.log("CommentManager.sendComment is deprecated. Please use send instead");
  1758. this.send(data); // Wrapper for Backwards Compatible APIs
  1759. };
  1760. CommentManager.prototype.finish = function (cmt) {
  1761. this.dispatchEvent("exitComment", cmt);
  1762. this.stage.removeChild(cmt.dom);
  1763. var index = this.runline.indexOf(cmt);
  1764. if (index >= 0) {
  1765. this.runline.splice(index, 1);
  1766. }
  1767. switch (cmt.mode) {
  1768. default:
  1769. case 1:
  1770. {
  1771. this.csa.scroll.remove(cmt);
  1772. }break;
  1773. case 2:
  1774. {
  1775. this.csa.scrollbtm.remove(cmt);
  1776. }break;
  1777. case 4:
  1778. {
  1779. this.csa.bottom.remove(cmt);
  1780. }break;
  1781. case 5:
  1782. {
  1783. this.csa.top.remove(cmt);
  1784. }break;
  1785. case 6:
  1786. {
  1787. this.csa.reverse.remove(cmt);
  1788. }break;
  1789. case 7:
  1790. break;
  1791. }
  1792. };
  1793. CommentManager.prototype.addEventListener = function (event, listener) {
  1794. if (typeof this._listeners[event] !== "undefined") {
  1795. this._listeners[event].push(listener);
  1796. } else {
  1797. this._listeners[event] = [listener];
  1798. }
  1799. };
  1800. CommentManager.prototype.dispatchEvent = function (event, data) {
  1801. if (typeof this._listeners[event] !== "undefined") {
  1802. for (var i = 0; i < this._listeners[event].length; i++) {
  1803. try {
  1804. this._listeners[event][i](data);
  1805. } catch (e) {
  1806. console.err(e.stack);
  1807. }
  1808. }
  1809. }
  1810. };
  1811. /** Static Functions **/
  1812. CommentManager.prototype.onTimerEvent = function (timePassed, cmObj) {
  1813. for (var i = 0; i < cmObj.runline.length; i++) {
  1814. var cmt = cmObj.runline[i];
  1815. if (cmt.hold) {
  1816. continue;
  1817. }
  1818. cmt.time(timePassed);
  1819. }
  1820. };
  1821. return CommentManager;
  1822. }();
  1823. /**
  1824. * AcFun Format Parser
  1825. * @license MIT License
  1826. * An alternative format comment parser
  1827. */
  1828. function AcfunParser(jsond) {
  1829. var list = [];
  1830. try {
  1831. var jsondt = JSON.parse(jsond);
  1832. } catch (e) {
  1833. console.log('Error: Could not parse json list!');
  1834. return [];
  1835. }
  1836. for (var i = 0; i < jsondt.length; i++) {
  1837. //Read each comment and generate a correct comment object
  1838. var data = {};
  1839. var xc = jsondt[i]['c'].split(',');
  1840. if (xc.length > 0) {
  1841. data.stime = parseFloat(xc[0]) * 1000;
  1842. data.color = parseInt(xc[1]);
  1843. data.mode = parseInt(xc[2]);
  1844. data.size = parseInt(xc[3]);
  1845. data.hash = xc[4];
  1846. data.date = parseInt(xc[5]);
  1847. data.position = "absolute";
  1848. if (data.mode != 7) {
  1849. data.text = jsondt[i].m.replace(/(\/n|\\n|\n|\r\n|\\r)/g, "\n");
  1850. data.text = data.text.replace(/\r/g, "\n");
  1851. data.text = data.text.replace(/\s/g, '\xA0');
  1852. } else {
  1853. data.text = jsondt[i].m;
  1854. }
  1855. if (data.mode == 7) {
  1856. //High level positioned dm
  1857. try {
  1858. var x = JSON.parse(data.text);
  1859. } catch (e) {
  1860. console.log('[Err] Error parsing internal data for comment');
  1861. console.log('[Dbg] ' + data.text);
  1862. continue;
  1863. }
  1864. data.position = "relative";
  1865. data.text = x.n; /*.replace(/\r/g,"\n");*/
  1866. data.text = data.text.replace(/\ /g, '\xA0');
  1867. if (x.a != null) {
  1868. data.opacity = x.a;
  1869. } else {
  1870. data.opacity = 1;
  1871. }
  1872. if (x.p != null) {
  1873. data.x = x.p.x / 1000; // relative position
  1874. data.y = x.p.y / 1000;
  1875. } else {
  1876. data.x = 0;
  1877. data.y = 0;
  1878. }
  1879. data.shadow = x.b;
  1880. data.dur = 4000;
  1881. if (x.l != null) data.moveDelay = x.l * 1000;
  1882. if (x.z != null && x.z.length > 0) {
  1883. data.movable = true;
  1884. data.motion = [];
  1885. var moveDuration = 0;
  1886. var last = { x: data.x, y: data.y, alpha: data.opacity, color: data.color };
  1887. for (var m = 0; m < x.z.length; m++) {
  1888. var dur = x.z[m].l != null ? x.z[m].l * 1000 : 500;
  1889. moveDuration += dur;
  1890. var motion = {
  1891. x: { from: last.x, to: x.z[m].x / 1000, dur: dur, delay: 0 },
  1892. y: { from: last.y, to: x.z[m].y / 1000, dur: dur, delay: 0 }
  1893. };
  1894. last.x = motion.x.to;
  1895. last.y = motion.y.to;
  1896. if (x.z[m].t !== last.alpha) {
  1897. motion.alpha = { from: last.alpha, to: x.z[m].t, dur: dur, delay: 0 };
  1898. last.alpha = motion.alpha.to;
  1899. }
  1900. if (x.z[m].c != null && x.z[m].c !== last.color) {
  1901. motion.color = { from: last.color, to: x.z[m].c, dur: dur, delay: 0 };
  1902. last.color = motion.color.to;
  1903. }
  1904. data.motion.push(motion);
  1905. }
  1906. data.dur = moveDuration + (data.moveDelay ? data.moveDelay : 0);
  1907. }
  1908. if (x.r != null && x.k != null) {
  1909. data.rX = x.r;
  1910. data.rY = x.k;
  1911. }
  1912. }
  1913. list.push(data);
  1914. }
  1915. }
  1916. return list;
  1917. }
  1918. /**
  1919. * Bilibili Format Parser
  1920. * @license MIT License
  1921. * Takes in an XMLDoc/LooseXMLDoc and parses that into a Generic Comment List
  1922. **/
  1923. function BilibiliParser(xmlDoc, text, warn) {
  1924. function format(string) {
  1925. // Format the comment text to be JSON Valid.
  1926. return string.replace(/\t/, "\\t");
  1927. }
  1928. if (xmlDoc !== null) {
  1929. var elems = xmlDoc.getElementsByTagName('d');
  1930. } else {
  1931. if (!document || !document.createElement) {
  1932. // Maybe we are in a restricted context? Bail.
  1933. return [];
  1934. }
  1935. if (warn) {
  1936. if (!confirm("XML Parse Error. \n Allow tag soup parsing?\n[WARNING: This is unsafe.]")) {
  1937. return [];
  1938. }
  1939. } else {
  1940. // TODO: Make this safer in the future
  1941. text = text.replace(new RegExp("</([^d])", "g"), "</disabled $1");
  1942. text = text.replace(new RegExp("</(\S{2,})", "g"), "</disabled $1");
  1943. text = text.replace(new RegExp("<([^d/]\W*?)", "g"), "<disabled $1");
  1944. text = text.replace(new RegExp("<([^/ ]{2,}\W*?)", "g"), "<disabled $1");
  1945. }
  1946. var tmp = document.createElement("div");
  1947. tmp.innerHTML = text;
  1948. var elems = tmp.getElementsByTagName('d');
  1949. }
  1950. var tlist = [];
  1951. for (var i = 0; i < elems.length; i++) {
  1952. if (elems[i].getAttribute('p') != null) {
  1953. var opt = elems[i].getAttribute('p').split(',');
  1954. if (!elems[i].childNodes[0]) continue;
  1955. var text = elems[i].childNodes[0].nodeValue;
  1956. var obj = {};
  1957. obj.stime = Math.round(parseFloat(opt[0]) * 1000);
  1958. obj.size = parseInt(opt[2]);
  1959. obj.color = parseInt(opt[3]);
  1960. obj.mode = parseInt(opt[1]);
  1961. obj.date = parseInt(opt[4]);
  1962. obj.pool = parseInt(opt[5]);
  1963. obj.position = "absolute";
  1964. if (opt[7] != null) obj.dbid = parseInt(opt[7]);
  1965. obj.hash = opt[6];
  1966. obj.border = false;
  1967. if (obj.mode < 7) {
  1968. obj.text = text.replace(/(\/n|\\n|\n|\r\n)/g, "\n");
  1969. } else {
  1970. if (obj.mode == 7) {
  1971. try {
  1972. adv = JSON.parse(format(text));
  1973. obj.shadow = true;
  1974. obj.x = parseFloat(adv[0]);
  1975. obj.y = parseFloat(adv[1]);
  1976. if (Math.floor(obj.x) < obj.x || Math.floor(obj.y) < obj.y) {
  1977. obj.position = "relative";
  1978. }
  1979. obj.text = adv[4].replace(/(\/n|\\n|\n|\r\n)/g, "\n");
  1980. obj.rZ = 0;
  1981. obj.rY = 0;
  1982. if (adv.length >= 7) {
  1983. obj.rZ = parseInt(adv[5], 10);
  1984. obj.rY = parseInt(adv[6], 10);
  1985. }
  1986. obj.motion = [];
  1987. obj.movable = false;
  1988. if (adv.length >= 11) {
  1989. obj.movable = true;
  1990. var singleStepDur = 500;
  1991. var motion = {
  1992. x: { from: obj.x, to: parseFloat(adv[7]), dur: singleStepDur, delay: 0 },
  1993. y: { from: obj.y, to: parseFloat(adv[8]), dur: singleStepDur, delay: 0 }
  1994. };
  1995. if (adv[9] !== '') {
  1996. singleStepDur = parseInt(adv[9], 10);
  1997. motion.x.dur = singleStepDur;
  1998. motion.y.dur = singleStepDur;
  1999. }
  2000. if (adv[10] !== '') {
  2001. motion.x.delay = parseInt(adv[10], 10);
  2002. motion.y.delay = parseInt(adv[10], 10);
  2003. }
  2004. if (adv.length > 11) {
  2005. obj.shadow = adv[11];
  2006. if (obj.shadow === "true") {
  2007. obj.shadow = true;
  2008. }
  2009. if (obj.shadow === "false") {
  2010. obj.shadow = false;
  2011. }
  2012. if (adv[12] != null) {
  2013. obj.font = adv[12];
  2014. }
  2015. if (adv.length > 14) {
  2016. // Support for Bilibili Advanced Paths
  2017. if (obj.position === "relative") {
  2018. console.log("Cannot mix relative and absolute positioning");
  2019. obj.position = "absolute";
  2020. }
  2021. var path = adv[14];
  2022. var lastPoint = { x: motion.x.from, y: motion.y.from };
  2023. var pathMotion = [];
  2024. var regex = new RegExp("([a-zA-Z])\\s*(\\d+)[, ](\\d+)", "g");
  2025. var counts = path.split(/[a-zA-Z]/).length - 1;
  2026. var m = regex.exec(path);
  2027. while (m !== null) {
  2028. switch (m[1]) {
  2029. case "M":
  2030. {
  2031. lastPoint.x = parseInt(m[2], 10);
  2032. lastPoint.y = parseInt(m[3], 10);
  2033. }break;
  2034. case "L":
  2035. {
  2036. pathMotion.push({
  2037. "x": { "from": lastPoint.x, "to": parseInt(m[2], 10), "dur": singleStepDur / counts, "delay": 0 },
  2038. "y": { "from": lastPoint.y, "to": parseInt(m[3], 10), "dur": singleStepDur / counts, "delay": 0 }
  2039. });
  2040. lastPoint.x = parseInt(m[2], 10);
  2041. lastPoint.y = parseInt(m[3], 10);
  2042. }break;
  2043. }
  2044. m = regex.exec(path);
  2045. }
  2046. motion = null;
  2047. obj.motion = pathMotion;
  2048. }
  2049. }
  2050. if (motion !== null) {
  2051. obj.motion.push(motion);
  2052. }
  2053. }
  2054. obj.dur = 2500;
  2055. if (adv[3] < 12) {
  2056. obj.dur = adv[3] * 1000;
  2057. }
  2058. var tmp = adv[2].split('-');
  2059. if (tmp != null && tmp.length > 1) {
  2060. var alphaFrom = parseFloat(tmp[0]);
  2061. var alphaTo = parseFloat(tmp[1]);
  2062. obj.opacity = alphaFrom;
  2063. if (alphaFrom !== alphaTo) {
  2064. obj.alpha = { from: alphaFrom, to: alphaTo };
  2065. }
  2066. }
  2067. } catch (e) {
  2068. console.log('[Err] Error occurred in JSON parsing');
  2069. console.log('[Dbg] ' + text);
  2070. }
  2071. } else if (obj.mode == 8) {
  2072. obj.code = text; //Code comments are special
  2073. }
  2074. }
  2075. if (obj.text != null) obj.text = obj.text.replace(/\u25a0/g, '\u2588');
  2076. tlist.push(obj);
  2077. }
  2078. }
  2079. return tlist;
  2080. }
  2081. exports.CommentManager = CommentManager;
  2082. /***/ }),
  2083. /* 15 */
  2084. /***/ (function(module, exports, __webpack_require__) {
  2085. // style-loader: Adds some css to the DOM by adding a <style> tag
  2086. // load the styles
  2087. var content = __webpack_require__(16);
  2088. if(typeof content === 'string') content = [[module.i, content, '']];
  2089. // add the styles to the DOM
  2090. var update = __webpack_require__(1)(content, {});
  2091. if(content.locals) module.exports = content.locals;
  2092. // Hot Module Replacement
  2093. if(false) {}
  2094. /***/ }),
  2095. /* 16 */
  2096. /***/ (function(module, exports, __webpack_require__) {
  2097. exports = module.exports = __webpack_require__(0)();
  2098. // imports
  2099. // module
  2100. exports.push([module.i, ".abp {\n position: relative; }\n\n.abp .container {\n -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n position: absolute;\n display: block;\n overflow: hidden;\n margin: 0;\n border: 0;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 9999;\n touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n\n.abp .container .cmt {\n -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n -webkit-transform-origin: 0% 0%;\n -ms-transform-origin: 0% 0%;\n transform-origin: 0% 0%;\n position: absolute;\n padding: 3px 0 0 0;\n margin: 0;\n color: #fff;\n font-family: SimHei, SimSun, Heiti, \"MS Mincho\", \"Meiryo\", \"Microsoft YaHei\", monospace;\n font-size: 25px;\n text-decoration: none;\n text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;\n -webkit-text-size-adjust: none;\n -ms-text-size-adjust: none;\n text-size-adjust: none;\n line-height: 100%;\n letter-spacing: 0;\n word-break: keep-all;\n white-space: pre; }\n\n.abp .container .cmt.noshadow {\n text-shadow: none; }\n\n.abp .container .cmt.rshadow {\n text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white; }\n\n/** Aliases for Chinese named fonts because they don't work on *nix **/\n@font-face {\n font-family: \"\\9ED1\\4F53\";\n src: local(\"SimHei\"); }\n\n@font-face {\n font-family: \"\\5B8B\\4F53\";\n src: local(\"SimSun\"); }\n\n@font-face {\n font-family: \"\\534E\\6587\\6977\\4F53\";\n src: local(\"SimKai\"); }\n\n@font-face {\n font-family: \"\\5E7C\\5706\";\n src: local(\"YouYuan\"); }\n\n@font-face {\n font-family: \"\\5FAE\\8F6F\\96C5\\9ED1\";\n src: local(\"Microsoft YaHei\"); }\n", ""]);
  2101. // exports
  2102. /***/ }),
  2103. /* 17 */
  2104. /***/ (function(module, exports, __webpack_require__) {
  2105. "use strict";
  2106. var _index = __webpack_require__(18);
  2107. var _index2 = _interopRequireDefault(_index);
  2108. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  2109. if (!window.AliPlayerComponent) {
  2110. window.AliPlayerComponent = {};
  2111. }
  2112. window.AliPlayerComponent.BulletScreenComponent = _index2.default;
  2113. /***/ }),
  2114. /* 18 */
  2115. /***/ (function(module, exports, __webpack_require__) {
  2116. "use strict";
  2117. Object.defineProperty(exports, "__esModule", {
  2118. value: true
  2119. });
  2120. var _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; }; }();
  2121. var _index = __webpack_require__(19);
  2122. var _index2 = _interopRequireDefault(_index);
  2123. __webpack_require__(20);
  2124. var _utils = __webpack_require__(2);
  2125. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  2126. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  2127. /**
  2128. * 跑马灯组件
  2129. */
  2130. var BulletScreenComponent = function () {
  2131. /**
  2132. * @constructor 跑马灯构造函数
  2133. * @param {String text 跑马灯内容}
  2134. * @param {Object style 跑马灯样式}
  2135. * param {String bulletPosition 跑马灯所在的位置, 可能的值 'top', 'bottom' , 'random, 默认为 'random'}
  2136. */
  2137. function BulletScreenComponent(text, style) {
  2138. var bulletPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'random';
  2139. _classCallCheck(this, BulletScreenComponent);
  2140. this.text = text;
  2141. this.style = style || { fontSize: '14px', color: '#fff' };
  2142. this.html = (0, _utils.parseDom)(_index2.default);
  2143. // this.html.style.animationPlayState = 'paused'
  2144. this.bulletPosition = bulletPosition;
  2145. }
  2146. _createClass(BulletScreenComponent, [{
  2147. key: 'createEl',
  2148. value: function createEl(el, player) {
  2149. this.html.innerText = this.text;
  2150. el.appendChild(this.html);
  2151. el.style.overflow = 'hidden';
  2152. }
  2153. }, {
  2154. key: 'ready',
  2155. value: function ready(player, e) {
  2156. var _this = this;
  2157. console.log(player.getOptions());
  2158. if (player.getOptions().autoplay === false) {
  2159. this.html.style.animationPlayState = 'paused';
  2160. }
  2161. Object.keys(this.style).forEach(function (key) {
  2162. return _this.html.style[key] = _this.style[key];
  2163. });
  2164. //字体高度
  2165. var bulletHeight = this.html.offsetHeight;
  2166. //播放器高度
  2167. var playerHeight = parseInt(getComputedStyle(player.tag).height.replace('px', ''));
  2168. //字体距离播放器底部最大高度
  2169. var maxHeight = playerHeight - bulletHeight;
  2170. if (this.bulletPosition === 'bottom') {
  2171. this.html.style.bottom = 0;
  2172. } else {
  2173. var top = this.bulletPosition === 'top' ? 0 : this.randomTop(maxHeight);
  2174. this.html.style.top = top;
  2175. }
  2176. if (this.bulletPosition === 'random') {
  2177. this.html.addEventListener('animationiteration', function () {
  2178. _this.html.style.top = _this.randomTop(maxHeight);
  2179. });
  2180. }
  2181. }
  2182. }, {
  2183. key: 'playing',
  2184. value: function playing(player, e) {
  2185. console.log('playering');
  2186. this.html.style.animationPlayState = 'running';
  2187. }
  2188. }, {
  2189. key: 'timeupdate',
  2190. value: function timeupdate(player, timeStamp) {
  2191. var el = player.el();
  2192. var componentEl = el.querySelector('.bullet-screen');
  2193. if (!componentEl) {
  2194. el.appendChild(this.html);
  2195. } else {
  2196. if (componentEl.className !== 'bullet-screen') {
  2197. componentEl.className = 'bullet-screen';
  2198. }
  2199. var cssStyles = getComputedStyle(componentEl);
  2200. var display = cssStyles.getPropertyValue('display');
  2201. var opacity = cssStyles.getPropertyValue('opacity');
  2202. var visibility = cssStyles.getPropertyValue('visibility');
  2203. var currentwords = this.text;
  2204. var modifywords = componentEl.innerText;
  2205. if (display === 'none') {
  2206. componentEl.style.setProperty('display', 'block');
  2207. }
  2208. if (opacity !== '1') {
  2209. componentEl.style.setProperty('opacity', '1');
  2210. }
  2211. if (visibility === 'hidden') {
  2212. componentEl.style.setProperty('visibility', 'visible');
  2213. }
  2214. if (currentwords != modifywords) {
  2215. componentEl.innerText = currentwords;
  2216. }
  2217. }
  2218. }
  2219. }, {
  2220. key: 'pause',
  2221. value: function pause(player, e) {
  2222. console.log('pause');
  2223. this.html.style.animationPlayState = 'paused';
  2224. }
  2225. }, {
  2226. key: 'randomTop',
  2227. value: function randomTop(max) {
  2228. return Math.floor(Math.random() * max) + 'px';
  2229. }
  2230. }]);
  2231. return BulletScreenComponent;
  2232. }();
  2233. exports.default = BulletScreenComponent;
  2234. /***/ }),
  2235. /* 19 */
  2236. /***/ (function(module, exports) {
  2237. module.exports = "<div class=\"bullet-screen paused\"></div>";
  2238. /***/ }),
  2239. /* 20 */
  2240. /***/ (function(module, exports, __webpack_require__) {
  2241. // style-loader: Adds some css to the DOM by adding a <style> tag
  2242. // load the styles
  2243. var content = __webpack_require__(21);
  2244. if(typeof content === 'string') content = [[module.i, content, '']];
  2245. // add the styles to the DOM
  2246. var update = __webpack_require__(1)(content, {});
  2247. if(content.locals) module.exports = content.locals;
  2248. // Hot Module Replacement
  2249. if(false) {}
  2250. /***/ }),
  2251. /* 21 */
  2252. /***/ (function(module, exports, __webpack_require__) {
  2253. exports = module.exports = __webpack_require__(0)();
  2254. // imports
  2255. // module
  2256. exports.push([module.i, ".bullet-screen {\n position: absolute;\n white-space: nowrap;\n animation: bullet 10s linear infinite; }\n\n@keyframes bullet {\n from {\n left: 100%; }\n to {\n left: 0%;\n transform: translateX(-100%); } }\n", ""]);
  2257. // exports
  2258. /***/ }),
  2259. /* 22 */
  2260. /***/ (function(module, exports, __webpack_require__) {
  2261. "use strict";
  2262. var _index = __webpack_require__(23);
  2263. var _index2 = _interopRequireDefault(_index);
  2264. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  2265. if (!window.AliPlayerComponent) {
  2266. window.AliPlayerComponent = {};
  2267. }
  2268. window.AliPlayerComponent.CaptionComponent = _index2.default;
  2269. /***/ }),
  2270. /* 23 */
  2271. /***/ (function(module, exports, __webpack_require__) {
  2272. "use strict";
  2273. Object.defineProperty(exports, "__esModule", {
  2274. value: true
  2275. });
  2276. var _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; }; }();
  2277. var _index = __webpack_require__(24);
  2278. var _index2 = _interopRequireDefault(_index);
  2279. var _captionModal = __webpack_require__(25);
  2280. var _captionModal2 = _interopRequireDefault(_captionModal);
  2281. __webpack_require__(26);
  2282. var _utils = __webpack_require__(2);
  2283. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  2284. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  2285. /**
  2286. * 字幕组件
  2287. */
  2288. var CaptionComponent = function () {
  2289. /**
  2290. * @constructor 字幕组件构造函数
  2291. */
  2292. function CaptionComponent() {
  2293. _classCallCheck(this, CaptionComponent);
  2294. this.captionList = null;
  2295. this.html = (0, _utils.parseDom)(_index2.default);
  2296. this.modalHtml = (0, _utils.parseDom)(_captionModal2.default);
  2297. this.hasCreated = false;
  2298. this.definition = '';
  2299. }
  2300. _createClass(CaptionComponent, [{
  2301. key: 'createEl',
  2302. value: function createEl(el, player) {
  2303. var _this = this;
  2304. var lang = player._options && player._options.language;
  2305. this.isEn = lang && lang === 'en-us';
  2306. //this.html.querySelector('.current-caption').innerText = this.isEn ? 'Subtitle language' : '字幕语言'
  2307. this.modalHtml.querySelector('.switchimg').innerText = this.isEn ? 'Switching to you for' : '字幕切换到';
  2308. this.modalHtml.querySelector('.switchimg').style.display = 'none';
  2309. var eleControlbar = el.querySelector('.prism-controlbar');
  2310. eleControlbar.appendChild(this.html);
  2311. el.appendChild(this.modalHtml);
  2312. player.on('textTrackReady', function (_ref) {
  2313. var paramData = _ref.paramData;
  2314. _this.captionList = paramData;
  2315. var lis_ele = paramData.map(function (v) {
  2316. return '<li data-def="' + v.value + '">' + v.text + '</li>';
  2317. });
  2318. _this.html.querySelector('.caption-list').innerHTML = '<li style="background:rgba(88,87,86,.5);color:#fff">\u5B57\u5E55</li>' + lis_ele.join('');
  2319. });
  2320. var currentCaptionEle = this.html.querySelector('.current-caption');
  2321. var captionListEle = this.html.querySelector('.caption-list');
  2322. if (this.hasCreated == false && this.definition) {
  2323. var li_target = captionListEle.querySelector('li[data-def="' + this.definition + '"]');
  2324. li_target.className = 'current';
  2325. }
  2326. this.hasCreated = true;
  2327. var timeId = null;
  2328. currentCaptionEle.onclick = function () {
  2329. captionListEle.style.display = 'block';
  2330. };
  2331. currentCaptionEle.onmouseleave = function () {
  2332. timeId = setTimeout(function () {
  2333. captionListEle.style.display = 'none';
  2334. }, 100);
  2335. };
  2336. captionListEle.onmouseenter = function () {
  2337. clearTimeout(timeId);
  2338. };
  2339. captionListEle.onmouseleave = function () {
  2340. captionListEle.style.display = 'none';
  2341. // this.html.querySelector('.caption-modal').style.display = 'none'
  2342. _this.modalHtml.style.display = 'none';
  2343. };
  2344. captionListEle.onclick = function (_ref2) {
  2345. var target = _ref2.target;
  2346. var definition = target.dataset.def;
  2347. if (definition) {
  2348. if (target.className !== 'current') {
  2349. var caption = Array.isArray(_this.captionList) ? _this.captionList.filter(function (v) {
  2350. return v.value === definition;
  2351. })[0] : _this.captionList.find(function (v) {
  2352. return v.value === definition;
  2353. });
  2354. player._ccService.switch(caption.value);
  2355. _this.setCurrentCaption(caption.text, caption.value);
  2356. _this.modalHtml.style.display = 'block';
  2357. _this.modalHtml.querySelector('.switchimg').style.display = 'block';
  2358. _this.modalHtml.querySelector('span.current-caption-tag').innerText = caption.text;
  2359. }
  2360. }
  2361. };
  2362. }
  2363. }, {
  2364. key: 'setCurrentCaption',
  2365. value: function setCurrentCaption(caption, def) {
  2366. var currentCaption = this.html.querySelector('.current-caption');
  2367. currentCaption.innerText = caption;
  2368. currentCaption.dataset.def = def;
  2369. this.definition = def;
  2370. var captionListEle = this.html.querySelector('.caption-list');
  2371. var currentEle = captionListEle.querySelector('.current');
  2372. if (currentEle) {
  2373. currentEle.className = '';
  2374. }
  2375. //let li_target = captionListEle.querySelector(`li[data-def="${def}"]`)
  2376. var lis = captionListEle.querySelectorAll('li');
  2377. lis.forEach(function (element) {
  2378. var text = element.innerText;
  2379. if (text === caption) {
  2380. element.className = 'current';
  2381. }
  2382. });
  2383. if (lis) {
  2384. lis.className = 'current';
  2385. }
  2386. }
  2387. }, {
  2388. key: 'created',
  2389. value: function created(player) {}
  2390. }, {
  2391. key: 'ready',
  2392. value: function ready(player) {
  2393. this.modalHtml.style.display = 'none';
  2394. // 隐藏设置里面的倍速播放
  2395. var settingEle = document.querySelector('.prism-setting-item.prism-setting-cc');
  2396. if (settingEle) {
  2397. settingEle.classList.add('player-hidden');
  2398. }
  2399. }
  2400. }]);
  2401. return CaptionComponent;
  2402. }();
  2403. exports.default = CaptionComponent;
  2404. /***/ }),
  2405. /* 24 */
  2406. /***/ (function(module, exports) {
  2407. module.exports = "<div class=\"caption-components\">\n <div class=\"current-caption\" data-ref=\"\"></div>\n <ul class=\"caption-list\">\n </ul>\n </div>";
  2408. /***/ }),
  2409. /* 25 */
  2410. /***/ (function(module, exports) {
  2411. module.exports = "<div class=\"caption-modal prism-info-display prism-info-left-bottom\">\n <span class=\"switchimg\"></span> <span class=\"current-caption-tag\"></span>\n</div>";
  2412. /***/ }),
  2413. /* 26 */
  2414. /***/ (function(module, exports, __webpack_require__) {
  2415. // style-loader: Adds some css to the DOM by adding a <style> tag
  2416. // load the styles
  2417. var content = __webpack_require__(27);
  2418. if(typeof content === 'string') content = [[module.i, content, '']];
  2419. // add the styles to the DOM
  2420. var update = __webpack_require__(1)(content, {});
  2421. if(content.locals) module.exports = content.locals;
  2422. // Hot Module Replacement
  2423. if(false) {}
  2424. /***/ }),
  2425. /* 27 */
  2426. /***/ (function(module, exports, __webpack_require__) {
  2427. exports = module.exports = __webpack_require__(0)();
  2428. // imports
  2429. // module
  2430. exports.push([module.i, ".player-hidden {\n display: none !important; }\n\n.caption-components {\n float: right;\n color: #fff;\n height: 35px;\n position: relative;\n box-sizing: border-box;\n margin-top: 5px; }\n\n.current-caption {\n display: flex;\n height: 100%;\n align-items: center;\n justify-content: center;\n width: 100px;\n cursor: pointer; }\n\n.caption-list {\n position: absolute;\n bottom: 46px;\n display: none;\n padding: 0;\n margin: 0;\n list-style: none;\n height: 150px;\n width: 100px;\n overflow-y: scroll; }\n .caption-list li {\n text-align: center;\n width: 100px;\n line-height: 30px;\n background-color: rgba(0, 0, 0, 0.6);\n cursor: pointer; }\n .caption-list li.current {\n color: #00c1de; }\n .caption-list li + li {\n border-top: 1px solid rgba(78, 78, 78, 0.3); }\n .caption-list li:hover {\n background-color: rgba(0, 0, 0, 0.5); }\n\n@media (max-width: 768px) {\n .current-caption {\n width: 40px; }\n .caption-list li {\n width: 43px; } }\n\n.prism-player .prism-info-display .switchimg {\n color: #fff; }\n", ""]);
  2431. // exports
  2432. /***/ }),
  2433. /* 28 */
  2434. /***/ (function(module, exports, __webpack_require__) {
  2435. "use strict";
  2436. var _index = __webpack_require__(29);
  2437. var _index2 = _interopRequireDefault(_index);
  2438. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  2439. if (!window.AliPlayerComponent) {
  2440. window.AliPlayerComponent = {};
  2441. }
  2442. window.AliPlayerComponent.ManyVideoADComponent = _index2.default;
  2443. /***/ }),
  2444. /* 29 */
  2445. /***/ (function(module, exports, __webpack_require__) {
  2446. "use strict";
  2447. Object.defineProperty(exports, "__esModule", {
  2448. value: true
  2449. });
  2450. var _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; }; }();
  2451. var _index = __webpack_require__(30);
  2452. var _index2 = _interopRequireDefault(_index);
  2453. __webpack_require__(31);
  2454. var _utils = __webpack_require__(2);
  2455. var _mbIndex = __webpack_require__(33);
  2456. var _mbIndex2 = _interopRequireDefault(_mbIndex);
  2457. var _currentDevice = __webpack_require__(3);
  2458. var _currentDevice2 = _interopRequireDefault(_currentDevice);
  2459. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  2460. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  2461. /*
  2462. * PC 多视频广告组件
  2463. */
  2464. var ManyVideoAdComponent = function () {
  2465. /**
  2466. * @constructor PC 多视频广告的构造函数
  2467. * @param adVideoSource {@String 广告视频的视频地址 必须参数}
  2468. * @param adLink {@String 广告视频的链接地址 必须参数}
  2469. * @param adCloseFunction {@Function 关闭广告的点击事件处理函数, 可选参数, 不传则默认关闭广告视频}
  2470. * @param closeText {@String 关闭广告的文字内容, 可选参数, 不传则默认为 '关闭广告'}
  2471. */
  2472. function ManyVideoAdComponent(adVideoSource, adCloseFunction) {
  2473. var closeText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '关闭广告';
  2474. _classCallCheck(this, ManyVideoAdComponent);
  2475. this.adVideoSource = adVideoSource;
  2476. this.html = (0, _utils.parseDom)(_index2.default);
  2477. this.adInterval = null;
  2478. this.adCloseFunction = adCloseFunction;
  2479. this.html.querySelector('.many-video-ad-close-text').innerText = closeText;
  2480. this.adDuration = null; // 视频广告的时长, 用于倒计时,
  2481. this.player = null;
  2482. this.indexVideo = 1; //给广告视频标号
  2483. }
  2484. _createClass(ManyVideoAdComponent, [{
  2485. key: 'createEl',
  2486. value: function createEl(el, player) {
  2487. var lang = player._options && player._options.language;
  2488. this.isEn = lang && lang === 'en-us';
  2489. this.html.querySelector('.many-video-ad-detail').innerText = this.isEn ? 'For more information' : '查看广告详情';
  2490. this.html.querySelector('.limit').innerText = this.isEn ? 'Your browser limits autoplay' : '您的浏览器限制';
  2491. this.html.querySelector('.manual').innerText = this.isEn ? 'Please Click' : '自动播放请点击';
  2492. el.appendChild(this.html);
  2493. }
  2494. }, {
  2495. key: 'created',
  2496. value: function created(player) {
  2497. //添加video
  2498. var videos = this.adVideoSource.map(function (url, index) {
  2499. return '<video id="many-video-ad-content' + (index + 1) + '" style="' + (index === 0 ? 'display: block' : 'display:none') + ';width:100%;height:100%" x5-video-player-type="h5" x5-video-player-fullscreen="false" src="' + url.adVideo + '"></video>';
  2500. });
  2501. this.html.querySelector('.videos').innerHTML = videos.join(' ');
  2502. this.indexVideo = Number(this.indexVideo);
  2503. var indexVideo_ = this.indexVideo;
  2504. var adVideoSource_ = this.adVideoSource;
  2505. var manyVideoAd_ele = this.html.querySelector('#many-video-ad-content' + this.indexVideo);
  2506. var videoAdDetak = this.html.querySelector('.many-video-ad-detail');
  2507. var adDuration_ele = this.html.querySelector('#many-video-ad-duration');
  2508. var self = this;
  2509. function getManyVideoAdTime() {
  2510. manyVideoAd_ele.removeEventListener('canplay', getManyVideoAdTime);
  2511. videoAdDetak.href = adVideoSource_[indexVideo_ - 1].adVideoLink;
  2512. manyVideoAd_ele.play().then(function () {
  2513. var duration = Math.ceil(manyVideoAd_ele.duration);
  2514. adDuration_ele.innerText = duration;
  2515. self.setAdInterval();
  2516. }).catch(function (err) {
  2517. self.html.querySelector('.autoplay-many-video-ad').style.display = 'block';
  2518. self.html.querySelector('.icon-player-play').onclick = function () {
  2519. self.playManyVideoAd();
  2520. self.html.querySelector('.autoplay-many-video-ad').style.display = 'none';
  2521. };
  2522. });
  2523. }
  2524. //对浏览器会限制,有时会自动播放失败的判断
  2525. var promise = manyVideoAd_ele.play();
  2526. if (promise !== undefined) {
  2527. promise.then(function () {
  2528. manyVideoAd_ele.play(); //播放广告
  2529. }).catch(function (error) {
  2530. document.querySelector('.autoplay-many-video-ad').style.display = 'block';
  2531. manyVideoAd_ele.oncanplay = function () {
  2532. var ad_time = Math.ceil(manyVideoAd_ele.duration);
  2533. document.querySelector('#many-video-ad-duration').innerText = ad_time;
  2534. };
  2535. });
  2536. }
  2537. manyVideoAd_ele.addEventListener('canplay', getManyVideoAdTime);
  2538. }
  2539. }, {
  2540. key: 'ready',
  2541. value: function ready(player, e) {
  2542. var _this = this;
  2543. this.indexVideo = Number(this.indexVideo);
  2544. var manyVideoAd_ele = this.html.querySelector('#many-video-ad-content' + this.indexVideo);
  2545. var self = this;
  2546. manyVideoAd_ele.addEventListener('ended', function (event) {
  2547. // self.html.querySelector('.many-video-ad-detail').href=self.adVideoSource[self.indexVideo].adVideoLink
  2548. var flag = self.playNext(self);
  2549. if (flag == '-1') {
  2550. player.play();
  2551. }
  2552. });
  2553. this.html.querySelector('.many-video-ad-close label').onclick = function () {
  2554. if (typeof _this.adCloseFunction === 'function') {
  2555. _this.adCloseFunction(_this);
  2556. } else {
  2557. _this.closeManyVideoAd();
  2558. }
  2559. };
  2560. }
  2561. // 视频广告倒计时
  2562. }, {
  2563. key: 'setAdInterval',
  2564. value: function setAdInterval(index) {
  2565. var _this2 = this;
  2566. var adDuration_ele = this.html.querySelector('#many-video-ad-duration');
  2567. var manyVideoAd_ele = this.html.querySelector('#many-video-ad-content' + this.indexVideo);
  2568. this.adInterval = setInterval(function () {
  2569. var duration = Math.ceil(manyVideoAd_ele.duration);
  2570. var currentTime = Math.ceil(manyVideoAd_ele.currentTime);
  2571. var time = duration - currentTime;
  2572. adDuration_ele.innerText = time;
  2573. if (time == 1) {
  2574. clearInterval(_this2.adInterval);
  2575. }
  2576. }, 1000);
  2577. }
  2578. // 暂停视频广告
  2579. }, {
  2580. key: 'pauseManyVideoAd',
  2581. value: function pauseManyVideoAd() {
  2582. this.clearAdInterval();
  2583. this.html.querySelector('#many-video-ad-content' + this.indexVideo).pause();
  2584. }
  2585. // 播放视频广告
  2586. }, {
  2587. key: 'playManyVideoAd',
  2588. value: function playManyVideoAd() {
  2589. this.setAdInterval();
  2590. this.html.querySelector('#many-video-ad-content' + this.indexVideo).play();
  2591. }
  2592. // 清除视频广告倒计时
  2593. }, {
  2594. key: 'clearAdInterval',
  2595. value: function clearAdInterval() {
  2596. this.adInterval !== null && clearInterval(this.adInterval);
  2597. this.adInterval = null;
  2598. }
  2599. // 关闭当前广告并播放下一个视频
  2600. }, {
  2601. key: 'playNext',
  2602. value: function playNext(self) {
  2603. if (self.indexVideo >= self.adVideoSource.length) {
  2604. self.html.parentNode.removeChild(self.html);
  2605. return -1;
  2606. }
  2607. this.indexVideo = Number(this.indexVideo);
  2608. if (document.getElementById('many-video-ad-content' + this.indexVideo) != null) {
  2609. document.getElementById('many-video-ad-content' + this.indexVideo).remove();
  2610. }
  2611. var indexVideo_ = this.indexVideo + 1;
  2612. self.html.querySelector('.many-video-ad-detail').href = self.adVideoSource[self.indexVideo].adVideoLink;
  2613. var manyVideoAd_ele = this.html.querySelector('#many-video-ad-content' + indexVideo_);
  2614. var adDuration_ele = this.html.querySelector('#many-video-ad-duration');
  2615. manyVideoAd_ele.style.display = 'block';
  2616. if (this.adVideoSource.length >= this.indexVideo) {
  2617. this.indexVideo = this.indexVideo + 1;
  2618. }
  2619. var duration = Math.ceil(manyVideoAd_ele.duration);
  2620. adDuration_ele.innerText = duration;
  2621. self.setAdInterval();
  2622. manyVideoAd_ele.play();
  2623. manyVideoAd_ele.addEventListener('ended', function (event) {
  2624. var flag = self.playNext(self);
  2625. //广告结束之后自动播放主视频
  2626. if (flag == '-1') {
  2627. document.getElementById(player._options.id).getElementsByTagName('video')[0].play();
  2628. }
  2629. });
  2630. }
  2631. // 关闭视频广告
  2632. }, {
  2633. key: 'closeManyVideoAd',
  2634. value: function closeManyVideoAd() {
  2635. this.clearAdInterval();
  2636. this.html.parentNode.removeChild(this.html);
  2637. this.html = null;
  2638. //广告结束之后自动播放主视频
  2639. document.getElementById(player._options.id).getElementsByTagName('video')[0].play();
  2640. }
  2641. }]);
  2642. return ManyVideoAdComponent;
  2643. }();
  2644. /**
  2645. * 移动端多视频广告组件
  2646. */
  2647. var MbManyVideoAdComponent = function () {
  2648. /**
  2649. * @constructor 移动端多视频广告组件
  2650. * @param {String adVideoSource 视频广告播放地址}
  2651. * @param {String adLink 广告链接}
  2652. * @param {Function adCloseFunction 关闭广告按钮点击出发的函数}
  2653. * @param {String closeText 可选参数 关闭按钮中的文字, 默认为 '关闭广告'}
  2654. */
  2655. function MbManyVideoAdComponent(adVideoSource, adCloseFunction) {
  2656. var closeText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '关闭广告';
  2657. _classCallCheck(this, MbManyVideoAdComponent);
  2658. this.adVideoSource = adVideoSource;
  2659. this.html = (0, _utils.parseDom)(_mbIndex2.default);
  2660. this.adInterval = null;
  2661. this.adCloseFunction = adCloseFunction;
  2662. this.html.querySelector('.many-video-ad-close-text').innerText = closeText;
  2663. this.adDuration = null; // 视频广告的时长, 用于倒计时,
  2664. this.player = null;
  2665. this.indexVideo = 1; //给广告视频标号
  2666. }
  2667. _createClass(MbManyVideoAdComponent, [{
  2668. key: 'createEl',
  2669. value: function createEl(el, player) {
  2670. var _this3 = this;
  2671. var lang = player._options && player._options.language;
  2672. this.isEn = lang && lang === 'en-us';
  2673. this.html.querySelector('.many-video-ad-detail').innerText = this.isEn ? 'For more information' : '查看广告详情';
  2674. this.html.querySelector('.limit').innerText = this.isEn ? 'Your browser limits autoplay' : '您的浏览器限制';
  2675. this.html.querySelector('.manual').innerText = this.isEn ? 'Please Click' : '自动播放请点击';
  2676. el.appendChild(this.html);
  2677. el.querySelector('.videosmb');
  2678. el.querySelector('.videosmb').setAttribute('preload', 'load');
  2679. // 隐藏 controlbar
  2680. var controlBar = el.querySelector('.prism-controlbar');
  2681. controlBar.className = controlBar.className + ' controlbar-element-hidden';
  2682. this.html.querySelector('.icon-player-play').onclick = function () {
  2683. _this3.playManyVideoAd();
  2684. _this3.html.querySelector('.autoplay-many-video-ad').style.display = 'none';
  2685. };
  2686. }
  2687. }, {
  2688. key: 'created',
  2689. value: function created(player) {
  2690. //添加video
  2691. var videos = this.adVideoSource.map(function (url, index) {
  2692. return '<video id="many-video-ad-content' + (index + 1) + '" style="' + (index === 0 ? 'display: block' : 'display:none') + ';width:100%;height:100%" x5-video-player-type="h5" x5-video-player-fullscreen="false" src="' + url.adVideo + '"></video>';
  2693. });
  2694. this.html.querySelector('.videosmb').innerHTML = videos.join(' ');
  2695. this.indexVideo = Number(this.indexVideo);
  2696. var indexVideo_ = this.indexVideo;
  2697. var adVideoSource_ = this.adVideoSource;
  2698. var manyVideoAd_ele = this.html.querySelector('#many-video-ad-content' + this.indexVideo);
  2699. var videoAdDetak = this.html.querySelector('.many-video-ad-detail');
  2700. var self = this;
  2701. function getManyVideoAdTime() {
  2702. manyVideoAd_ele.removeEventListener('canplay', getManyVideoAdTime);
  2703. videoAdDetak.href = adVideoSource_[indexVideo_ - 1].adVideoLink;
  2704. self.html.querySelector('#many-video-ad-duration').innerText = Math.ceil(manyVideoAd_ele.duration);
  2705. }
  2706. manyVideoAd_ele.addEventListener('canplay', getManyVideoAdTime);
  2707. }
  2708. }, {
  2709. key: 'ready',
  2710. value: function ready(player) {
  2711. var _this4 = this;
  2712. this.indexVideo = Number(this.indexVideo);
  2713. var manyVideoAd_ele = this.html.querySelector('#many-video-ad-content' + this.indexVideo);
  2714. var self = this;
  2715. manyVideoAd_ele.addEventListener('ended', function (event) {
  2716. var flag = self.playNext(self);
  2717. if (flag == '-1') {
  2718. player.play();
  2719. var controlBar = document.querySelector('.prism-controlbar');
  2720. controlBar.className = controlBar.className.replace(' controlbar-element-hidden', '');
  2721. }
  2722. });
  2723. this.html.querySelector('.many-video-ad-close label').onclick = function () {
  2724. if (typeof _this4.adCloseFunction === 'function') {
  2725. _this4.adCloseFunction(_this4);
  2726. } else {
  2727. _this4.closeManyVideoAd();
  2728. }
  2729. };
  2730. }
  2731. // 视频广告倒计时
  2732. }, {
  2733. key: 'setAdInterval',
  2734. value: function setAdInterval() {
  2735. var _this5 = this;
  2736. var adDuration_ele = this.html.querySelector('#many-video-ad-duration');
  2737. var manyVideoAd_ele = this.html.querySelector('#many-video-ad-content' + this.indexVideo);
  2738. this.adInterval = setInterval(function () {
  2739. var duration = Math.ceil(manyVideoAd_ele.duration);
  2740. var currentTime = Math.ceil(manyVideoAd_ele.currentTime);
  2741. var time = duration - currentTime;
  2742. adDuration_ele.innerText = time;
  2743. if (time == 1) {
  2744. clearInterval(_this5.adInterval);
  2745. }
  2746. }, 1000);
  2747. }
  2748. // 关闭视频广告
  2749. }, {
  2750. key: 'closeManyVideoAd',
  2751. value: function closeManyVideoAd() {
  2752. this.clearAdInterval();
  2753. var controlBar = this.html.parentNode.querySelector('.prism-controlbar');
  2754. controlBar.className = controlBar.className.replace(' controlbar-element-hidden', '');
  2755. this.html.parentNode.removeChild(this.html);
  2756. this.html = null;
  2757. //广告结束之后自动播放主视频
  2758. document.getElementById(player._options.id).getElementsByTagName('video')[0].play();
  2759. }
  2760. // 清除视频广告倒计时
  2761. }, {
  2762. key: 'clearAdInterval',
  2763. value: function clearAdInterval() {
  2764. this.adInterval !== null && clearInterval(this.adInterval);
  2765. this.adInterval = null;
  2766. }
  2767. // 播放视频广告
  2768. }, {
  2769. key: 'playManyVideoAd',
  2770. value: function playManyVideoAd() {
  2771. this.setAdInterval();
  2772. this.html.querySelector('#many-video-ad-content' + this.indexVideo).play();
  2773. }
  2774. // 暂停视频广告
  2775. }, {
  2776. key: 'pauseManyVideoAd',
  2777. value: function pauseManyVideoAd() {
  2778. this.clearAdInterval();
  2779. this.html.querySelector('#many-video-ad-content' + this.indexVideo).pause();
  2780. }
  2781. // 关闭当前广告并播放下一个视频
  2782. }, {
  2783. key: 'playNext',
  2784. value: function playNext(self) {
  2785. if (self.indexVideo >= self.adVideoSource.length) {
  2786. self.html.parentNode.removeChild(self.html);
  2787. return -1;
  2788. }
  2789. this.indexVideo = Number(this.indexVideo);
  2790. if (document.getElementById('many-video-ad-content' + this.indexVideo) != null) {
  2791. document.getElementById('many-video-ad-content' + this.indexVideo).remove();
  2792. }
  2793. var indexVideo_ = this.indexVideo + 1;
  2794. self.html.querySelector('.many-video-ad-detail').href = self.adVideoSource[self.indexVideo].adVideoLink;
  2795. var manyVideoAd_ele = this.html.querySelector('#many-video-ad-content' + indexVideo_);
  2796. var adDuration_ele = this.html.querySelector('#many-video-ad-duration');
  2797. manyVideoAd_ele.style.display = 'block';
  2798. if (this.adVideoSource.length >= this.indexVideo) {
  2799. this.indexVideo = this.indexVideo + 1;
  2800. }
  2801. var duration = Math.ceil(manyVideoAd_ele.duration);
  2802. adDuration_ele.innerText = duration;
  2803. self.setAdInterval();
  2804. manyVideoAd_ele.play();
  2805. manyVideoAd_ele.addEventListener('ended', function (event) {
  2806. var flag = self.playNext(self);
  2807. //广告结束之后自动播放主视频
  2808. if (flag == '-1') {
  2809. document.getElementById(player._options.id).getElementsByTagName('video')[0].play();
  2810. var controlBar = document.querySelector('.prism-controlbar');
  2811. controlBar.className = controlBar.className.replace(' controlbar-element-hidden', '');
  2812. }
  2813. });
  2814. }
  2815. }]);
  2816. return MbManyVideoAdComponent;
  2817. }();
  2818. var defaultComponent = ManyVideoAdComponent;
  2819. if (_currentDevice2.default.mobile()) {
  2820. defaultComponent = MbManyVideoAdComponent;
  2821. }
  2822. exports.default = defaultComponent;
  2823. /***/ }),
  2824. /* 30 */
  2825. /***/ (function(module, exports) {
  2826. module.exports = "<div class=\"many-video-ad-component\">\n <div class=\"videos\">\n <!-- <video id=\"many-video-ad-content1\" class=\"test\" style=\"display: block\" x5-video-player-type=\"h5\" x5-video-player-fullscreen=\"false\" src=\"https://alivc-demo-cms.alicdn.com/video/videoAD.mp4\"></video>\n <video id=\"many-video-ad-content2\" class=\"test\" style=\"display: none\" x5-video-player-type=\"h5\" x5-video-player-fullscreen=\"false\" src=\"https://player.alicdn.com/resource/player/qupai.mp4\"></video>\n <video id=\"many-video-ad-content3\" class=\"test\" style=\"display: none\" x5-video-player-type=\"h5\" x5-video-player-fullscreen=\"false\" src=\"https://player.alicdn.com/video/guanggao.mp4\"></video> -->\n </div>\n <a class=\"many-video-ad-link\" target=\"_blank\"></a>\n <div class=\"many-video-ad-close\">\n <span id=\"many-video-ad-duration\"></span>\n <label>\n <span class=\"many-video-ad-close-text\"></span>\n <i class=\"iconfont icon-close\"></i>\n </label>\n </div>\n <a class=\"many-video-ad-detail\" target=\"_blank\">查看详情</a>\n <div class=\"autoplay-many-video-ad\">\n <i class=\"iconfont icon-player-play\"></i>\n <span class=\"limit\"></span>\n <span class=\"manual\"></span>\n </div>\n <!-- <div id=\"loadflag\" class=\"prism-loading center\">\n <div class=\"circle\"></div> \n <div class=\"circle1\"></div>\n </div> -->\n</div>";
  2827. /***/ }),
  2828. /* 31 */
  2829. /***/ (function(module, exports, __webpack_require__) {
  2830. // style-loader: Adds some css to the DOM by adding a <style> tag
  2831. // load the styles
  2832. var content = __webpack_require__(32);
  2833. if(typeof content === 'string') content = [[module.i, content, '']];
  2834. // add the styles to the DOM
  2835. var update = __webpack_require__(1)(content, {});
  2836. if(content.locals) module.exports = content.locals;
  2837. // Hot Module Replacement
  2838. if(false) {}
  2839. /***/ }),
  2840. /* 32 */
  2841. /***/ (function(module, exports, __webpack_require__) {
  2842. exports = module.exports = __webpack_require__(0)();
  2843. // imports
  2844. // module
  2845. exports.push([module.i, ".many-video-ad-component {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2147483647;\n background-color: #000;\n font-size: 12px; }\n .many-video-ad-component #many-video-ad-content {\n width: 100%;\n height: 100%; }\n .many-video-ad-component .many-video-ad-link {\n width: 100%;\n height: 100%;\n display: block;\n position: absolute;\n top: 0;\n left: 0; }\n .many-video-ad-component .many-video-ad-close {\n background-color: rgba(59, 59, 59, 0.85);\n position: absolute;\n top: 15px;\n right: 20px;\n color: #fff;\n line-height: 26px;\n padding: 0 10px;\n user-select: none; }\n .many-video-ad-component .many-video-ad-close #many-video-ad-duration {\n color: #00c1de;\n vertical-align: top;\n font-size: 14px;\n position: relative;\n display: inline-block;\n text-align: right; }\n .many-video-ad-component .many-video-ad-close #many-video-ad-duration::after {\n background-color: #fff;\n position: absolute;\n content: '';\n right: -7px;\n top: 8px;\n bottom: 8px;\n width: 1px; }\n .many-video-ad-component .many-video-ad-close label {\n cursor: pointer;\n display: inline-block; }\n .many-video-ad-component .many-video-ad-close .icon-close {\n font-size: 12px;\n vertical-align: top; }\n @media (min-width: 768px) {\n .many-video-ad-component .many-video-ad-close .icon-close:hover {\n color: #00c1de; } }\n .many-video-ad-component .many-video-ad-close .many-video-ad-close-text {\n padding: 0 5px 0 10px; }\n .many-video-ad-component .many-video-ad-detail {\n position: absolute;\n right: 35px;\n bottom: 30px;\n background-color: rgba(0, 222, 255, 0.85);\n color: #fff;\n padding: 8px 12px;\n user-select: none;\n cursor: pointer;\n transition: background-color .15s; }\n @media (min-width: 768px) {\n .many-video-ad-component .many-video-ad-detail:hover {\n background-color: #00deff; } }\n .many-video-ad-component .autoplay-many-video-ad {\n position: absolute;\n color: #fff;\n top: 50%;\n left: 50%;\n text-align: center;\n padding: 10px;\n border-radius: 5px;\n background-color: rgba(144, 147, 153, 0.85);\n transform: translate(-50%, -50%);\n display: none; }\n .many-video-ad-component .autoplay-many-video-ad i {\n font-size: 42px;\n margin-bottom: 7px;\n display: inline-block;\n cursor: pointer; }\n .many-video-ad-component .autoplay-many-video-ad i + span {\n margin-bottom: 5px; }\n .many-video-ad-component .autoplay-many-video-ad span {\n display: block; }\n\n.controlbar-element-hidden {\n display: none !important; }\n", ""]);
  2846. // exports
  2847. /***/ }),
  2848. /* 33 */
  2849. /***/ (function(module, exports) {
  2850. module.exports = "<div class=\"many-video-ad-component\" style=\"background-color: transparent;\">\n <div class=\"videosmb\"></div>\n <a class=\"many-video-ad-link\" target=\"_blank\"></a>\n <div class=\"many-video-ad-close\">\n <span id=\"many-video-ad-duration\"></span>\n <label>\n <span class=\"many-video-ad-close-text\"></span>\n <i class=\"iconfont icon-close\"></i>\n </label>\n </div>\n <a class=\"many-video-ad-detail\" target=\"_blank\"></a>\n <div class=\"autoplay-many-video-ad\" style=\"display: block;\">\n <i class=\"iconfont icon-player-play\"></i>\n <span class=\"limit\"></span>\n <span class=\"manual\"></span>\n </div>\n</div>";
  2851. /***/ }),
  2852. /* 34 */
  2853. /***/ (function(module, exports, __webpack_require__) {
  2854. "use strict";
  2855. var _index = __webpack_require__(35);
  2856. var _index2 = _interopRequireDefault(_index);
  2857. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  2858. if (!window.AliPlayerComponent) {
  2859. window.AliPlayerComponent = {};
  2860. }
  2861. window.AliPlayerComponent.MemoryPlayComponent = _index2.default;
  2862. /***/ }),
  2863. /* 35 */
  2864. /***/ (function(module, exports, __webpack_require__) {
  2865. "use strict";
  2866. Object.defineProperty(exports, "__esModule", {
  2867. value: true
  2868. });
  2869. var _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; }; }();
  2870. var _index = __webpack_require__(36);
  2871. var _index2 = _interopRequireDefault(_index);
  2872. __webpack_require__(37);
  2873. var _utils = __webpack_require__(2);
  2874. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  2875. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  2876. /**
  2877. * 记忆播放组件
  2878. */
  2879. var MemoryPlayComponent = function () {
  2880. /**
  2881. * @constructor 记忆播放组件构造函数
  2882. */
  2883. function MemoryPlayComponent() {
  2884. var autoPlay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  2885. var getTime = arguments[1];
  2886. var saveTimeFunction = arguments[2];
  2887. _classCallCheck(this, MemoryPlayComponent);
  2888. this.html = (0, _utils.parseDom)(_index2.default);
  2889. this.autoPlay = autoPlay;
  2890. this.getTime = getTime || this._getTime;
  2891. this.saveTimeFunction = saveTimeFunction || this._saveTime;
  2892. this.hasMemoryDisplay = false;
  2893. }
  2894. _createClass(MemoryPlayComponent, [{
  2895. key: 'createEl',
  2896. value: function createEl(el) {
  2897. el.appendChild(this.html);
  2898. }
  2899. }, {
  2900. key: 'ready',
  2901. value: function ready(player, e) {
  2902. var _this = this;
  2903. var playerOptions = player.getOptions();
  2904. var memoryVideo = playerOptions.vid || playerOptions.source.replace(/\?.*$/, ''); // 根据视频 vid 或者 source 去存储 localeStorage
  2905. var memoryTime = this.getTime(memoryVideo);
  2906. memoryTime = memoryTime ? parseInt(memoryTime) : 0;
  2907. if (memoryTime !== null && memoryTime !== 0 && !this.hasMemoryDisplay) {
  2908. // 标识记忆播放是否有触发, 解决清晰度切换也会触发记忆播放的问题
  2909. this.hasMemoryDisplay = true;
  2910. if (this.autoPlay) {
  2911. player.seek(memoryTime);
  2912. if (player.getStatus() !== 'playing') {
  2913. player.play();
  2914. }
  2915. } else {
  2916. var memoryVideoTime = this.getVideoTime(memoryTime);
  2917. //判断是否是视频播放完了,如果没到,就有拼接的跳转播放
  2918. if (memoryTime !== parseInt(player._duration)) {
  2919. var memoryDomString = '<div class="memory-play">\n <i class="iconfont icon-close"></i>\n <span>\u4E0A\u6B21\u770B\u5230</span>\n <span>' + memoryVideoTime + '</span>\n <span class="play-jump">\u8DF3\u8F6C\u64AD\u653E</span>\n </div>';
  2920. this.html.innerHTML = memoryDomString;
  2921. var timeoutMemory = setTimeout(function () {
  2922. _this.html.innerHTML = '';
  2923. }, 15000);
  2924. this.html.querySelector('.icon-close').onclick = function () {
  2925. _this.html.innerHTML = '';
  2926. clearTimeout(timeoutMemory);
  2927. };
  2928. this.html.querySelector('.play-jump').onclick = function () {
  2929. player.seek(memoryTime);
  2930. if (player.getStatus() !== 'playing') {
  2931. player.play();
  2932. }
  2933. _this.html.innerHTML = '';
  2934. clearTimeout(timeoutMemory);
  2935. };
  2936. }
  2937. }
  2938. }
  2939. document.onvisibilitychange = function () {
  2940. if (document.visibilityState === 'hidden' && player.getCurrentTime() !== 0) {
  2941. _this.saveTimeFunction(memoryVideo, player.getCurrentTime());
  2942. console.log(play);
  2943. }
  2944. };
  2945. window.onbeforeunload = function () {
  2946. if (player.getCurrentTime() !== 0) {
  2947. _this.saveTimeFunction(memoryVideo, player.getCurrentTime());
  2948. }
  2949. };
  2950. }
  2951. }, {
  2952. key: 'error',
  2953. value: function error(player, e) {
  2954. this.setMemory(player);
  2955. }
  2956. }, {
  2957. key: 'dispose',
  2958. value: function dispose(player, e) {
  2959. this.setMemory(player);
  2960. }
  2961. }, {
  2962. key: 'setMemory',
  2963. value: function setMemory(player) {
  2964. var playerOptions = player.getOptions();
  2965. var memoryVideo = playerOptions.vid || playerOptions.source.replace(/\?.*$/, '');
  2966. this.saveTimeFunction(memoryVideo, player.getCurrentTime());
  2967. }
  2968. }, {
  2969. key: 'getVideoTime',
  2970. value: function getVideoTime(duration) {
  2971. var secondTotal = Math.round(duration);
  2972. var hour = Math.floor(secondTotal / 3600);
  2973. var minute = Math.floor((secondTotal - hour * 3600) / 60);
  2974. var second = secondTotal - hour * 3600 - minute * 60;
  2975. if (minute < 10) {
  2976. minute = '0' + minute;
  2977. }
  2978. if (second < 10) {
  2979. second = '0' + second;
  2980. }
  2981. return hour === 0 ? minute + ':' + second : hour + ':' + minute + ':' + second;
  2982. }
  2983. }, {
  2984. key: '_getTime',
  2985. value: function _getTime(memoryVideo) {
  2986. return localStorage.getItem(memoryVideo);
  2987. }
  2988. }, {
  2989. key: '_saveTime',
  2990. value: function _saveTime(memoryVideo, currentTime) {
  2991. localStorage.setItem(memoryVideo, currentTime);
  2992. }
  2993. }]);
  2994. return MemoryPlayComponent;
  2995. }();
  2996. exports.default = MemoryPlayComponent;
  2997. /***/ }),
  2998. /* 36 */
  2999. /***/ (function(module, exports) {
  3000. module.exports = "<div class=\"memory-play-wrap\"></div>";
  3001. /***/ }),
  3002. /* 37 */
  3003. /***/ (function(module, exports, __webpack_require__) {
  3004. // style-loader: Adds some css to the DOM by adding a <style> tag
  3005. // load the styles
  3006. var content = __webpack_require__(38);
  3007. if(typeof content === 'string') content = [[module.i, content, '']];
  3008. // add the styles to the DOM
  3009. var update = __webpack_require__(1)(content, {});
  3010. if(content.locals) module.exports = content.locals;
  3011. // Hot Module Replacement
  3012. if(false) {}
  3013. /***/ }),
  3014. /* 38 */
  3015. /***/ (function(module, exports, __webpack_require__) {
  3016. exports = module.exports = __webpack_require__(0)();
  3017. // imports
  3018. // module
  3019. exports.push([module.i, ".memory-play-wrap {\n position: absolute;\n right: 10px;\n bottom: 55px; }\n .memory-play-wrap .memory-play {\n padding: 13px 20px;\n background-color: #191919;\n background-color: rgba(25, 25, 25, 0.88);\n border-radius: 4px;\n color: #fff;\n font-size: 14px;\n user-select: none; }\n .memory-play-wrap .memory-play .icon-close {\n transition: color .3s;\n font-size: 14px;\n cursor: pointer; }\n @media (min-width: 768px) {\n .memory-play-wrap .memory-play .icon-close:hover {\n color: #00c1de; } }\n .memory-play-wrap .memory-play .play-jump {\n color: #00c1de;\n padding: 5px;\n border-radius: 3px;\n cursor: pointer; }\n @media (min-width: 768px) {\n .memory-play-wrap .memory-play .play-jump:hover {\n background-color: rgba(255, 255, 255, 0.2); } }\n", ""]);
  3020. // exports
  3021. /***/ }),
  3022. /* 39 */
  3023. /***/ (function(module, exports, __webpack_require__) {
  3024. "use strict";
  3025. var _index = __webpack_require__(40);
  3026. var _index2 = _interopRequireDefault(_index);
  3027. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3028. if (!window.AliPlayerComponent) {
  3029. window.AliPlayerComponent = {};
  3030. }
  3031. window.AliPlayerComponent.PauseADComponent = _index2.default;
  3032. /***/ }),
  3033. /* 40 */
  3034. /***/ (function(module, exports, __webpack_require__) {
  3035. "use strict";
  3036. Object.defineProperty(exports, "__esModule", {
  3037. value: true
  3038. });
  3039. var _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; }; }();
  3040. var _index = __webpack_require__(41);
  3041. var _index2 = _interopRequireDefault(_index);
  3042. __webpack_require__(42);
  3043. var _utils = __webpack_require__(2);
  3044. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3045. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3046. /**
  3047. * 暂停图片广告组件
  3048. */
  3049. var PauseADComponent = function () {
  3050. /**
  3051. * @constructor 暂停图片广告组件构造函数
  3052. * @param {String coverUrl 封面图片地址}
  3053. * @param {String adUrl 广告地址}
  3054. */
  3055. function PauseADComponent(coverUrl, adUrl) {
  3056. _classCallCheck(this, PauseADComponent);
  3057. this.coverUrl = coverUrl;
  3058. this.adUrl = adUrl;
  3059. this.html = (0, _utils.parseDom)(_index2.default);
  3060. }
  3061. _createClass(PauseADComponent, [{
  3062. key: 'createEl',
  3063. value: function createEl(el, player) {
  3064. var _this = this;
  3065. var lang = player._options && player._options.language;
  3066. this.isEn = lang && lang === 'en-us';
  3067. this.html.querySelector('.ad-text').innerText = this.isEn ? 'Ad' : '广告';
  3068. var adContent = this.html.querySelector('.ad-content');
  3069. var adImg = adContent.querySelector('img');
  3070. adContent.setAttribute('href', this.adUrl);
  3071. adImg.setAttribute('src', this.coverUrl);
  3072. var btnClose = this.html.querySelector('.btn-close');
  3073. btnClose.onclick = function () {
  3074. _this.html.style.display = 'none';
  3075. };
  3076. el.appendChild(this.html);
  3077. }
  3078. }, {
  3079. key: 'play',
  3080. value: function play(player, e) {
  3081. this.html.style.display = 'none';
  3082. }
  3083. }, {
  3084. key: 'pause',
  3085. value: function pause(player, e) {
  3086. this.html.style.display = 'block';
  3087. }
  3088. }]);
  3089. return PauseADComponent;
  3090. }();
  3091. exports.default = PauseADComponent;
  3092. /***/ }),
  3093. /* 41 */
  3094. /***/ (function(module, exports) {
  3095. module.exports = "<div class=\"pause-ad\">\n <a class=\"btn-close\">\n <i class=\"split-left\"></i>\n <i class=\"split-right\"></i>\n <a>\n <span class=\"ad-text\"></span>\n <a class=\"ad-content\" target=\"_blank\">\n <img />\n </a>\n</div>";
  3096. /***/ }),
  3097. /* 42 */
  3098. /***/ (function(module, exports, __webpack_require__) {
  3099. // style-loader: Adds some css to the DOM by adding a <style> tag
  3100. // load the styles
  3101. var content = __webpack_require__(43);
  3102. if(typeof content === 'string') content = [[module.i, content, '']];
  3103. // add the styles to the DOM
  3104. var update = __webpack_require__(1)(content, {});
  3105. if(content.locals) module.exports = content.locals;
  3106. // Hot Module Replacement
  3107. if(false) {}
  3108. /***/ }),
  3109. /* 43 */
  3110. /***/ (function(module, exports, __webpack_require__) {
  3111. exports = module.exports = __webpack_require__(0)();
  3112. // imports
  3113. // module
  3114. exports.push([module.i, ".pause-ad {\n width: 60%;\n height: 50%;\n background: #000;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n position: absolute;\n display: none; }\n .pause-ad .btn-close {\n position: absolute;\n top: 5px;\n right: 5px;\n background-color: #333;\n width: 2px;\n height: 15px;\n padding: 2px 8px;\n cursor: pointer; }\n .pause-ad .btn-close i {\n background-color: #fff;\n width: 2px;\n height: 15px;\n position: absolute; }\n .pause-ad .btn-close .split-left {\n transform: rotate(-45deg); }\n .pause-ad .btn-close .split-right {\n transform: rotate(45deg); }\n .pause-ad .ad-text {\n position: absolute;\n left: 5px;\n top: 5px;\n background-color: #333;\n color: #fff;\n padding: 3px 5px;\n font-size: 14px; }\n .pause-ad .ad-content {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center; }\n .pause-ad .ad-content img {\n max-width: 100%;\n max-height: 100%; }\n", ""]);
  3115. // exports
  3116. /***/ }),
  3117. /* 44 */
  3118. /***/ (function(module, exports, __webpack_require__) {
  3119. "use strict";
  3120. var _index = __webpack_require__(45);
  3121. var _index2 = _interopRequireDefault(_index);
  3122. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3123. if (!window.AliPlayerComponent) {
  3124. window.AliPlayerComponent = {};
  3125. }
  3126. window.AliPlayerComponent.PlaylistComponent = _index2.default;
  3127. /***/ }),
  3128. /* 45 */
  3129. /***/ (function(module, exports, __webpack_require__) {
  3130. "use strict";
  3131. Object.defineProperty(exports, "__esModule", {
  3132. value: true
  3133. });
  3134. var _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; }; }();
  3135. var _index = __webpack_require__(46);
  3136. var _index2 = _interopRequireDefault(_index);
  3137. var _list = __webpack_require__(47);
  3138. var _list2 = _interopRequireDefault(_list);
  3139. __webpack_require__(48);
  3140. var _utils = __webpack_require__(2);
  3141. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3142. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3143. /**
  3144. * 播放列表事件
  3145. */
  3146. var PlaylistComponentEvent = {
  3147. VideoClick: 'plugin-playlist-click-video',
  3148. PrevClick: 'plugin-playlist-click-prev',
  3149. NextClick: 'plugin-playlist-click-next',
  3150. VideoChange: 'plugin-playlist-change'
  3151. /**
  3152. * 播放列表组件
  3153. */
  3154. };
  3155. var PlaylistComponent = function () {
  3156. /**
  3157. * @constructor 播放列表组件构造函数
  3158. * @param {Array playlist 播放列表数组}
  3159. */
  3160. function PlaylistComponent(playlist) {
  3161. _classCallCheck(this, PlaylistComponent);
  3162. this.controlHtml = (0, _utils.parseDom)(_index2.default);
  3163. this.listHtml = (0, _utils.parseDom)(_list2.default);
  3164. this.playlist = playlist;
  3165. this.playingVideoIndex = 0;
  3166. this.listHideTimeout = null;
  3167. }
  3168. _createClass(PlaylistComponent, [{
  3169. key: 'createEl',
  3170. value: function createEl(el, player) {
  3171. var _this = this;
  3172. var lang = player._options && player._options.language;
  3173. this.isEn = lang && lang === 'en-us';
  3174. this.controlHtml.querySelector('.player-tooltip.prev').innerText = this.isEn ? 'Previous' : '上一个';
  3175. this.controlHtml.querySelector('.player-tooltip.list').innerText = this.isEn ? 'Playlist' : '播放列表';
  3176. this.controlHtml.querySelector('.player-tooltip.next').innerText = this.isEn ? 'Next' : '下一个';
  3177. var controlbarElement = el.querySelector('.prism-controlbar');
  3178. var siblingElement = controlbarElement.querySelector('.prism-time-display');
  3179. controlbarElement.insertBefore(this.controlHtml, siblingElement);
  3180. this.listHtml.onmouseleave = function () {
  3181. _this.listHtml.style.width = 0;
  3182. };
  3183. this.listHtml.onmouseenter = this.clearHideListTimeout.bind(this);
  3184. this.controlHtml.querySelector('.icon-list').onclick = this.tooglePlaylist.bind(this);
  3185. this.listHtml.querySelector('.list').innerHTML = this.computedListDom(this.playlist);
  3186. var source = player.getOptions() && player.getOptions().source;
  3187. var defaultPlayIndex = 0;
  3188. if (source) {
  3189. defaultPlayIndex = this.playlist.findIndex(function (item) {
  3190. return item.source === source;
  3191. });
  3192. defaultPlayIndex = defaultPlayIndex > -1 ? defaultPlayIndex : 0;
  3193. this.playingVideoIndex = defaultPlayIndex > -1 ? defaultPlayIndex : 0;
  3194. }
  3195. this.listHtml.querySelector('.list').childNodes[0].className = 'video-item active';
  3196. el.appendChild(this.listHtml);
  3197. }
  3198. }, {
  3199. key: 'ready',
  3200. value: function ready(player, e) {
  3201. var _this2 = this;
  3202. this.controlHtml.querySelector('.icon-skip-previous').onclick = function () {
  3203. player && player.trigger(PlaylistComponentEvent.PrevClick, {
  3204. currentIndex: Math.max(_this2.playingVideoIndex - 1, 0)
  3205. });
  3206. if (_this2.playingVideoIndex === 0) {
  3207. _this2.playlistTip(_this2.isEn ? 'Already the first one~' : '已经是第一个了~', player._el);
  3208. return;
  3209. }
  3210. _this2.playVideo(player, _this2.playingVideoIndex - 1);
  3211. };
  3212. this.controlHtml.querySelector('.icon-skipnext').onclick = function () {
  3213. player && player.trigger(PlaylistComponentEvent.NextClick, {
  3214. currentIndex: Math.min(_this2.playingVideoIndex + 1, _this2.playlist.length - 1)
  3215. });
  3216. if (_this2.playingVideoIndex === _this2.playlist.length - 1) {
  3217. _this2.playlistTip(_this2.isEn ? 'Already the last one~' : '已经是最后一个了~', player._el);
  3218. return;
  3219. }
  3220. _this2.playVideo(player, _this2.playingVideoIndex + 1);
  3221. };
  3222. this.listHtml.querySelector('.list').onclick = function (e) {
  3223. var target = e.target;
  3224. var videoIndex = parseInt(target.getAttribute('data-index'));
  3225. player && player.trigger(PlaylistComponentEvent.VideoClick, {
  3226. currentIndex: _this2.playingVideoIndex,
  3227. clickedIndex: videoIndex
  3228. });
  3229. if (target.className === 'video-item') {
  3230. _this2.playVideo(player, videoIndex);
  3231. }
  3232. };
  3233. }
  3234. /* clear 自动隐藏右侧播放列表 timeout 的函数 */
  3235. }, {
  3236. key: 'clearHideListTimeout',
  3237. value: function clearHideListTimeout() {
  3238. if (this.listHideTimeout !== null) {
  3239. clearTimeout(this.listHideTimeout);
  3240. this.listHideTimeout = null;
  3241. }
  3242. }
  3243. /* 播放 playlist 中 index 为 @param videoIndex 的视频 */
  3244. }, {
  3245. key: 'playVideo',
  3246. value: function playVideo(player, videoIndex) {
  3247. if (this.playingVideoIndex === videoIndex) {
  3248. return;
  3249. }
  3250. player && player.trigger(PlaylistComponentEvent.VideoChange, { currentIndex: videoIndex });
  3251. this.playingVideoIndex = parseInt(videoIndex);
  3252. player.loadByUrl(this.playlist[videoIndex].source);
  3253. this.listHtml.querySelector('.video-item.active').className = 'video-item';
  3254. this.listHtml.querySelector('.list').childNodes[videoIndex].className = 'video-item active';
  3255. }
  3256. /* 点击 controlbar 上的播放列表按钮显示隐藏播放列表 */
  3257. }, {
  3258. key: 'tooglePlaylist',
  3259. value: function tooglePlaylist() {
  3260. var _this3 = this;
  3261. this.clearHideListTimeout();
  3262. if (this.listHtml.style.width === '30%') {
  3263. this.listHtml.style.width = 0;
  3264. } else {
  3265. this.listHtml.style.width = '30%';
  3266. this.listHideTimeout = setTimeout(function () {
  3267. _this3.listHtml.style.width = 0;
  3268. }, 5000);
  3269. }
  3270. }
  3271. /* 播放器提示信息 */
  3272. }, {
  3273. key: 'playlistTip',
  3274. value: function playlistTip(msg, el) {
  3275. var tipElement = document.createElement('div');
  3276. tipElement.className = 'playlist-skip-tip';
  3277. tipElement.innerText = msg;
  3278. el.appendChild(tipElement);
  3279. setTimeout(function () {
  3280. el.removeChild(tipElement);
  3281. }, 3000);
  3282. }
  3283. }, {
  3284. key: 'computedListDom',
  3285. value: function computedListDom(playlist) {
  3286. var domList = playlist.map(function (item, index) {
  3287. return '<div class="video-item" data-index="' + index + '" title="' + item.name + '">' + item.name + '</div>';
  3288. });
  3289. return domList.join('');
  3290. }
  3291. }]);
  3292. return PlaylistComponent;
  3293. }();
  3294. exports.default = PlaylistComponent;
  3295. /***/ }),
  3296. /* 46 */
  3297. /***/ (function(module, exports) {
  3298. module.exports = "<div class=\"playlist-component\">\n <i class=\"iconfont icon-skip-previous\"></i>\n <div class=\"player-tooltip prev\">上一个</div>\n <i class=\"iconfont icon-list\"></i>\n <div class=\"player-tooltip list\">播放列表</div>\n <i class=\"iconfont icon-skipnext\"></i>\n <div class=\"player-tooltip next\">下一个</div> \n</div>";
  3299. /***/ }),
  3300. /* 47 */
  3301. /***/ (function(module, exports) {
  3302. module.exports = "<div class=\"playlist-content\">\n <div class=\"list\"></div>\n</div>";
  3303. /***/ }),
  3304. /* 48 */
  3305. /***/ (function(module, exports, __webpack_require__) {
  3306. // style-loader: Adds some css to the DOM by adding a <style> tag
  3307. // load the styles
  3308. var content = __webpack_require__(49);
  3309. if(typeof content === 'string') content = [[module.i, content, '']];
  3310. // add the styles to the DOM
  3311. var update = __webpack_require__(1)(content, {});
  3312. if(content.locals) module.exports = content.locals;
  3313. // Hot Module Replacement
  3314. if(false) {}
  3315. /***/ }),
  3316. /* 49 */
  3317. /***/ (function(module, exports, __webpack_require__) {
  3318. exports = module.exports = __webpack_require__(0)();
  3319. // imports
  3320. // module
  3321. exports.push([module.i, ".playlist-component {\n color: #fff;\n float: left;\n height: 35px;\n margin-top: 5px;\n display: flex;\n align-items: center;\n position: relative; }\n .playlist-component i {\n color: #fff;\n display: inline-block;\n font-size: 22px;\n display: block;\n margin-top: 7px;\n cursor: pointer; }\n .playlist-component i + i {\n margin-left: 3px; }\n @media (min-width: 768px) {\n .playlist-component i:hover + .player-tooltip {\n display: block; } }\n .playlist-component .player-tooltip.prev {\n left: -10px; }\n .playlist-component .player-tooltip.list {\n left: 5px; }\n .playlist-component .player-tooltip.next {\n right: -12px; }\n\n.playlist-content {\n position: absolute;\n right: 0;\n width: 0px;\n padding-bottom: 48px;\n box-sizing: border-box;\n height: 100%;\n transition: all .38s ease-in-out;\n overflow: hidden; }\n .playlist-content .list {\n background-color: #000;\n background-color: rgba(0, 0, 0, 0.3);\n height: 100%;\n overflow: auto; }\n .playlist-content .list .video-item {\n color: #fff;\n padding: 0px 10px;\n line-height: 35px;\n font-size: 14px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer; }\n .playlist-content .list .video-item.active {\n background-color: #000;\n color: #00ddff; }\n @media (min-width: 768px) {\n .playlist-content .list .video-item:hover {\n background-color: #000;\n color: #00ddff; } }\n\n.player-tooltip {\n position: absolute;\n display: none;\n font-size: 12px;\n color: #fff;\n line-height: 28px;\n letter-spacing: 0;\n text-align: center;\n background: #3c3c3c;\n box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);\n height: 28px;\n top: -48px;\n padding: 0 5px;\n white-space: nowrap; }\n\n.playlist-skip-tip {\n padding: 5px 15px;\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 30;\n line-height: 30px;\n font-size: 14px;\n border-radius: 4px;\n background: rgba(255, 255, 255, 0.8);\n color: #000;\n text-align: center;\n transform: translate(-50%, -50%); }\n", ""]);
  3322. // exports
  3323. /***/ }),
  3324. /* 50 */
  3325. /***/ (function(module, exports, __webpack_require__) {
  3326. "use strict";
  3327. var _index = __webpack_require__(51);
  3328. var _index2 = _interopRequireDefault(_index);
  3329. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3330. if (!window.AliPlayerComponent) {
  3331. window.AliPlayerComponent = {};
  3332. }
  3333. window.AliPlayerComponent.PreviewVodComponent = _index2.default;
  3334. /***/ }),
  3335. /* 51 */
  3336. /***/ (function(module, exports, __webpack_require__) {
  3337. "use strict";
  3338. Object.defineProperty(exports, "__esModule", {
  3339. value: true
  3340. });
  3341. var _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; }; }();
  3342. var _index = __webpack_require__(52);
  3343. var _index2 = _interopRequireDefault(_index);
  3344. __webpack_require__(53);
  3345. var _utils = __webpack_require__(2);
  3346. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3347. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3348. /**
  3349. * 结合点播服务的试看组件
  3350. */
  3351. var PreviewVodComponent = function () {
  3352. /**
  3353. * @constructor 试看组件构造函数
  3354. * @param {Number previewDuration 试看时长单位为秒, 传入0表示可以完整观看}
  3355. * @param {String previewEndHtml 可选参数, 插入到试看结束之后显示的 dom 字符串, 默认为 null}
  3356. * @param {String previewBarHtml 可选参数, 插入到免费试看多少分钟之后的 html}
  3357. */
  3358. function PreviewVodComponent(previewDuration) {
  3359. var previewEndHtml = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  3360. var previewBarHtml = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  3361. _classCallCheck(this, PreviewVodComponent);
  3362. this.previewDuration = previewDuration;
  3363. this.html = (0, _utils.parseDom)(_index2.default);
  3364. // 在试看结束之后, 如果用户自定义
  3365. if (previewEndHtml !== null) {
  3366. this.insertHTtml(previewEndHtml, 'previewEndHtml');
  3367. }
  3368. if (previewBarHtml !== null) {
  3369. this.insertHTtml(previewBarHtml, 'previewBarHtml');
  3370. }
  3371. }
  3372. _createClass(PreviewVodComponent, [{
  3373. key: 'play',
  3374. value: function play(player) {
  3375. if (this.previewEnd) {
  3376. player._el.querySelector('.center').classList.remove('preview-hide');
  3377. player.seek(0);
  3378. this.previewEnd = false;
  3379. }
  3380. }
  3381. }, {
  3382. key: 'insertHTtml',
  3383. value: function insertHTtml(idOrHmtl, params) {
  3384. var parentSelector = params === 'previewEndHtml' ? '.preview-custom' : '.preview-custom-bar';
  3385. var parentEle = this.html.querySelector(parentSelector);
  3386. if (typeof idOrHmtl === 'string') {
  3387. if (idOrHmtl[0] === '#') {
  3388. var templeteEle = document.querySelector(idOrHmtl);
  3389. if (templeteEle) {
  3390. parentEle.innerHTML = templeteEle.innerHTML;
  3391. } else {
  3392. console.warn('[aliplayer components warn]: Invalid parameter ' + params + ', can\'t find element by this id');
  3393. }
  3394. } else {
  3395. parentEle.innerHTML = idOrHmtl;
  3396. }
  3397. } else {
  3398. console.warn('[aliplayer components warn]: Invalid parameter ' + params + ', ' + params + ' must be a string type');
  3399. }
  3400. }
  3401. }, {
  3402. key: 'ready',
  3403. value: function ready(player) {
  3404. var videoDuration = parseInt(player.getDuration());
  3405. this.videoDuration = videoDuration;
  3406. if (!this.invalidPreview && this.previewDuration >= videoDuration) {
  3407. this.invalidPreview = true;
  3408. console.warn('[aliplayer components warn]: Invalid parameter previewDuration, previewDuration must be less than the video duration!');
  3409. }
  3410. if (this.previewDuration !== 0 && this.previewDuration < videoDuration) {
  3411. this.html.style.display = 'block';
  3412. }
  3413. }
  3414. }, {
  3415. key: 'createEl',
  3416. value: function createEl(el, player) {
  3417. var _this = this;
  3418. var lang = player._options && player._options.language;
  3419. this.isEn = lang && lang === 'en-us';
  3420. console.log(this.html.querySelector('.preview-default'));
  3421. var previewDefaultEle = this.html.querySelector('.preview-default');
  3422. if (previewDefaultEle) {
  3423. previewDefaultEle.innerText = this.isEn ? 'Preview is over' : '试看已结束';
  3424. }
  3425. this.html.querySelector('.can-preview').innerText = this.isEn ? 'Try' : '可试看';
  3426. var previewDuration = this.previewDuration;
  3427. if (previewDuration === 0) {
  3428. this.html.style.display = 'none';
  3429. }
  3430. var previewDuration_text = previewDuration / 60;
  3431. var decimal = previewDuration_text.toString().split('.')[1];
  3432. if (decimal && decimal.length > 1) {
  3433. previewDuration_text = ' ' + previewDuration + (this.isEn ? ' senconds' : ' 秒');
  3434. } else {
  3435. previewDuration_text = ' ' + previewDuration_text + (this.isEn ? ' minutes' : ' 分钟');
  3436. }
  3437. if (previewDuration < 60) {
  3438. previewDuration_text = ' ' + previewDuration + (this.isEn ? ' senconds' : ' 秒');
  3439. }
  3440. // 考虑到可能不是整分钟数, 整分钟数去掉小数点后面的 0
  3441. this.html.querySelector('.preview-time').innerText = previewDuration_text;
  3442. var videoSiblingElement = el.querySelector('video').nextElementSibling;
  3443. if (videoSiblingElement) {
  3444. el.insertBefore(this.html, videoSiblingElement);
  3445. } else {
  3446. el.appendChild(this.html);
  3447. }
  3448. var closeSpan = this.html.querySelector('.preview-vod-close');
  3449. closeSpan.addEventListener('click', function () {
  3450. _this.html.querySelector('.preview-component-tip').style.display = 'none';
  3451. });
  3452. player.setPreviewTime(Number(this.previewDuration));
  3453. }
  3454. }, {
  3455. key: 'closePreviewLayer',
  3456. value: function closePreviewLayer() {
  3457. this.previewEnd = false;
  3458. this.html.querySelector('.preview-component-layer').style.display = 'none';
  3459. }
  3460. }, {
  3461. key: 'timeupdate',
  3462. value: function timeupdate(player) {
  3463. if (!this.previewEnd && this.previewDuration !== 0 && this.previewDuration < this.videoDuration) {
  3464. var previewTime = player.getPreviewTime();
  3465. var currentTime = player.getCurrentTime();
  3466. if (Math.floor(previewTime) < currentTime) {
  3467. this.previewEnd = true;
  3468. player._el.querySelector('.center') && player._el.querySelector('.center').classList.add('preview-hide');
  3469. player.seek(previewTime);
  3470. player.pause();
  3471. this.html.querySelector('.preview-component-layer').style.display = 'block';
  3472. }
  3473. }
  3474. }
  3475. }, {
  3476. key: 'ended',
  3477. value: function ended(player, e) {
  3478. if (player.isPreview()) {
  3479. this.html.querySelector('.preview-component-layer').style.display = 'block';
  3480. }
  3481. }
  3482. }]);
  3483. return PreviewVodComponent;
  3484. }();
  3485. exports.default = PreviewVodComponent;
  3486. /***/ }),
  3487. /* 52 */
  3488. /***/ (function(module, exports) {
  3489. module.exports = "<div class=\"preview-vod-component\">\n <div class=\"preview-component-layer\">\n <div class=\"preview-custom\">\n <p class=\"preview-default\"></p>\n </div>\n </div>\n <div class=\"preview-component-tip\">\n <span class=\"can-preview\"></span><span class=\"preview-time\"></span>, <span class=\"preview-custom-bar\">Become VIP Watch Full Version </span>\n <span class=\"preview-vod-close\">x</span>\n </div>\n</div>";
  3490. /***/ }),
  3491. /* 53 */
  3492. /***/ (function(module, exports, __webpack_require__) {
  3493. // style-loader: Adds some css to the DOM by adding a <style> tag
  3494. // load the styles
  3495. var content = __webpack_require__(54);
  3496. if(typeof content === 'string') content = [[module.i, content, '']];
  3497. // add the styles to the DOM
  3498. var update = __webpack_require__(1)(content, {});
  3499. if(content.locals) module.exports = content.locals;
  3500. // Hot Module Replacement
  3501. if(false) {}
  3502. /***/ }),
  3503. /* 54 */
  3504. /***/ (function(module, exports, __webpack_require__) {
  3505. exports = module.exports = __webpack_require__(0)();
  3506. // imports
  3507. // module
  3508. exports.push([module.i, ".preview-hide {\n display: none !important; }\n\n.preview-vod-component {\n display: none; }\n .preview-vod-component .preview-component-layer {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background-color: rgba(0, 0, 0, 0.8);\n z-index: 9998;\n box-sizing: border-box;\n padding: 20px 20px 70px;\n display: none; }\n .preview-vod-component .preview-component-layer .preview-close {\n position: absolute;\n right: 18px;\n top: 15px;\n border-radius: 50%;\n color: #000;\n background: white;\n width: 20px;\n height: 20px;\n text-align: center;\n line-height: 18px;\n vertical-align: top;\n color: #333;\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);\n cursor: pointer;\n z-index: 9998; }\n .preview-vod-component .preview-component-layer .preview-custom {\n width: 100%;\n height: 100%;\n position: relative; }\n .preview-vod-component .preview-component-layer .preview-custom .preview-default {\n font-size: 14px;\n color: #fff;\n text-align: center;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: 100%; }\n .preview-vod-component .preview-custom {\n color: #fff;\n font-size: 14px; }\n .preview-vod-component .preview-component-tip {\n position: absolute;\n bottom: 50px;\n left: 25px;\n border-radius: 15px;\n background-color: #333;\n color: #fff;\n line-height: 26px;\n font-size: 14px;\n padding: 0 12px;\n z-index: 9998; }\n .preview-vod-component .preview-vod-close {\n font-size: 18px;\n cursor: pointer;\n padding: 0 5px;\n font-family: PingFangSC-Regular, sans-serif;\n font-weight: 200; }\n .preview-vod-component .preview-vod-close:hover {\n color: #00c1de; }\n", ""]);
  3509. // exports
  3510. /***/ }),
  3511. /* 55 */
  3512. /***/ (function(module, exports, __webpack_require__) {
  3513. "use strict";
  3514. var _index = __webpack_require__(56);
  3515. var _index2 = _interopRequireDefault(_index);
  3516. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3517. if (!window.AliPlayerComponent) {
  3518. window.AliPlayerComponent = {};
  3519. }
  3520. window.AliPlayerComponent.ProgressComponent = _index2.default;
  3521. /***/ }),
  3522. /* 56 */
  3523. /***/ (function(module, exports, __webpack_require__) {
  3524. "use strict";
  3525. Object.defineProperty(exports, "__esModule", {
  3526. value: true
  3527. });
  3528. var _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; }; }();
  3529. var _index = __webpack_require__(57);
  3530. var _index2 = _interopRequireDefault(_index);
  3531. var _utils = __webpack_require__(2);
  3532. __webpack_require__(58);
  3533. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3534. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3535. /**
  3536. * 视频打点组件
  3537. */
  3538. var ProgressMarker = function () {
  3539. function ProgressMarker() {
  3540. _classCallCheck(this, ProgressMarker);
  3541. this.html = (0, _utils.parseDom)(_index2.default);
  3542. this.imgEle = this.html.querySelector('.img-wrap img');
  3543. this.timeEle = this.html.querySelector('.time');
  3544. this.playBtnEle = this.html.querySelector('.pregress-play-btn');
  3545. this.describeEle = this.html.querySelector('.describe');
  3546. this.timer = null;
  3547. this.currentOffset = null;
  3548. }
  3549. _createClass(ProgressMarker, [{
  3550. key: 'createEl',
  3551. value: function createEl(el, player) {
  3552. var _this = this;
  3553. el.appendChild(this.html);
  3554. this.html.onmouseenter = function () {
  3555. if (_this.timer !== null) {
  3556. clearTimeout(_this.timer);
  3557. _this.timer = null;
  3558. }
  3559. };
  3560. this.html.onmouseleave = function () {
  3561. _this.html.style.display = 'none';
  3562. };
  3563. this.html.onclick = function () {
  3564. _this.html.style.display = 'none';
  3565. };
  3566. this.html.querySelector('.pregress-play-btn').addEventListener('click', function () {
  3567. player.seek(_this.currentOffset);
  3568. });
  3569. }
  3570. }, {
  3571. key: 'markerDotOver',
  3572. value: function markerDotOver(player, data) {
  3573. var maxWidth = player._el.clientWidth;
  3574. var componentLeft = 'calc(' + data.left * 100 + '% - 10px)';
  3575. if (maxWidth * data.left + 323 > maxWidth) {
  3576. componentLeft = maxWidth - 330 + 'px';
  3577. this.html.querySelector('.icon-arrowdown').style.left = maxWidth * data.left - maxWidth + 317 + 'px';
  3578. } else {
  3579. this.html.querySelector('.icon-arrowdown').style.left = '-2px';
  3580. }
  3581. var _data$progressMarker = data.progressMarker,
  3582. coverUrl = _data$progressMarker.coverUrl,
  3583. title = _data$progressMarker.title,
  3584. describe = _data$progressMarker.describe,
  3585. offset = _data$progressMarker.offset;
  3586. this.currentOffset = offset;
  3587. this.html.style.left = componentLeft;
  3588. this.imgEle.src = coverUrl;
  3589. this.timeEle.innerText = title;
  3590. this.describeEle.innerText = describe;
  3591. this.html.style.display = 'block';
  3592. }
  3593. }, {
  3594. key: 'markerDotOut',
  3595. value: function markerDotOut(player, data) {
  3596. var _this2 = this;
  3597. this.timer = setTimeout(function () {
  3598. _this2.html.style.display = 'none';
  3599. }, 100);
  3600. }
  3601. }]);
  3602. return ProgressMarker;
  3603. }();
  3604. exports.default = ProgressMarker;
  3605. /***/ }),
  3606. /* 57 */
  3607. /***/ (function(module, exports) {
  3608. module.exports = "<div class=\"progress-component\">\n <div class=\"progress-content clearfix\">\n <div class=\"img-wrap\"><img /></div> \n\n <div class=\"info\">\n <div class=\"time\"></div>\n <div class=\"describe\"></div>\n </div>\n\n <i href=\"\" target=\"_blank\" class=\"iconfont icon-play pregress-play-btn\"></i>\n </div>\n <i class=\"iconfont icon-arrowdown\"></i>\n</div>";
  3609. /***/ }),
  3610. /* 58 */
  3611. /***/ (function(module, exports, __webpack_require__) {
  3612. // style-loader: Adds some css to the DOM by adding a <style> tag
  3613. // load the styles
  3614. var content = __webpack_require__(59);
  3615. if(typeof content === 'string') content = [[module.i, content, '']];
  3616. // add the styles to the DOM
  3617. var update = __webpack_require__(1)(content, {});
  3618. if(content.locals) module.exports = content.locals;
  3619. // Hot Module Replacement
  3620. if(false) {}
  3621. /***/ }),
  3622. /* 59 */
  3623. /***/ (function(module, exports, __webpack_require__) {
  3624. exports = module.exports = __webpack_require__(0)();
  3625. // imports
  3626. // module
  3627. exports.push([module.i, "@font-face {\n font-family: \"iconfont\";\n src: url(" + __webpack_require__(4) + ");\n /* IE9 */\n src: url(" + __webpack_require__(4) + "#iefix) format(\"embedded-opentype\"), url(\"data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALoAAsAAAAABswAAAKZAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBLIEoATYCJAMMCwgABCAFhG0HPxv3BciemjwJBBawWJiKrz0ASDwe/hv7dt/MfNW2KmnPdtG6CbVE49AhkkRLp5FIhAwheQn/z+kv/1pWQYEwj7X+Uuyl/nTcdSTtTi8NcwkH30gwCtRYSyHREE3ufj9P1OLQShNpd5+4d/rneReO/SzLZW3rorEmfwww7rwLcKxFEQ2RQLxh7AKXcJhA07wmodOhiRQqVFijAvHU1GVUmAsrCsvVhWrNwiLeqKinV+kQr8Pvx397KSSpZNbEyyeDGur5VflDWJ2tols+IUKAyyvI2IUU4k5t+hpBML6gaRfbS6uKkOaK/T+hXndWd/rHS0SVVd0Gm9CWbsrgqgh+00EB8vtVFGxALmYoJOTctiY+K0kvXH6mrr7SNz/Z6+9Zx5qJtFlNxSWTO6vj1HYuhJefJ9ftXh9abHpfLGqU77bG13rmtKH98PROBBAh724RzHCxLE2XTr/nplZqkQ6eox7Wz9KPuBAIal+/fLw7HX+FxQX8PFYXDpmtiii/QP1UnuDXdSohKNxkuXJR7VqrA9nqbYxMaGpihrB/6Hm8c9K7mlA3SZHUzCGrWyULu4uKln1U1R2gacfw8pYRRhClgW1bAKFvD0nXN2R9R2Rhn1Ax9YuqfgQ0XYmyDVvWY0r9DMsca6DMgalSjzhuLkW1CaxPOTLLmkJpBrPAjEEsHC3mhrGH2RxTgmk9zjkBwqgLQ+A47DgUfEYtrPKwwbnfFomQuheFVeoiyQkGk3GYBijmAJOK8hC/NSeVPp+A6aY4ZKyFU1PPwJiA2T2ICYv2IIftXi/OvTwTmKaL4zgCEAzlAkOgH+ZwUMCv72fBVFyYMSLpaxOxm5G+9vD6Tvf7tkGTNSlHihxF9z5jdEZzenvNKvXnRN+R5xACAAAA\") format(\"woff2\"), url(" + __webpack_require__(60) + ") format(\"woff\"), url(" + __webpack_require__(61) + ") format(\"truetype\"), url(" + __webpack_require__(62) + "#iconfont) format(\"svg\");\n /* iOS 4.1- */ }\n\n.iconfont {\n font-family: \"iconfont\" !important;\n font-size: 16px;\n font-style: normal;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale; }\n\n.icon-play:before {\n content: \"\\E726\"; }\n\n.icon-arrowdown:before {\n content: \"\\E623\"; }\n\n.clearfix:before, .clearfix:after {\n content: \"\";\n display: table;\n line-height: 0; }\n\n.clearfix:after {\n clear: both; }\n\n.clearfix {\n *zoom: 1; }\n\n.progress-component {\n padding: 8px;\n background-color: rgba(0, 0, 0, 0.35);\n position: absolute;\n display: none;\n box-sizing: border-box;\n bottom: 55px;\n font-size: 12px;\n color: #fff;\n height: 74px;\n z-index: 10; }\n .progress-component .progress-content {\n height: 100%;\n position: relative;\n padding-right: 45px; }\n .progress-component .img-wrap {\n float: left;\n width: 100px;\n text-align: center;\n border: 1px solid rgba(0, 0, 0, 0.6);\n height: 100%; }\n .progress-component .img-wrap img {\n vertical-align: top;\n max-width: 100%;\n max-height: 100%;\n object-fit: contain; }\n .progress-component .info {\n float: left;\n padding-left: 10px;\n width: 150px; }\n .progress-component .info .describe {\n line-height: 18px;\n margin-top: 8px;\n height: 36px;\n overflow: hidden; }\n .progress-component .pregress-play-btn {\n display: inline-block;\n position: absolute;\n right: 6px;\n bottom: 0px;\n font-size: 28px;\n color: #ca7838;\n cursor: pointer; }\n .progress-component .icon-arrowdown {\n left: -2px;\n position: absolute;\n font-size: 31px;\n color: rgba(0, 0, 0, 0.35);\n line-height: 6px;\n top: 100%; }\n", ""]);
  3628. // exports
  3629. /***/ }),
  3630. /* 60 */
  3631. /***/ (function(module, exports) {
  3632. module.exports = "data:application/font-woff;base64,d09GRgABAAAAAARoAAsAAAAABswAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8mUkYY21hcAAAAYAAAABWAAABhmkn0RRnbHlmAAAB2AAAAJEAAACsoFCg7WhlYWQAAAJsAAAALwAAADYU+6wjaGhlYQAAApwAAAAeAAAAJAfeA4VobXR4AAACvAAAAAwAAAAMDAEAAGxvY2EAAALIAAAACAAAAAgADgBWbWF4cAAAAtAAAAAeAAAAIAEQADBuYW1lAAAC8AAAAUUAAAJtPlT+fXBvc3QAAAQ4AAAALgAAAD/D5yXjeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeKT9XY27438AQw9zA0AAUZgTJAQDi6gwteJztkMENgDAMAy9p6QOxBRLiwUC8GJ+OUdwUtsDSxYqTl4EJSOIQGezC6DqVWuSJOfIcP0Vu+L3WrTX4XDLdSrhrFH4tMfd3897WoDdbtwH+ADzlDm4AAHicTYu7DcIwGITvt/FDjiIEQnFtRTItBQTmQGIBJskWbOQeUURykyI7pEKGP12uuu8eILDEQB8IgIIXQ7kzvZdYAr9+A9mjgkfLvYZp4DtcI2TEkQ2jhmwOW9Lxsjt3XiCVWSlyKZFTqswpl5E55EyBeXxaO9m6tvKxlKvx97RaZX6JyuzNSxtHN2c0/rNfLF8AAAB4nGNgZGBgAGLxnctexvPbfGXgZmEAgRvvTIQR9P8GFgbmBiCXg4EJJAoAMOgKOgB4nGNgZGBgbvjfwBDDAmQxMLAwMIBpJMAMAEciAm0AAAQAAAAEAAAABAEAAAAAAAAADgBWeJxjYGRgYGBmUAFiEGACYi4gZGD4D+YzAAAMZAFBAAB4nGWPTU7DMBCFX/oHpBKqqGCH5AViASj9EatuWFRq911036ZOmyqJI8et1ANwHo7ACTgC3IA78EgnmzaWx9+8eWNPANzgBx6O3y33kT1cMjtyDRe4F65TfxBukF+Em2jjVbhF/U3YxzOmwm10YXmD17hi9oR3YQ8dfAjXcI1P4Tr1L+EG+Vu4iTv8CrfQ8erCPuZeV7iNRy/2x1YvnF6p5UHFockikzm/gple75KFrdLqnGtbxCZTg6BfSVOdaVvdU+zXQ+ciFVmTqgmrOkmMyq3Z6tAFG+fyUa8XiR6EJuVYY/62xgKOcQWFJQ6MMUIYZIjK6Og7VWb0r7FDwl57Vj3N53RbFNT/c4UBAvTPXFO6stJ5Ok+BPV8bUnV0K27LnpQ0kV7NSRKyQl7WtlRC6gE2ZVeOEXpc0Yk/KGdI/wAJWm7IAAAAeJxjYGKAAC4G7ICZkYmRmZGFgS+xqCi/PCW/PE83Ob+gkqUgJ7GSgQEAYa8HrwAA"
  3633. /***/ }),
  3634. /* 61 */
  3635. /***/ (function(module, exports) {
  3636. module.exports = "data:application/x-font-ttf;base64,AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzI8mUkYAAABfAAAAFZjbWFwaSfRFAAAAeAAAAGGZ2x5ZqBQoO0AAANwAAAArGhlYWQU+6wjAAAA4AAAADZoaGVhB94DhQAAALwAAAAkaG10eAwBAAAAAAHUAAAADGxvY2EADgBWAAADaAAAAAhtYXhwARAAMAAAARgAAAAgbmFtZT5U/n0AAAQcAAACbXBvc3TD5yXjAAAGjAAAAD8AAQAAA4D/gABcBAEAAAAABAAAAQAAAAAAAAAAAAAAAAAAAAMAAQAAAAEAABe5pulfDzz1AAsEAAAAAADY7jQTAAAAANjuNBMAAP+ABAADgAAAAAgAAgAAAAAAAAABAAAAAwAkAAMAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAE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AHIAAwABBAkAAAAqAIUAAwABBAkAAQAQAK8AAwABBAkAAgAOAL8AAwABBAkAAwAQAM0AAwABBAkABAAQAN0AAwABBAkABQAWAO0AAwABBAkABgAQAQMAAwABBAkACgBWARMAAwABBAkACwAmAWkKQ3JlYXRlZCBieSBpY29uZm9udAppY29uZm9udFJlZ3VsYXJpY29uZm9udGljb25mb250VmVyc2lvbiAxLjBpY29uZm9udEdlbmVyYXRlZCBieSBzdmcydHRmIGZyb20gRm9udGVsbG8gcHJvamVjdC5odHRwOi8vZm9udGVsbG8uY29tAAoAQwByAGUAYQB0AGUAZAAgAGIAeQAgAGkAYwBvAG4AZgBvAG4AdAAKAGkAYwBvAG4AZgBvAG4AdABSAGUAZwB1AGwAYQByAGkAYwBvAG4AZgBvAG4AdABpAGMAbwBuAGYAbwBuAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwAGkAYwBvAG4AZgBvAG4AdABHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAQIBAwEEAA5hcnJvd2Rvd24tY29weQRwbGF5AAAA"
  3637. /***/ }),
  3638. /* 62 */
  3639. /***/ (function(module, exports) {
  3640. module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiID4KPCEtLQoyMDEzLTktMzA6IENyZWF0ZWQuCi0tPgo8c3ZnPgo8bWV0YWRhdGE+CkNyZWF0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wOC0yMjguNjkyOTkyLTUxMi01MTItNTEyTTYzMS44ODM3NzYgMzk5Ljg5NzZjMTAuNjE4ODgtNy45NDkzMTIgMTAuNjE4ODgtMjMuODQ2OTEyIDAtMzEuNzk1Mkw0MDUuMjM3NzYgMjE3LjA2NzUyQzM5NC42MTg4OCAyMDkuMTE5MjMyIDM4NCAyMTQuNDE3NDA4IDM4NCAyMjcuNjY1OTJWNTQwLjMzMjAzMmMwIDEzLjI0OTUzNiAxMC42MTk5MDQgMTguNTQ4NzM2IDIxLjIzNzc2IDEwLjYwMDQ0OGwyMjYuNjQ2MDE2LTE1MS4wMzQ4OHoiICBob3Jpei1hZHYteD0iMTAyNSIgLz4KCiAgICAKCgogIDwvZm9udD4KPC9kZWZzPjwvc3ZnPgo="
  3641. /***/ }),
  3642. /* 63 */
  3643. /***/ (function(module, exports, __webpack_require__) {
  3644. "use strict";
  3645. var _index = __webpack_require__(64);
  3646. var _index2 = _interopRequireDefault(_index);
  3647. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3648. if (!window.AliPlayerComponent) {
  3649. window.AliPlayerComponent = {};
  3650. }
  3651. window.AliPlayerComponent.QualityComponent = _index2.default;
  3652. /***/ }),
  3653. /* 64 */
  3654. /***/ (function(module, exports, __webpack_require__) {
  3655. "use strict";
  3656. Object.defineProperty(exports, "__esModule", {
  3657. value: true
  3658. });
  3659. var _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; }; }();
  3660. var _index = __webpack_require__(65);
  3661. var _index2 = _interopRequireDefault(_index);
  3662. var _qualityModal = __webpack_require__(66);
  3663. var _qualityModal2 = _interopRequireDefault(_qualityModal);
  3664. __webpack_require__(67);
  3665. var _utils = __webpack_require__(2);
  3666. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3667. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3668. /**
  3669. * 切换清晰度组件
  3670. */
  3671. var QualityComponent = function () {
  3672. function QualityComponent(getQuality) {
  3673. _classCallCheck(this, QualityComponent);
  3674. this.html = (0, _utils.parseDom)(_index2.default);
  3675. this.modalHtml = (0, _utils.parseDom)(_qualityModal2.default);
  3676. this.hasCreated = false;
  3677. this.definition = '';
  3678. this.getQuality = getQuality;
  3679. }
  3680. _createClass(QualityComponent, [{
  3681. key: 'createEl',
  3682. value: function createEl(el, player) {
  3683. var lang = player._options && player._options.language;
  3684. this.isEn = lang && lang === 'en-us';
  3685. this.html.querySelector('.current-quality').innerText = this.isEn ? 'Resolution' : '清晰度';
  3686. this.modalHtml.querySelector('.switchimg').innerText = this.isEn ? 'Switching to you for' : '正在为您切换到';
  3687. this.modalHtml.querySelector('.wait').innerText = this.isEn ? 'Please wait...' : '请稍后...';
  3688. var eleControlbar = el.querySelector('.prism-controlbar');
  3689. eleControlbar.appendChild(this.html);
  3690. el.appendChild(this.modalHtml);
  3691. }
  3692. }, {
  3693. key: 'setCurrentQuality',
  3694. value: function setCurrentQuality(quality, def) {
  3695. var currentQuality = this.html.querySelector('.current-quality');
  3696. currentQuality.innerText = quality;
  3697. currentQuality.dataset.def = def;
  3698. this.definition = def;
  3699. var qualityListEle = this.html.querySelector('.quality-list');
  3700. var currentEle = qualityListEle.querySelector('.current');
  3701. if (currentEle) {
  3702. currentEle.className = '';
  3703. }
  3704. var li_target = qualityListEle.querySelector('li[data-def="' + def + '"]');
  3705. if (li_target) {
  3706. li_target.className = 'current';
  3707. }
  3708. }
  3709. }, {
  3710. key: 'created',
  3711. value: function created(player) {
  3712. var _this = this;
  3713. this._urls = player._urls;
  3714. var currentQualityEle = this.html.querySelector('.current-quality');
  3715. var qualityListEle = this.html.querySelector('.quality-list');
  3716. var lis_ele = this._urls.map(function (url) {
  3717. return '<li data-def="' + url.definition + '">' + url.desc + '</li>';
  3718. });
  3719. this.html.querySelector('.quality-list').innerHTML = lis_ele.join('');
  3720. console.log(this.definition);
  3721. if (this.hasCreated == false && this.definition) {
  3722. var li_target = qualityListEle.querySelector('li[data-def="' + this.definition + '"]');
  3723. li_target.className = 'current';
  3724. }
  3725. this.hasCreated = true;
  3726. var timeId = null;
  3727. currentQualityEle.onclick = function () {
  3728. var listVisible = qualityListEle.style.display !== 'none';
  3729. if (listVisible) {
  3730. qualityListEle.style.display = 'none';
  3731. } else {
  3732. qualityListEle.style.display = 'block';
  3733. }
  3734. };
  3735. currentQualityEle.onmouseleave = function () {
  3736. if (timeId) clearTimeout(timeId);
  3737. timeId = setTimeout(function () {
  3738. qualityListEle.style.display = 'none';
  3739. }, 150);
  3740. };
  3741. qualityListEle.onmouseenter = function () {
  3742. clearTimeout(timeId);
  3743. };
  3744. qualityListEle.onmouseleave = function () {
  3745. if (timeId) clearTimeout(timeId);
  3746. timeId = setTimeout(function () {
  3747. qualityListEle.style.display = 'none';
  3748. }, 150);
  3749. };
  3750. qualityListEle.onclick = function (_ref) {
  3751. var target = _ref.target;
  3752. var definition = target.dataset.def;
  3753. var desc = target.innerText;
  3754. if (definition && target.className !== 'current') {
  3755. var url = Array.isArray(_this._urls) ? _this._urls.filter(function (url) {
  3756. return url.definition === definition;
  3757. })[0] : _this._urls.find(function (url) {
  3758. return url.definition === definition;
  3759. });
  3760. if (url) {
  3761. (0, _utils.cookieSet)('selectedStreamLevel', url.definition, 365);
  3762. if (player._switchLevel && !player._options.isLive) {
  3763. player._switchLevel(url.Url);
  3764. } else {
  3765. player._loadByUrlInner(url.Url, player.getCurrentTime(), true /*autoPlay*/, true /* isSwitchLevel */);
  3766. }
  3767. _this.setCurrentQuality(url.desc, url.definition);
  3768. _this.modalHtml.style.display = 'block';
  3769. _this.modalHtml.querySelector('span.current-quality-tag').innerText = url.desc;
  3770. }
  3771. }
  3772. //点击切换清晰度时,调用这个方法
  3773. _this.getQuality(definition, desc);
  3774. };
  3775. }
  3776. }, {
  3777. key: 'ready',
  3778. value: function ready(player) {
  3779. this.modalHtml.style.display = 'none';
  3780. // 隐藏设置里面的倍速播放
  3781. var settingEle = document.querySelector('.prism-setting-item.prism-setting-quality');
  3782. if (settingEle) {
  3783. settingEle.classList.add('player-hidden');
  3784. }
  3785. }
  3786. }]);
  3787. return QualityComponent;
  3788. }();
  3789. exports.default = QualityComponent;
  3790. /***/ }),
  3791. /* 65 */
  3792. /***/ (function(module, exports) {
  3793. module.exports = "<div class=\"quality-components\">\n <div class=\"current-quality\" data-ref=\"\"></div>\n <ul class=\"quality-list\">\n </ul>\n</div>";
  3794. /***/ }),
  3795. /* 66 */
  3796. /***/ (function(module, exports) {
  3797. module.exports = "<div class=\"quality-modal\">\n <span class=\"switchimg\"></span> <span class=\"current-quality-tag\"></span> , <span class=\"wait\"></span>\n</div>";
  3798. /***/ }),
  3799. /* 67 */
  3800. /***/ (function(module, exports, __webpack_require__) {
  3801. // style-loader: Adds some css to the DOM by adding a <style> tag
  3802. // load the styles
  3803. var content = __webpack_require__(68);
  3804. if(typeof content === 'string') content = [[module.i, content, '']];
  3805. // add the styles to the DOM
  3806. var update = __webpack_require__(1)(content, {});
  3807. if(content.locals) module.exports = content.locals;
  3808. // Hot Module Replacement
  3809. if(false) {}
  3810. /***/ }),
  3811. /* 68 */
  3812. /***/ (function(module, exports, __webpack_require__) {
  3813. exports = module.exports = __webpack_require__(0)();
  3814. // imports
  3815. // module
  3816. exports.push([module.i, ".player-hidden {\n display: none !important; }\n\n.quality-components {\n float: right;\n color: #fff;\n height: 35px;\n position: relative;\n box-sizing: border-box;\n margin-top: 4px; }\n\n.current-quality {\n display: flex;\n height: 100%;\n align-items: center;\n justify-content: center;\n width: 70px;\n cursor: pointer; }\n\n.quality-list {\n position: absolute;\n bottom: 46px;\n display: none;\n padding: 0;\n margin: 0;\n list-style: none; }\n .quality-list li {\n text-align: center;\n width: 70px;\n line-height: 30px;\n background-color: rgba(0, 0, 0, 0.6);\n cursor: pointer; }\n .quality-list li.current {\n color: #00c1de; }\n .quality-list li + li {\n border-top: 1px solid rgba(78, 78, 78, 0.3); }\n .quality-list li:hover {\n background-color: rgba(0, 0, 0, 0.5); }\n\n.quality-modal {\n position: absolute;\n bottom: 20%;\n left: 5%;\n background-color: rgba(0, 0, 0, 0.6);\n border-radius: 5px;\n color: #fff;\n padding: 10px 15px;\n font-size: 14px;\n display: none; }\n .quality-modal span.current-quality-tag {\n color: #00c1de; }\n\n@media (max-width: 768px) {\n .current-quality {\n width: 40px; }\n .quality-list li {\n width: 45px; } }\n", ""]);
  3817. // exports
  3818. /***/ }),
  3819. /* 69 */
  3820. /***/ (function(module, exports, __webpack_require__) {
  3821. "use strict";
  3822. var _index = __webpack_require__(70);
  3823. var _index2 = _interopRequireDefault(_index);
  3824. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3825. if (!window.AliPlayerComponent) {
  3826. window.AliPlayerComponent = {};
  3827. }
  3828. window.AliPlayerComponent.RateComponent = _index2.default;
  3829. /***/ }),
  3830. /* 70 */
  3831. /***/ (function(module, exports, __webpack_require__) {
  3832. "use strict";
  3833. Object.defineProperty(exports, "__esModule", {
  3834. value: true
  3835. });
  3836. var _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; }; }();
  3837. var _index = __webpack_require__(71);
  3838. var _index2 = _interopRequireDefault(_index);
  3839. __webpack_require__(72);
  3840. var _utils = __webpack_require__(2);
  3841. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3842. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3843. /**
  3844. * 倍速播放组件
  3845. */
  3846. var RateComponent = function () {
  3847. /**
  3848. * @constructor 倍速播放组件构造函数
  3849. */
  3850. function RateComponent() {
  3851. _classCallCheck(this, RateComponent);
  3852. this.html = (0, _utils.parseDom)(_index2.default);
  3853. }
  3854. _createClass(RateComponent, [{
  3855. key: 'createEl',
  3856. value: function createEl(el) {
  3857. var eleControlbar = el.querySelector('.prism-controlbar');
  3858. eleControlbar.appendChild(this.html);
  3859. }
  3860. }, {
  3861. key: 'ready',
  3862. value: function ready(player, e) {
  3863. var currentRateEle = this.html.querySelector('.current-rate');
  3864. var rateListEle = this.html.querySelector('.rate-list');
  3865. var timeId = null;
  3866. // 隐藏设置里面的倍速播放
  3867. var settingRate = document.querySelector('.prism-setting-item.prism-setting-speed');
  3868. if (settingRate) {
  3869. settingRate.classList.add('player-hidden');
  3870. }
  3871. currentRateEle.onclick = function () {
  3872. rateListEle.style.display = 'block';
  3873. };
  3874. currentRateEle.onmouseleave = function () {
  3875. timeId = setTimeout(function () {
  3876. rateListEle.style.display = 'none';
  3877. }, 100);
  3878. };
  3879. rateListEle.onmouseenter = function () {
  3880. clearTimeout(timeId);
  3881. };
  3882. rateListEle.onmouseleave = function () {
  3883. rateListEle.style.display = 'none';
  3884. };
  3885. rateListEle.onclick = function (_ref) {
  3886. var target = _ref.target;
  3887. var rate = target.dataset.rate;
  3888. if (rate) {
  3889. player.setSpeed(rate);
  3890. if (target.className !== 'current') {
  3891. var currentEle = rateListEle.querySelector('.current');
  3892. if (currentEle) {
  3893. currentEle.className = '';
  3894. }
  3895. target.className = 'current';
  3896. }
  3897. rateListEle.style.display = 'none';
  3898. currentRateEle.innerText = rate + 'x';
  3899. }
  3900. };
  3901. }
  3902. }]);
  3903. return RateComponent;
  3904. }();
  3905. exports.default = RateComponent;
  3906. /***/ }),
  3907. /* 71 */
  3908. /***/ (function(module, exports) {
  3909. module.exports = "<div class=\"rate-components\">\n <div class=\"current-rate\">1.0x</div>\n <ul class=\"rate-list\">\n <li data-rate=\"2.0\">2.0x</li>\n <li data-rate=\"1.5\">1.5x</li>\n <li data-rate=\"1.25\">1.25x</li>\n <li data-rate=\"1.0\" class=\"current\">1.0x</li>\n <li data-rate=\"0.5\">0.5x</li>\n </ul>\n</div>";
  3910. /***/ }),
  3911. /* 72 */
  3912. /***/ (function(module, exports, __webpack_require__) {
  3913. // style-loader: Adds some css to the DOM by adding a <style> tag
  3914. // load the styles
  3915. var content = __webpack_require__(73);
  3916. if(typeof content === 'string') content = [[module.i, content, '']];
  3917. // add the styles to the DOM
  3918. var update = __webpack_require__(1)(content, {});
  3919. if(content.locals) module.exports = content.locals;
  3920. // Hot Module Replacement
  3921. if(false) {}
  3922. /***/ }),
  3923. /* 73 */
  3924. /***/ (function(module, exports, __webpack_require__) {
  3925. exports = module.exports = __webpack_require__(0)();
  3926. // imports
  3927. // module
  3928. exports.push([module.i, ".player-hidden {\n display: none !important; }\n\n.rate-components {\n float: right;\n color: #fff;\n height: 35px;\n position: relative;\n box-sizing: border-box;\n margin-top: 5px; }\n\n.current-rate {\n display: flex;\n height: 100%;\n align-items: center;\n justify-content: center;\n width: 70px;\n cursor: pointer; }\n\n.rate-list {\n position: absolute;\n bottom: 46px;\n display: none;\n padding: 0;\n margin: 0;\n list-style: none; }\n .rate-list li {\n text-align: center;\n width: 70px;\n line-height: 30px;\n background-color: rgba(0, 0, 0, 0.6);\n cursor: pointer; }\n .rate-list li.current {\n color: #00c1de; }\n .rate-list li + li {\n border-top: 1px solid rgba(78, 78, 78, 0.3); }\n .rate-list li:hover {\n background-color: rgba(0, 0, 0, 0.5); }\n\n@media (max-width: 768px) {\n .current-rate {\n width: 40px; }\n .rate-list li {\n width: 43px; } }\n", ""]);
  3929. // exports
  3930. /***/ }),
  3931. /* 74 */
  3932. /***/ (function(module, exports, __webpack_require__) {
  3933. "use strict";
  3934. var _index = __webpack_require__(75);
  3935. var _index2 = _interopRequireDefault(_index);
  3936. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3937. if (!window.AliPlayerComponent) {
  3938. window.AliPlayerComponent = {};
  3939. }
  3940. window.AliPlayerComponent.RotateMirrorComponent = _index2.default;
  3941. /***/ }),
  3942. /* 75 */
  3943. /***/ (function(module, exports, __webpack_require__) {
  3944. "use strict";
  3945. Object.defineProperty(exports, "__esModule", {
  3946. value: true
  3947. });
  3948. var _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; }; }();
  3949. var _index = __webpack_require__(76);
  3950. var _index2 = _interopRequireDefault(_index);
  3951. __webpack_require__(77);
  3952. var _utils = __webpack_require__(2);
  3953. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  3954. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3955. /**
  3956. * 旋转镜像组件
  3957. */
  3958. var RotateMirrorComponent = function () {
  3959. /**
  3960. * @constructor 旋转镜像组件构造函数
  3961. */
  3962. function RotateMirrorComponent() {
  3963. _classCallCheck(this, RotateMirrorComponent);
  3964. this.html = (0, _utils.parseDom)(_index2.default);
  3965. }
  3966. _createClass(RotateMirrorComponent, [{
  3967. key: 'createEl',
  3968. value: function createEl(el, player) {
  3969. var lang = player._options && player._options.language;
  3970. this.isEn = lang && lang === 'en-us';
  3971. this.html.querySelector('.player-tooltip.counterclockwise').innerText = this.isEn ? 'Rotate 45 degrees counterclockwise' : '逆时针旋转45度';
  3972. this.html.querySelector('.mirror-item[data-id="counterclockwise"]').innerText = this.isEn ? 'Rotate left 45 ̊' : '左旋转45˚';
  3973. this.html.querySelector('.player-tooltip.clockwise').innerText = this.isEn ? 'Rotate 45 degrees clockwise' : '顺时针旋转45度';
  3974. this.html.querySelector('.mirror-item[data-id="clockwise"]').innerText = this.isEn ? 'Rotate right 45 ̊' : '右旋转45˚';
  3975. this.html.querySelector('.player-tooltip.switch').innerText = this.isEn ? 'Mirror' : '镜像';
  3976. this.html.querySelector('.mirror-item[data-id=vertical]').innerText = this.isEn ? 'Vertical mirroring' : '垂直镜像';
  3977. this.html.querySelector('.mirror-item[data-id=horizon]').innerText = this.isEn ? 'Horizontal mirroring' : '水平镜像';
  3978. var eleControlbar = el.querySelector('.prism-controlbar');
  3979. eleControlbar.appendChild(this.html);
  3980. }
  3981. }, {
  3982. key: 'ready',
  3983. value: function ready(player, e) {
  3984. this.html.querySelector('.icon-player-rotate-left').onclick = function () {
  3985. var rotate = player.getRotate();
  3986. player.setRotate(rotate - 45);
  3987. };
  3988. this.html.querySelector('.icon-player-rotate-right').onclick = function () {
  3989. var rotate = player.getRotate();
  3990. player.setRotate(rotate + 45);
  3991. };
  3992. var eleMirror = this.html.querySelector('.mirror-option');
  3993. this.html.querySelector('.icon-player-switch').onclick = function () {
  3994. var displayStyle = eleMirror.style.display;
  3995. eleMirror.style.display = displayStyle === 'none' ? 'block' : 'none';
  3996. };
  3997. eleMirror.onmouseleave = function () {
  3998. this.style.display = 'none';
  3999. };
  4000. eleMirror.onclick = function (e) {
  4001. var target = e.target;
  4002. if (target.dataset.id === 'counterclockwise') {
  4003. var rotate = player.getRotate();
  4004. player.setRotate(rotate - 45);
  4005. return;
  4006. }
  4007. if (target.dataset.id === 'clockwise') {
  4008. var _rotate = player.getRotate();
  4009. player.setRotate(_rotate + 45);
  4010. return;
  4011. }
  4012. if (!target.className.match('active')) {
  4013. var siblingEle = target.dataset.id === 'horizon' ? target.previousElementSibling : target.nextElementSibling;
  4014. if (siblingEle.className.match('active')) {
  4015. siblingEle.className = 'mirror-item';
  4016. player.cancelImage();
  4017. }
  4018. var param = target.getAttribute('data-id');
  4019. player.setImage(param);
  4020. target.className = 'mirror-item active';
  4021. } else {
  4022. player.cancelImage();
  4023. target.className = 'mirror-item';
  4024. }
  4025. };
  4026. }
  4027. }]);
  4028. return RotateMirrorComponent;
  4029. }();
  4030. exports.default = RotateMirrorComponent;
  4031. /***/ }),
  4032. /* 76 */
  4033. /***/ (function(module, exports) {
  4034. module.exports = "<div class=\"aliplayer-rotate-mirror\">\n <i class=\"iconfont icon-player-rotate-left\"></i>\n <div class=\"player-tooltip counterclockwise\"></div>\n <i class=\"iconfont icon-player-rotate-right\"></i>\n <div class=\"player-tooltip clockwise\"></div>\n <i class=\"iconfont icon-player-switch\"></i>\n <div class=\"player-tooltip switch\"></div>\n <div class=\"mirror-option\" style=\"display: none;\">\n <div class=\"mirror-item\" data-id=\"vertical\"></div>\n <div class=\"mirror-item\" data-id=\"horizon\"></div>\n <div class=\"mirror-item\" data-id=\"counterclockwise\"></div>\n <div class=\"mirror-item\" data-id=\"clockwise\"></div>\n </div>\n</div>";
  4035. /***/ }),
  4036. /* 77 */
  4037. /***/ (function(module, exports, __webpack_require__) {
  4038. // style-loader: Adds some css to the DOM by adding a <style> tag
  4039. // load the styles
  4040. var content = __webpack_require__(78);
  4041. if(typeof content === 'string') content = [[module.i, content, '']];
  4042. // add the styles to the DOM
  4043. var update = __webpack_require__(1)(content, {});
  4044. if(content.locals) module.exports = content.locals;
  4045. // Hot Module Replacement
  4046. if(false) {}
  4047. /***/ }),
  4048. /* 78 */
  4049. /***/ (function(module, exports, __webpack_require__) {
  4050. exports = module.exports = __webpack_require__(0)();
  4051. // imports
  4052. // module
  4053. exports.push([module.i, ".aliplayer-rotate-mirror {\n float: right;\n color: #fff;\n display: flex;\n align-items: center;\n height: 35px;\n position: relative;\n margin-top: 5px; }\n .aliplayer-rotate-mirror i {\n color: #fff;\n display: inline-block;\n font-size: 22px;\n display: block;\n margin-top: 7px;\n cursor: pointer;\n margin-right: 10px; }\n .aliplayer-rotate-mirror i.icon-player-switch {\n font-size: 24px;\n font-weight: bold; }\n @media (min-width: 768px) {\n .aliplayer-rotate-mirror i:hover + .player-tooltip {\n display: block; } }\n .aliplayer-rotate-mirror .mirror-option {\n position: absolute;\n background-color: #3c3c3c;\n top: 0;\n transform: translateY(-103%);\n right: -20px; }\n .aliplayer-rotate-mirror .mirror-option .mirror-item {\n font-size: 14px;\n color: #ebecec;\n line-height: 30px;\n white-space: nowrap;\n padding: 0 15px;\n cursor: pointer;\n user-select: none; }\n .aliplayer-rotate-mirror .mirror-option .mirror-item[data-id=\"counterclockwise\"] {\n display: none; }\n .aliplayer-rotate-mirror .mirror-option .mirror-item[data-id=\"clockwise\"] {\n display: none; }\n .aliplayer-rotate-mirror .mirror-option .mirror-item.active {\n background-color: rgba(216, 216, 216, 0.1);\n color: #00c1de; }\n .aliplayer-rotate-mirror .player-tooltip.counterclockwise {\n left: -35px; }\n .aliplayer-rotate-mirror .player-tooltip.clockwise {\n left: -5px; }\n .aliplayer-rotate-mirror .player-tooltip.switch {\n right: 7px; }\n @media (max-width: 768px) {\n .aliplayer-rotate-mirror .mirror-option .mirror-item[data-id=\"counterclockwise\"] {\n display: block; }\n .aliplayer-rotate-mirror .mirror-option .mirror-item[data-id=\"clockwise\"] {\n display: block; } }\n", ""]);
  4054. // exports
  4055. /***/ }),
  4056. /* 79 */
  4057. /***/ (function(module, exports, __webpack_require__) {
  4058. "use strict";
  4059. var _index = __webpack_require__(80);
  4060. var _index2 = _interopRequireDefault(_index);
  4061. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  4062. if (!window.AliPlayerComponent) {
  4063. window.AliPlayerComponent = {};
  4064. }
  4065. window.AliPlayerComponent.StartADComponent = _index2.default;
  4066. /***/ }),
  4067. /* 80 */
  4068. /***/ (function(module, exports, __webpack_require__) {
  4069. "use strict";
  4070. Object.defineProperty(exports, "__esModule", {
  4071. value: true
  4072. });
  4073. var _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; }; }();
  4074. var _index = __webpack_require__(81);
  4075. var _index2 = _interopRequireDefault(_index);
  4076. __webpack_require__(82);
  4077. var _utils = __webpack_require__(2);
  4078. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  4079. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  4080. /**
  4081. * 开始图片广告组件
  4082. */
  4083. var StartADComponent = function () {
  4084. /**
  4085. * @constructor 开始图片广告组件构造函数
  4086. * @param {String coverUrl 广告图片地址}
  4087. * @param {String adUrl 广告链接}
  4088. * @param {Number adDuration 广告时长, 单位为秒}
  4089. */
  4090. function StartADComponent(coverUrl, adUrl, adDuration) {
  4091. _classCallCheck(this, StartADComponent);
  4092. this.coverUrl = coverUrl;
  4093. this.adUrl = adUrl;
  4094. this.adDuration = adDuration;
  4095. if (adDuration <= 0) {
  4096. throw Error('adDuration must must be greater than 0');
  4097. }
  4098. this.html = (0, _utils.parseDom)(_index2.default);
  4099. }
  4100. _createClass(StartADComponent, [{
  4101. key: 'createEl',
  4102. value: function createEl(el, player) {
  4103. var _this = this;
  4104. var lang = player._options && player._options.language;
  4105. this.isEn = lang && lang === 'en-us';
  4106. this.html.querySelector('.ad-name').innerText = this.isEn ? 'Ad' : '广告';
  4107. this.html.querySelector('.second').innerText = this.isEn ? 's' : '秒';
  4108. var adUrlElement = this.html.querySelector('.ad-content');
  4109. adUrlElement.setAttribute('href', this.adUrl);
  4110. var adImgElement = adUrlElement.querySelector('img');
  4111. adImgElement.setAttribute('src', this.coverUrl);
  4112. var durationElement = this.html.querySelector('.tip i');
  4113. durationElement.innerText = this.adDuration;
  4114. el.appendChild(this.html);
  4115. if (this.html !== null) {
  4116. if (player.getStatus() !== 'init') {
  4117. player.pause();
  4118. }
  4119. var duration = this.adDuration;
  4120. var _durationElement = this.html.querySelector('.tip i');
  4121. var durationInterval = setInterval(function () {
  4122. duration = duration - 1;
  4123. _durationElement.innerText = duration;
  4124. if (duration === 0) {
  4125. clearInterval(durationInterval);
  4126. _this.removeComponent();
  4127. // 如果试看组件和记忆播放组件一起用了, 那么不让播放器播放
  4128. var playerOptions = player.getOptions();
  4129. var memoryVideo = playerOptions.vid || playerOptions.source.replace(/\?.*$/, '');
  4130. var memoryTime = localStorage.getItem(memoryVideo) || 0;
  4131. if (memoryTime) {
  4132. memoryTime = parseInt(memoryTime);
  4133. }
  4134. var components = player.getOptions() && player.getOptions().components;
  4135. var memoryComponent = Array.isArray(components) ? components.filter(function (item) {
  4136. return item.type.name === 'MemoryPlayComponent';
  4137. })[0] : components.find(function (item) {
  4138. return item.type.name === 'MemoryPlayComponent';
  4139. });
  4140. var memoryAutoPlay = memoryComponent && memoryComponent.args[0];
  4141. if (!memoryAutoPlay || player.getCurrentTime() >= memoryTime) {
  4142. player.play();
  4143. }
  4144. }
  4145. }, 1000);
  4146. }
  4147. }
  4148. }, {
  4149. key: 'removeComponent',
  4150. value: function removeComponent() {
  4151. this.html.parentNode.removeChild(this.html);
  4152. this.html = null;
  4153. }
  4154. }, {
  4155. key: 'ready',
  4156. value: function ready(player) {
  4157. if (this.html !== null) {
  4158. player.pause();
  4159. }
  4160. }
  4161. }]);
  4162. return StartADComponent;
  4163. }();
  4164. exports.default = StartADComponent;
  4165. /***/ }),
  4166. /* 81 */
  4167. /***/ (function(module, exports) {
  4168. module.exports = "<div class=\"start-ad\">\n <span class=\"tip\"><span class=\"ad-name\">广告</span>: <i></i><span class=\"second\">秒</span></span>\n <a class=\"ad-content\" target=\"_blank\">\n <img />\n </a>\n</div>";
  4169. /***/ }),
  4170. /* 82 */
  4171. /***/ (function(module, exports, __webpack_require__) {
  4172. // style-loader: Adds some css to the DOM by adding a <style> tag
  4173. // load the styles
  4174. var content = __webpack_require__(83);
  4175. if(typeof content === 'string') content = [[module.i, content, '']];
  4176. // add the styles to the DOM
  4177. var update = __webpack_require__(1)(content, {});
  4178. if(content.locals) module.exports = content.locals;
  4179. // Hot Module Replacement
  4180. if(false) {}
  4181. /***/ }),
  4182. /* 83 */
  4183. /***/ (function(module, exports, __webpack_require__) {
  4184. exports = module.exports = __webpack_require__(0)();
  4185. // imports
  4186. // module
  4187. exports.push([module.i, ".start-ad {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n background-color: #000;\n position: absolute;\n z-index: 9999; }\n .start-ad .tip {\n position: absolute;\n right: 5px;\n top: 5px;\n background-color: #333;\n color: #fff;\n font-size: 14px;\n text-align: center;\n padding: 3px 7px; }\n .start-ad .tip i {\n font-style: normal; }\n .start-ad a {\n width: 100%;\n height: 100%;\n display: inline-block;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center; }\n .start-ad a img {\n max-width: 100%;\n max-height: 100%; }\n", ""]);
  4188. // exports
  4189. /***/ }),
  4190. /* 84 */
  4191. /***/ (function(module, exports, __webpack_require__) {
  4192. "use strict";
  4193. var _index = __webpack_require__(85);
  4194. var _index2 = _interopRequireDefault(_index);
  4195. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  4196. if (!window.AliPlayerComponent) {
  4197. window.AliPlayerComponent = {};
  4198. }
  4199. window.AliPlayerComponent.TrackComponent = _index2.default;
  4200. /***/ }),
  4201. /* 85 */
  4202. /***/ (function(module, exports, __webpack_require__) {
  4203. "use strict";
  4204. Object.defineProperty(exports, "__esModule", {
  4205. value: true
  4206. });
  4207. var _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; }; }();
  4208. var _index = __webpack_require__(86);
  4209. var _index2 = _interopRequireDefault(_index);
  4210. var _trackModal = __webpack_require__(87);
  4211. var _trackModal2 = _interopRequireDefault(_trackModal);
  4212. __webpack_require__(88);
  4213. var _utils = __webpack_require__(2);
  4214. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  4215. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  4216. /**
  4217. * 音轨组件
  4218. */
  4219. var TrackComponent = function () {
  4220. /**
  4221. * @constructor 音轨组件构造函数
  4222. */
  4223. function TrackComponent() {
  4224. _classCallCheck(this, TrackComponent);
  4225. this.trackList = null;
  4226. this.html = (0, _utils.parseDom)(_index2.default);
  4227. this.modalHtml = (0, _utils.parseDom)(_trackModal2.default);
  4228. this.hasCreated = false;
  4229. this.definition = '';
  4230. }
  4231. _createClass(TrackComponent, [{
  4232. key: 'createEl',
  4233. value: function createEl(el, player) {
  4234. var _this = this;
  4235. var lang = player._options && player._options.language;
  4236. this.isEn = lang && lang === 'en-us';
  4237. this.modalHtml.querySelector('.switchimg').innerText = this.isEn ? 'Track to you for' : '音轨切换到';
  4238. this.modalHtml.querySelector('.switchimg').style.display = 'none';
  4239. var eleControlbar = el.querySelector('.prism-controlbar');
  4240. eleControlbar.appendChild(this.html);
  4241. el.appendChild(this.modalHtml);
  4242. player.on('audioTrackReady', function (_ref) {
  4243. var paramData = _ref.paramData;
  4244. _this.trackList = paramData;
  4245. var lis_ele = paramData.map(function (v) {
  4246. return '<li data-def="' + v.value + '">' + v.text + '</li>';
  4247. });
  4248. _this.html.querySelector('.track-list').innerHTML = '<li style="background:rgba(88,87,86,.5);color:#fff">\u97F3\u8F68</li>' + lis_ele.join('');
  4249. });
  4250. var currentTrackEle = this.html.querySelector('.current-track');
  4251. var trackListEle = this.html.querySelector('.track-list');
  4252. if (this.hasCreated == false && this.definition) {
  4253. var li_target = trackListEle.querySelector('li[data-def="' + this.definition + '"]');
  4254. li_target.className = 'current';
  4255. }
  4256. this.hasCreated = true;
  4257. var timeId = null;
  4258. currentTrackEle.onclick = function () {
  4259. trackListEle.style.display = 'block';
  4260. };
  4261. currentTrackEle.onmouseleave = function () {
  4262. timeId = setTimeout(function () {
  4263. trackListEle.style.display = 'none';
  4264. }, 100);
  4265. };
  4266. trackListEle.onmouseenter = function () {
  4267. clearTimeout(timeId);
  4268. };
  4269. trackListEle.onmouseleave = function () {
  4270. trackListEle.style.display = 'none';
  4271. _this.modalHtml.style.display = 'none';
  4272. };
  4273. trackListEle.onclick = function (_ref2) {
  4274. var target = _ref2.target;
  4275. var definition = target.dataset.def;
  4276. if (definition) {
  4277. if (target.className !== 'current') {
  4278. var track = Array.isArray(_this.trackList) ? _this.trackList.filter(function (v) {
  4279. return v.value.toString() === definition;
  4280. })[0] : _this.trackList.find(function (v) {
  4281. return v.value.toString() === definition;
  4282. });
  4283. player._audioTrackService.switch(track.value);
  4284. _this.setCurrentTrack(track.text, track.value);
  4285. _this.modalHtml.style.display = 'block';
  4286. _this.modalHtml.querySelector('.switchimg').style.display = 'block';
  4287. _this.modalHtml.querySelector('span.current-track-tag').innerText = track.text;
  4288. }
  4289. }
  4290. };
  4291. }
  4292. }, {
  4293. key: 'setCurrentTrack',
  4294. value: function setCurrentTrack(track, def) {
  4295. var currentTrack = this.html.querySelector('.current-track');
  4296. currentTrack.innerText = track;
  4297. currentTrack.dataset.def = def;
  4298. this.definition = def;
  4299. var trackListEle = this.html.querySelector('.track-list');
  4300. var currentEle = trackListEle.querySelector('.current');
  4301. if (currentEle) {
  4302. currentEle.className = '';
  4303. }
  4304. // let li_target = trackListEle.querySelector(`li[data-def="${def}"]`)
  4305. var lis = trackListEle.querySelectorAll('li');
  4306. lis.forEach(function (element) {
  4307. var text = element.innerText;
  4308. if (text === track) {
  4309. element.className = 'current';
  4310. }
  4311. console.log(text);
  4312. });
  4313. if (lis) {
  4314. lis.className = 'current';
  4315. }
  4316. }
  4317. }, {
  4318. key: 'created',
  4319. value: function created(player) {}
  4320. }, {
  4321. key: 'ready',
  4322. value: function ready(player) {
  4323. this.modalHtml.style.display = 'none';
  4324. // 隐藏设置里面的音轨
  4325. var settingEle = document.querySelector('.prism-setting-item.prism-setting-audio');
  4326. if (settingEle) {
  4327. settingEle.classList.add('player-hidden');
  4328. }
  4329. }
  4330. }]);
  4331. return TrackComponent;
  4332. }();
  4333. exports.default = TrackComponent;
  4334. /***/ }),
  4335. /* 86 */
  4336. /***/ (function(module, exports) {
  4337. module.exports = "<div class=\"track-components\">\n <div class=\"current-track\"></div>\n <ul class=\"track-list\">\n \n </ul>\n</div>";
  4338. /***/ }),
  4339. /* 87 */
  4340. /***/ (function(module, exports) {
  4341. module.exports = "<div class=\"track-modal prism-info-display prism-info-left-bottom\">\n <span class=\"switchimg\"></span> <span class=\"current-track-tag\"></span>\n</div>";
  4342. /***/ }),
  4343. /* 88 */
  4344. /***/ (function(module, exports, __webpack_require__) {
  4345. // style-loader: Adds some css to the DOM by adding a <style> tag
  4346. // load the styles
  4347. var content = __webpack_require__(89);
  4348. if(typeof content === 'string') content = [[module.i, content, '']];
  4349. // add the styles to the DOM
  4350. var update = __webpack_require__(1)(content, {});
  4351. if(content.locals) module.exports = content.locals;
  4352. // Hot Module Replacement
  4353. if(false) {}
  4354. /***/ }),
  4355. /* 89 */
  4356. /***/ (function(module, exports, __webpack_require__) {
  4357. exports = module.exports = __webpack_require__(0)();
  4358. // imports
  4359. // module
  4360. exports.push([module.i, ".player-hidden {\n display: none !important; }\n\n.track-components {\n float: right;\n color: #fff;\n height: 35px;\n position: relative;\n box-sizing: border-box;\n margin-top: 5px; }\n\n.current-track {\n display: flex;\n height: 100%;\n align-items: center;\n justify-content: center;\n width: 100px;\n cursor: pointer; }\n\n.track-list {\n position: absolute;\n bottom: 46px;\n display: none;\n padding: 0;\n margin: 0;\n list-style: none;\n height: auto;\n width: 100px;\n overflow-y: scroll; }\n .track-list li {\n text-align: center;\n width: 100px;\n line-height: 30px;\n background-color: rgba(0, 0, 0, 0.6);\n cursor: pointer; }\n .track-list li.current {\n color: #00c1de; }\n .track-list li + li {\n border-top: 1px solid rgba(78, 78, 78, 0.3); }\n .track-list li:hover {\n background-color: rgba(0, 0, 0, 0.5); }\n\n@media (max-width: 768px) {\n .current-track {\n width: 40px; }\n .track-list li {\n width: 43px; } }\n\n.prism-player .prism-info-display .switchimg {\n color: #fff; }\n", ""]);
  4361. // exports
  4362. /***/ }),
  4363. /* 90 */
  4364. /***/ (function(module, exports, __webpack_require__) {
  4365. "use strict";
  4366. var _index = __webpack_require__(91);
  4367. var _index2 = _interopRequireDefault(_index);
  4368. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  4369. if (!window.AliPlayerComponent) {
  4370. window.AliPlayerComponent = {};
  4371. }
  4372. window.AliPlayerComponent.VideoADComponent = _index2.default;
  4373. /***/ }),
  4374. /* 91 */
  4375. /***/ (function(module, exports, __webpack_require__) {
  4376. "use strict";
  4377. Object.defineProperty(exports, "__esModule", {
  4378. value: true
  4379. });
  4380. var _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; }; }();
  4381. var _index = __webpack_require__(92);
  4382. var _index2 = _interopRequireDefault(_index);
  4383. __webpack_require__(93);
  4384. var _utils = __webpack_require__(2);
  4385. var _mbIndex = __webpack_require__(95);
  4386. var _mbIndex2 = _interopRequireDefault(_mbIndex);
  4387. var _currentDevice = __webpack_require__(3);
  4388. var _currentDevice2 = _interopRequireDefault(_currentDevice);
  4389. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  4390. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  4391. /*
  4392. * PC 视频广告组件
  4393. */
  4394. var VideoAdComponent = function () {
  4395. /**
  4396. * @constructor PC 视频广告的构造函数
  4397. * @param adVideoSource {@String 广告视频的视频地址 必须参数}
  4398. * @param adLink {@String 广告视频的链接地址 必须参数}
  4399. * @param adCloseFunction {@Function 关闭广告的点击事件处理函数, 可选参数, 不传则默认关闭广告视频}
  4400. * @param closeText {@String 关闭广告的文字内容, 可选参数, 不传则默认为 '关闭广告'}
  4401. */
  4402. function VideoAdComponent(adVideoSource, adLink, adCloseFunction) {
  4403. var closeText = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '关闭广告';
  4404. _classCallCheck(this, VideoAdComponent);
  4405. this.adVideoSource = adVideoSource;
  4406. this.adLink = adLink;
  4407. this.html = (0, _utils.parseDom)(_index2.default);
  4408. this.adInterval = null;
  4409. this.adCloseFunction = adCloseFunction;
  4410. this.html.querySelector('.video-ad-close-text').innerText = closeText;
  4411. this.adDuration = null; // 视频广告的时长, 用于倒计时,
  4412. this.player = null;
  4413. }
  4414. _createClass(VideoAdComponent, [{
  4415. key: 'createEl',
  4416. value: function createEl(el, player) {
  4417. var _this = this;
  4418. this.player = player;
  4419. var lang = player._options && player._options.language;
  4420. this.isEn = lang && lang === 'en-us';
  4421. this.html.querySelector('.video-ad-detail').innerText = this.isEn ? 'For more information' : '查看广告详情';
  4422. this.html.querySelector('.limit').innerText = this.isEn ? 'Your browser limits autoplay' : '您的浏览器限制';
  4423. this.html.querySelector('.manual').innerText = this.isEn ? 'Please Click' : '自动播放请点击';
  4424. // 给广告视频添加 source
  4425. var videoAd_ele = this.html.querySelector('#video-ad-content');
  4426. videoAd_ele.setAttribute('src', this.adVideoSource);
  4427. // 获取广告视频的时长, 并赋值到 this.duration 中
  4428. var self = this;
  4429. function getVideoAdTime() {
  4430. videoAd_ele.removeEventListener('canplay', getVideoAdTime);
  4431. //广告起播loading
  4432. document.getElementById('loadflag').style.display = 'none';
  4433. self.adDuration = Math.ceil(videoAd_ele.duration);
  4434. var adDuration_ele = self.html.querySelector('#video-ad-duration');
  4435. adDuration_ele.innerText = self.adDuration;
  4436. videoAd_ele.play().then(function () {
  4437. self.setAdInterval();
  4438. }).catch(function (err) {
  4439. self.html.querySelector('.autoplay-video-ad').style.display = 'block';
  4440. });
  4441. }
  4442. this.html.querySelector('.icon-player-play').onclick = function () {
  4443. _this.playVideoAd();
  4444. _this.html.querySelector('.autoplay-video-ad').style.display = 'none';
  4445. };
  4446. videoAd_ele.addEventListener('canplay', getVideoAdTime);
  4447. // 查看详情 整个广告链接添加 href
  4448. var videoLink = this.html.querySelector('.video-ad-link');
  4449. var videoDetail = this.html.querySelector('.video-ad-detail');
  4450. videoLink.setAttribute('href', this.adLink);
  4451. videoDetail.setAttribute('href', this.adLink);
  4452. el.appendChild(this.html);
  4453. // handle close
  4454. this.html.querySelector('.video-ad-close label').onclick = function () {
  4455. if (typeof _this.adCloseFunction === 'function') {
  4456. _this.adCloseFunction(_this);
  4457. } else {
  4458. _this.closeVideoAd();
  4459. }
  4460. };
  4461. }
  4462. }, {
  4463. key: 'ready',
  4464. value: function ready(player, e) {
  4465. if (this.html !== null) {
  4466. player.pause();
  4467. this.player = player;
  4468. }
  4469. }
  4470. // 暂停视频广告
  4471. }, {
  4472. key: 'pauseVideoAd',
  4473. value: function pauseVideoAd() {
  4474. this.clearAdInterval();
  4475. this.html.querySelector('#video-ad-content').pause();
  4476. }
  4477. // 播放视频广告
  4478. }, {
  4479. key: 'playVideoAd',
  4480. value: function playVideoAd() {
  4481. this.setAdInterval();
  4482. this.html.querySelector('#video-ad-content').play();
  4483. }
  4484. // 清除视频广告倒计时
  4485. }, {
  4486. key: 'clearAdInterval',
  4487. value: function clearAdInterval() {
  4488. this.adInterval !== null && clearInterval(this.adInterval);
  4489. this.adInterval = null;
  4490. }
  4491. // 视频广告倒计时
  4492. }, {
  4493. key: 'setAdInterval',
  4494. value: function setAdInterval() {
  4495. var _this2 = this;
  4496. var adDuration_ele = this.html.querySelector('#video-ad-duration');
  4497. this.adInterval = setInterval(function () {
  4498. _this2.adDuration -= 1;
  4499. if (_this2.adDuration <= 0) {
  4500. _this2.closeVideoAd();
  4501. //广告播放完了之后自动播放视频
  4502. document.getElementById(_this2.player.id()).getElementsByTagName('video')[0].play();
  4503. } else {
  4504. adDuration_ele.innerText = _this2.adDuration;
  4505. }
  4506. }, 1000);
  4507. }
  4508. // 关闭视频广告
  4509. }, {
  4510. key: 'closeVideoAd',
  4511. value: function closeVideoAd() {
  4512. this.clearAdInterval();
  4513. this.html.parentNode.removeChild(this.html);
  4514. this.html = null;
  4515. if (this.player && this.player.getOptions().autoplay) {
  4516. this.player.play();
  4517. }
  4518. }
  4519. }]);
  4520. return VideoAdComponent;
  4521. }();
  4522. /**
  4523. * 移动端视频广告组件
  4524. */
  4525. var MbVideoAdComponent = function () {
  4526. /**
  4527. * @constructor 移动端视频广告组件
  4528. * @param {String adVideoSource 视频广告播放地址}
  4529. * @param {String adLink 广告链接}
  4530. * @param {Function adCloseFunction 关闭广告按钮点击出发的函数}
  4531. * @param {String closeText 可选参数 关闭按钮中的文字, 默认为 '关闭广告'}
  4532. */
  4533. function MbVideoAdComponent(adVideoSource, adLink, adCloseFunction) {
  4534. var closeText = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '关闭广告';
  4535. _classCallCheck(this, MbVideoAdComponent);
  4536. this.adVideoSource = adVideoSource;
  4537. this.adLink = adLink;
  4538. this.html = (0, _utils.parseDom)(_mbIndex2.default);
  4539. this.adInterval = null;
  4540. this.adCloseFunction = adCloseFunction;
  4541. this.html.querySelector('.video-ad-close-text').innerText = closeText;
  4542. this.html.querySelector('.video-ad-link').setAttribute('href', this.adLink);
  4543. this.html.querySelector('.video-ad-detail').setAttribute('href', this.adLink);
  4544. this.adDuration = null; // 视频广告的时长, 用于倒计时,
  4545. }
  4546. _createClass(MbVideoAdComponent, [{
  4547. key: 'createEl',
  4548. value: function createEl(el, player) {
  4549. var lang = player._options && player._options.language;
  4550. this.isEn = lang && lang === 'en-us';
  4551. this.html.querySelector('.video-ad-detail').innerText = this.isEn ? 'For more information' : '查看广告详情';
  4552. this.html.querySelector('.limit').innerText = this.isEn ? 'Your browser limits autoplay' : '您的浏览器限制';
  4553. this.html.querySelector('.manual').innerText = this.isEn ? 'Please Click' : '自动播放请点击';
  4554. el.appendChild(this.html);
  4555. el.querySelector('video');
  4556. el.querySelector('video').setAttribute('preload', 'load');
  4557. // 隐藏 controlbar
  4558. var controlBar = el.querySelector('.prism-controlbar');
  4559. controlBar.className = controlBar.className + ' controlbar-element-hidden';
  4560. // 隐藏播放暂停按钮
  4561. var pauseBtn = el.querySelector('.prism-big-play-btn');
  4562. pauseBtn.className = pauseBtn.className + ' controlbar-element-hidden';
  4563. }
  4564. }, {
  4565. key: 'created',
  4566. value: function created(player) {
  4567. var _this3 = this;
  4568. this.player = player;
  4569. this.vdSource = player.getOptions().source;
  4570. player.loadByUrl(this.adVideoSource);
  4571. var btnPlay_el = this.html.querySelector('.autoplay-video-ad');
  4572. btnPlay_el.onclick = function () {
  4573. //alert('created')
  4574. if (_this3.adDuration === null) {
  4575. return;
  4576. }
  4577. player.loadByUrl(_this3.adVideoSource);
  4578. _this3.html.parentNode.querySelector('.prism-big-play-btn').click();
  4579. };
  4580. if (this.adDuration === null) {
  4581. var _timeupdateHandle = function _timeupdateHandle() {
  4582. var duration = aliplayer_el.duration;
  4583. if (!isNaN(duration) && duration !== 0) {
  4584. aliplayer_el.removeEventListener('timeupdate', _timeupdateHandle);
  4585. self.adDuration = Math.ceil(aliplayer_el.duration);
  4586. if (self.html.querySelector('.autoplay-video-ad').style.display !== 'none') {
  4587. self.html.querySelector('.autoplay-video-ad').style.display = 'none';
  4588. player.play();
  4589. }
  4590. self.html.querySelector('#video-ad-duration').innerText = self.adDuration;
  4591. self.setAdInterval();
  4592. // document.getElementById('loadflag').style.display = 'none'
  4593. }
  4594. };
  4595. //player.loadByUrl(this.adVideoSource)
  4596. this.adDuration = undefined;
  4597. var aliplayerWrap_el = this.html.parentNode;
  4598. var aliplayer_el = aliplayerWrap_el.querySelector('video');
  4599. var self = this;
  4600. aliplayer_el.addEventListener('timeupdate', _timeupdateHandle);
  4601. }
  4602. }
  4603. }, {
  4604. key: 'ready',
  4605. value: function ready(player) {
  4606. var _this4 = this;
  4607. //alert("2222222")
  4608. // let btnPlay_el = this.html.querySelector('.autoplay-video-ad')
  4609. // btnPlay_el.onclick = () => {
  4610. // alert('ready')
  4611. // if (this.adDuration === null) {
  4612. // return
  4613. // }
  4614. // this.html.parentNode.querySelector('.prism-big-play-btn').click()
  4615. // }
  4616. // if (this.adDuration === null) {
  4617. // player.loadByUrl(this.adVideoSource)
  4618. // this.adDuration = undefined
  4619. // let aliplayerWrap_el = this.html.parentNode
  4620. // let aliplayer_el = aliplayerWrap_el.querySelector('video')
  4621. // let self = this
  4622. // function timeupdateHandle () {
  4623. // let duration = aliplayer_el.duration
  4624. // console.log('duration', duration)
  4625. // if (!isNaN(duration) && duration !== 0) {
  4626. // aliplayer_el.removeEventListener('timeupdate', timeupdateHandle)
  4627. // self.adDuration = Math.ceil(aliplayer_el.duration)
  4628. // if (self.html.querySelector('.autoplay-video-ad').style.display !== 'none') {
  4629. // self.html.querySelector('.autoplay-video-ad').style.display = 'none'
  4630. // player.play()
  4631. // }
  4632. // self.html.querySelector('#video-ad-duration').innerText = self.adDuration
  4633. // self.setAdInterval()
  4634. // }
  4635. // }
  4636. // aliplayer_el.addEventListener('timeupdate', timeupdateHandle)
  4637. // 关闭广告点击事件
  4638. this.html.querySelector('.video-ad-close label').onclick = function () {
  4639. if (typeof _this4.adCloseFunction === 'function') {
  4640. _this4.adCloseFunction(_this4);
  4641. } else {
  4642. _this4.closeVideoAd();
  4643. }
  4644. //广告播放完了之后自动播放视频
  4645. document.getElementById(player.id()).getElementsByTagName('video')[0].play();
  4646. };
  4647. // }
  4648. }
  4649. // 视频广告倒计时
  4650. }, {
  4651. key: 'setAdInterval',
  4652. value: function setAdInterval() {
  4653. var _this5 = this;
  4654. var adDuration_ele = this.html.querySelector('#video-ad-duration');
  4655. this.adInterval = setInterval(function () {
  4656. _this5.adDuration -= 1;
  4657. if (_this5.adDuration <= 0) {
  4658. _this5.closeVideoAd();
  4659. //广告播放完了之后自动播放视频
  4660. document.getElementById(_this5.player.id()).getElementsByTagName('video')[0].play();
  4661. } else {
  4662. adDuration_ele.innerText = _this5.adDuration;
  4663. }
  4664. }, 1000);
  4665. }
  4666. // 关闭视频广告
  4667. }, {
  4668. key: 'closeVideoAd',
  4669. value: function closeVideoAd() {
  4670. this.clearAdInterval();
  4671. this.player.loadByUrl(this.vdSource);
  4672. var controlBar = this.html.parentNode.querySelector('.prism-controlbar');
  4673. controlBar.className = controlBar.className.replace(' controlbar-element-hidden', '');
  4674. var pauseBtn = this.html.parentNode.querySelector('.prism-big-play-btn');
  4675. pauseBtn.className = pauseBtn.className.replace(' controlbar-element-hidden', '');
  4676. if (this.player.getOptions().autoplay) {
  4677. this.player.play();
  4678. }
  4679. this.html.parentNode.removeChild(this.html);
  4680. }
  4681. // 清除视频广告倒计时
  4682. }, {
  4683. key: 'clearAdInterval',
  4684. value: function clearAdInterval() {
  4685. this.adInterval !== null && clearInterval(this.adInterval);
  4686. this.adInterval = null;
  4687. }
  4688. // 播放视频广告
  4689. }, {
  4690. key: 'playVideoAd',
  4691. value: function playVideoAd() {
  4692. this.setAdInterval();
  4693. this.player.play();
  4694. }
  4695. // 暂停视频广告
  4696. }, {
  4697. key: 'pauseVideoAd',
  4698. value: function pauseVideoAd() {
  4699. this.clearAdInterval();
  4700. this.player.pause();
  4701. }
  4702. }]);
  4703. return MbVideoAdComponent;
  4704. }();
  4705. var defaultComponent = VideoAdComponent;
  4706. if (_currentDevice2.default.mobile()) {
  4707. defaultComponent = MbVideoAdComponent;
  4708. }
  4709. exports.default = defaultComponent;
  4710. /***/ }),
  4711. /* 92 */
  4712. /***/ (function(module, exports) {
  4713. module.exports = "<div class=\"video-ad-component\">\n <video id=\"video-ad-content\" x5-video-player-type=\"h5\" x5-video-player-fullscreen=\"false\"></video>\n <a class=\"video-ad-link\" target=\"_blank\"></a>\n <div class=\"video-ad-close\">\n <span id=\"video-ad-duration\"></span>\n <label>\n <span class=\"video-ad-close-text\"></span>\n <i class=\"iconfont icon-close\"></i>\n </label>\n </div>\n <a class=\"video-ad-detail\" target=\"_blank\"></a>\n <div class=\"autoplay-video-ad\">\n <i class=\"iconfont icon-player-play\"></i>\n <span class=\"limit\"></span>\n <span class=\"manual\"></span>\n </div>\n <div id=\"loadflag\" class=\"prism-loading loading-center\">\n <div class=\"circle\"></div> \n <div class=\"circle1\"></div>\n </div>\n</div>";
  4714. /***/ }),
  4715. /* 93 */
  4716. /***/ (function(module, exports, __webpack_require__) {
  4717. // style-loader: Adds some css to the DOM by adding a <style> tag
  4718. // load the styles
  4719. var content = __webpack_require__(94);
  4720. if(typeof content === 'string') content = [[module.i, content, '']];
  4721. // add the styles to the DOM
  4722. var update = __webpack_require__(1)(content, {});
  4723. if(content.locals) module.exports = content.locals;
  4724. // Hot Module Replacement
  4725. if(false) {}
  4726. /***/ }),
  4727. /* 94 */
  4728. /***/ (function(module, exports, __webpack_require__) {
  4729. exports = module.exports = __webpack_require__(0)();
  4730. // imports
  4731. // module
  4732. exports.push([module.i, ".video-ad-component {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2147483647;\n background-color: #000;\n font-size: 12px; }\n .video-ad-component #video-ad-content {\n width: 100%;\n height: 100%; }\n .video-ad-component .video-ad-link {\n width: 100%;\n height: 100%;\n display: block;\n position: absolute;\n top: 0;\n left: 0; }\n .video-ad-component .video-ad-close {\n background-color: rgba(59, 59, 59, 0.85);\n position: absolute;\n top: 15px;\n right: 20px;\n color: #fff;\n line-height: 26px;\n padding: 0 10px;\n user-select: none; }\n .video-ad-component .video-ad-close #video-ad-duration {\n color: #00c1de;\n vertical-align: top;\n font-size: 14px;\n position: relative;\n display: inline-block;\n text-align: right; }\n .video-ad-component .video-ad-close #video-ad-duration::after {\n background-color: #fff;\n position: absolute;\n content: '';\n right: -7px;\n top: 8px;\n bottom: 8px;\n width: 1px; }\n .video-ad-component .video-ad-close label {\n cursor: pointer;\n display: inline-block; }\n .video-ad-component .video-ad-close .icon-close {\n font-size: 12px;\n vertical-align: top; }\n @media (min-width: 768px) {\n .video-ad-component .video-ad-close .icon-close:hover {\n color: #00c1de; } }\n .video-ad-component .video-ad-close .video-ad-close-text {\n padding: 0 5px 0 10px; }\n .video-ad-component .video-ad-detail {\n position: absolute;\n right: 35px;\n bottom: 30px;\n background-color: rgba(0, 222, 255, 0.85);\n color: #fff;\n padding: 8px 12px;\n user-select: none;\n cursor: pointer;\n transition: background-color .15s; }\n @media (min-width: 768px) {\n .video-ad-component .video-ad-detail:hover {\n background-color: #00deff; } }\n .video-ad-component .autoplay-video-ad {\n position: absolute;\n color: #fff;\n top: 50%;\n left: 50%;\n text-align: center;\n padding: 10px;\n border-radius: 5px;\n background-color: rgba(144, 147, 153, 0.85);\n transform: translate(-50%, -50%);\n display: none; }\n .video-ad-component .autoplay-video-ad i {\n font-size: 42px;\n margin-bottom: 7px;\n display: inline-block;\n cursor: pointer; }\n .video-ad-component .autoplay-video-ad i + span {\n margin-bottom: 5px; }\n .video-ad-component .autoplay-video-ad span {\n display: block; }\n\n.controlbar-element-hidden {\n display: none !important; }\n", ""]);
  4733. // exports
  4734. /***/ }),
  4735. /* 95 */
  4736. /***/ (function(module, exports) {
  4737. module.exports = "<div class=\"video-ad-component\" style=\"background-color: transparent;\">\n <a class=\"video-ad-link\" target=\"_blank\"></a>\n <div class=\"video-ad-close\">\n <span id=\"video-ad-duration\"></span>\n <label>\n <span class=\"video-ad-close-text\"></span>\n <i class=\"iconfont icon-close\"></i>\n </label>\n </div>\n <a class=\"video-ad-detail\" target=\"_blank\"></a>\n <div class=\"autoplay-video-ad\" style=\"display: block;\">\n <i class=\"iconfont icon-player-play\"></i>\n <span class=\"limit\"></span>\n <span class=\"manual\"></span>\n </div>\n</div>";
  4738. /***/ }),
  4739. /* 96 */
  4740. /***/ (function(module, exports, __webpack_require__) {
  4741. "use strict";
  4742. var _index = __webpack_require__(97);
  4743. var _index2 = _interopRequireDefault(_index);
  4744. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  4745. if (!window.AliPlayerComponent) {
  4746. window.AliPlayerComponent = {};
  4747. }
  4748. window.AliPlayerComponent.PlayerNextComponent = _index2.default;
  4749. /***/ }),
  4750. /* 97 */
  4751. /***/ (function(module, exports, __webpack_require__) {
  4752. "use strict";
  4753. Object.defineProperty(exports, "__esModule", {
  4754. value: true
  4755. });
  4756. var _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; }; }();
  4757. __webpack_require__(98);
  4758. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  4759. var PlayerNextComponent = function () {
  4760. function PlayerNextComponent(clickHandle) {
  4761. _classCallCheck(this, PlayerNextComponent);
  4762. this.clickHandle = clickHandle;
  4763. this._html = document.createElement('div');
  4764. this._html.setAttribute('class', 'player-olympic-player-next');
  4765. var innerDiv = document.createElement('div');
  4766. innerDiv.setAttribute('class', 'player-olympic-player-next-tip');
  4767. innerDiv.textContent = "Next";
  4768. this._html.appendChild(innerDiv);
  4769. }
  4770. _createClass(PlayerNextComponent, [{
  4771. key: 'createEl',
  4772. value: function createEl(el) {
  4773. this._html.addEventListener('click', this.clickHandle);
  4774. el.querySelector('.prism-play-btn').insertAdjacentElement('afterend', this._html);
  4775. }
  4776. }]);
  4777. return PlayerNextComponent;
  4778. }();
  4779. exports.default = PlayerNextComponent;
  4780. /***/ }),
  4781. /* 98 */
  4782. /***/ (function(module, exports, __webpack_require__) {
  4783. // style-loader: Adds some css to the DOM by adding a <style> tag
  4784. // load the styles
  4785. var content = __webpack_require__(99);
  4786. if(typeof content === 'string') content = [[module.i, content, '']];
  4787. // add the styles to the DOM
  4788. var update = __webpack_require__(1)(content, {});
  4789. if(content.locals) module.exports = content.locals;
  4790. // Hot Module Replacement
  4791. if(false) {}
  4792. /***/ }),
  4793. /* 99 */
  4794. /***/ (function(module, exports, __webpack_require__) {
  4795. exports = module.exports = __webpack_require__(0)();
  4796. // imports
  4797. // module
  4798. exports.push([module.i, ".player-olympic-player-next {\n width: 32px;\n height: 32px;\n background: url(" + __webpack_require__(100) + ") center no-repeat;\n background-size: contain;\n float: left;\n margin-left: 10px;\n margin-top: 8px;\n cursor: pointer;\n position: relative; }\n\n.player-olympic-player-next-tip {\n position: absolute;\n top: -45px;\n display: none;\n font-size: 12px;\n color: #ffffff;\n line-height: 28px;\n letter-spacing: 0;\n text-align: center;\n background: #3c3c3c;\n box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);\n width: 58px;\n height: 28px; }\n\n.player-olympic-player-next:hover .player-olympic-player-next-tip {\n display: block; }\n", ""]);
  4799. // exports
  4800. /***/ }),
  4801. /* 100 */
  4802. /***/ (function(module, exports) {
  4803. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAApJJREFUeAHt2T9OwzAUBvAatTC1lZIwsTJzAC7ACTgBLEhdOjGWDSYWVsQB6AVgR2wsCAkhsTI1ttQyIP4I87nCkpEiVJU0fkEfQ506afv847n2axoN/lGAAhSgAAUoQAEKUIACFKAABShAAQpQgAIUmFVAzXpheF2e5z2l1EuSJGdobXgu5vEozwtjWc2yucbpxrI0z4CsUtmntafamCtjzMY871GX18wF5Adnrd0E1M1I6+ORtW3f/5/aPwE5CCA18dBXxtxrrbf/E44by5+BPAig1pBN57nWF+PxeN33170tDchDAGrr7f39Dtk0wPGK769rWzrQN8QKsukA2eSgtuqK4+JeFJA3WQfUBaDOsTVY8511ahcNNLXAVHNf3u5LvI/jJoEKBLCDayObjnNjbgC1WXCJyK5KMujHyK3dANYV9k6nk8kk/XFO4JPqgYCAaabwsIPV7gHZtDN9LhDHhRQFyFsAJsW0E12yRAUKoMSWLCKAHNR0dRNYsogBCrJJVMkiDiiAElGyiAX6hopeskgH8gkVrZW+7X9tKHWUJckhftp9jaEkFgggl61ms9ftdh9jwPjPFAcEmCf8wt5P03Tog4zZigECzAdqtBObJINMqeeYKOFniwACzvWSUnu4jXQbBifhOCoQYDSm0760+2vhPyYKEGAsptPZcqu13+l0dBiQtOPqgZS6RdbsZWl6LQ2jKJ7KgIDyjMwZYDqdoP0oCkZiXyVAABm6m4tYup8kIvwW06KBHrE69QBz+VsQks8tCih6iVAWeulAmE4iSgRxQIARVSKIAXIrksQSQQQQcMSWCFGBsA/OgbMruUQoC4jvQwEKUIACFKAABShAAQpQgAIUoAAFKEABClBgdoEvgRgNiNlEUbkAAAAASUVORK5CYII="
  4804. /***/ }),
  4805. /* 101 */
  4806. /***/ (function(module, exports, __webpack_require__) {
  4807. "use strict";
  4808. var _index = __webpack_require__(102);
  4809. var _index2 = _interopRequireDefault(_index);
  4810. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  4811. if (!window.AliPlayerComponent) {
  4812. window.AliPlayerComponent = {};
  4813. }
  4814. window.AliPlayerComponent.StaticAdComponent = _index2.default;
  4815. /***/ }),
  4816. /* 102 */
  4817. /***/ (function(module, exports, __webpack_require__) {
  4818. "use strict";
  4819. Object.defineProperty(exports, "__esModule", {
  4820. value: true
  4821. });
  4822. var html = __webpack_require__(103);
  4823. __webpack_require__(105);
  4824. /**
  4825. * 静态广告组件
  4826. */
  4827. var StaticADComponent = Aliplayer.Component({
  4828. /**
  4829. * 初始函数,在new对象时调用
  4830. *
  4831. * @param {string} adAddress - 广告视频地址
  4832. * @param {string} toAddress - 广告链接地址
  4833. */
  4834. init: function init(adAddress, toAddress) {
  4835. this.adAddress = adAddress;
  4836. this.toAddress = toAddress;
  4837. this.$html = $(html);
  4838. },
  4839. /**
  4840. * 创建广告Dom元素
  4841. */
  4842. createEl: function createEl(el) {
  4843. (Array.isArray(this.$html) ? this.$html.filter('.ad')[0] : this.$html.find('.ad')).attr('src', this.adAddress);
  4844. var $adWrapper = Array.isArray(this.$html) ? this.$html.filter('.ad-wrapper')[0] : this.$html.find('.ad-wrapper');
  4845. $adWrapper.attr('href', this.toAddress);
  4846. $adWrapper.click(function () {
  4847. Aliplayer.util.stopPropagation();
  4848. });
  4849. (Array.isArray(this.$html) ? this.$html.filter('.close')[0] : this.$html.find('.close')).click(function () {
  4850. this.$html.hide();
  4851. });
  4852. $(el).append(this.$html);
  4853. },
  4854. ready: function ready(player, e) {},
  4855. /**
  4856. * 隐藏广告
  4857. */
  4858. play: function play(player, e) {
  4859. this.$html.hide();
  4860. },
  4861. /**
  4862. * 显示广告
  4863. */
  4864. pause: function pause(player, e) {
  4865. this.$html.show();
  4866. },
  4867. /**
  4868. * 隐藏广告
  4869. */
  4870. playing: function playing(player, e) {
  4871. this.$html.hide();
  4872. },
  4873. waiting: function waiting(player, e) {},
  4874. timeupdate: function timeupdate(player, e) {},
  4875. error: function error(player, e) {},
  4876. /**
  4877. * 显示广告
  4878. */
  4879. ended: function ended(player, e) {
  4880. this.$html.show();
  4881. }
  4882. });
  4883. exports.default = StaticADComponent;
  4884. /***/ }),
  4885. /* 103 */
  4886. /***/ (function(module, exports, __webpack_require__) {
  4887. module.exports = "<div class=\"ad-container\">\n <span>广告</span>\n <img class=\"close\" src=\"" + __webpack_require__(104) + "\"></img>\n <a class='ad-wrapper' target=\"_blank\">\n <img class=\"ad\"></img>\n </a>\n</div>";
  4888. /***/ }),
  4889. /* 104 */
  4890. /***/ (function(module, exports) {
  4891. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpCNzdDNzkwNTE1MjA2ODExODIyQTg3RDcyQkRGNjk2MiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo3Rjg1NzQ2NDY0MjYxMUU2ODk0QUZBRTg4N0Y5MDgxRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo3Rjg1NzQ2MzY0MjYxMUU2ODk0QUZBRTg4N0Y5MDgxRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6OUU0MTk5OEUxRTIwNjgxMTgyMkE4N0Q3MkJERjY5NjIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6Qjc3Qzc5MDUxNTIwNjgxMTgyMkE4N0Q3MkJERjY5NjIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7gi5EfAAABEklEQVR42qyUTQ6CMBCFW004hLrSU3gL/zd6Cb0AsJSt3kIT40lcG2N0oXdQN/W9pJgKLT/iSz5Spp0HZcpIpZSwyAM9TRc0wAvcwAHswF7HvkXDBH1wUvnimkEy37ypg6Uqr6XOTRn+YmaafhmOVHXRQ0hcWIAzaIlquoN2DZdx0iwIAiGlFGEYprIY4xzXJNQEE253Y3t/3/d5nhQSPzGOGeOcQ1saXl2zpmkBM+pKw0fWiti0gBn1rFlPuyF+L9vYKbgeXY8zt2n7pq4tb/LMsgplK8q0iFlB09m/D3YnLspCVNccPM3mEFX4jyNX+1r9YLZ2ta+YYYkGO8pqsCaerv4WXMBLc9GxqV6Tyn0LMACAi/Wdy4svogAAAABJRU5ErkJggg=="
  4892. /***/ }),
  4893. /* 105 */
  4894. /***/ (function(module, exports, __webpack_require__) {
  4895. // style-loader: Adds some css to the DOM by adding a <style> tag
  4896. // load the styles
  4897. var content = __webpack_require__(106);
  4898. if(typeof content === 'string') content = [[module.i, content, '']];
  4899. // add the styles to the DOM
  4900. var update = __webpack_require__(1)(content, {});
  4901. if(content.locals) module.exports = content.locals;
  4902. // Hot Module Replacement
  4903. if(false) {}
  4904. /***/ }),
  4905. /* 106 */
  4906. /***/ (function(module, exports, __webpack_require__) {
  4907. exports = module.exports = __webpack_require__(0)();
  4908. // imports
  4909. // module
  4910. exports.push([module.i, ".ad-container {\n display: none;\n position: absolute;\n left: 50%;\n top: 50%;\n margin-left: -150px;\n margin-top: -100px; }\n\n.ad-container span {\n width: 27px;\n height: 16px;\n border-radius: 1px;\n background-color: rgba(0, 0, 0, 0.5);\n position: absolute;\n font-size: 10px;\n color: #fff;\n line-height: 16px;\n text-align: center;\n top: 0px;\n left: 0px; }\n\n.ad-container .close {\n position: absolute;\n top: 2px;\n right: 2px;\n width: 20px;\n height: 20px; }\n\n.ad-container .close:hover {\n cursor: pointer; }\n\n.ad-container .ad {\n width: 300px;\n height: 200px; }\n", ""]);
  4911. // exports
  4912. /***/ }),
  4913. /* 107 */
  4914. /***/ (function(module, exports, __webpack_require__) {
  4915. // style-loader: Adds some css to the DOM by adding a <style> tag
  4916. // load the styles
  4917. var content = __webpack_require__(108);
  4918. if(typeof content === 'string') content = [[module.i, content, '']];
  4919. // add the styles to the DOM
  4920. var update = __webpack_require__(1)(content, {});
  4921. if(content.locals) module.exports = content.locals;
  4922. // Hot Module Replacement
  4923. if(false) {}
  4924. /***/ }),
  4925. /* 108 */
  4926. /***/ (function(module, exports, __webpack_require__) {
  4927. exports = module.exports = __webpack_require__(0)();
  4928. // imports
  4929. // module
  4930. exports.push([module.i, "@charset \"UTF-8\";\n@font-face {\n font-family: \"iconfont\";\n src: url(" + __webpack_require__(5) + ");\n /* IE9*/\n src: url(" + __webpack_require__(5) + "#iefix) format(\"embedded-opentype\"), url(\"data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAl8AAsAAAAADrgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZW70yOY21hcAAAAYAAAAC4AAACPDvISv9nbHlmAAACOAAABNgAAAcsY+jklmhlYWQAAAcQAAAALgAAADYSO9jUaGhlYQAAB0AAAAAcAAAAJAfeA41obXR4AAAHXAAAABQAAAAwL+kAAGxvY2EAAAdwAAAAGgA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JhAogDx5wjcAAB4nGNgZGBgbvjfwBDDwgACQJKRARXwAABHEgJ1eJxjYWBgYH7JwMDCQBwGACwHARkAAAAAAHYA7AECAT4BbgGCAcYCDAKWAzIDlgAAeJxjYGRgYOBhSGPgYgABJiDmArP/g/kMABRqAZMAAAB4nGWPTU7DMBCFX/oHpBKqqGCH5AViASj9EatuWFRq911036ZOmyqJI8et1ANwHo7ACTgC3IA78EgnmzaWx9+8eWNPANzgBx6O3y33kT1cMjtyDRe4F65TfxBukF+Em2jjVbhF/U3YxzOmwm10YXmD17hi9oR3YQ8dfAjXcI1P4Tr1L+EG+Vu4iTv8CrfQ8erCPuZeV7iNRy/2x1YvnF6p5UHFockikzm/gple75KFrdLqnGtbxCZTg6BfSVOdaVvdU+zXQ+ciFVmTqgmrOkmMyq3Z6tAFG+fyUa8XiR6EJuVYY/62xgKOcQWFJQ6MMUIYZIjK6Og7VWb0r7FDwl57Vj3N53RbFNT/c4UBAvTPXFO6stJ5Ok+BPV8bUnV0K27LnpQ0kV7NSRKyQl7WtlRC6gE2ZVeOEXpc0Yk/KGdI/wAJWm7IAAAAeJxtykEOgjAURdE+pIoIJrCPDlzSVz+lobRYWsXdK3FE4h2eXJGJX6X4X4UMO+SQ2OOAAkeUOKFCLbDIy5hsKubBTI6XKG/Wz5xPlt71amoK/DQ+zQ2F4F8q+EiRleUuthsJRvexvfqOnH4YdSc3Jp3INVsayJwdm+BX4v47CPEBESQxxgAAAA==\") format(\"woff\"), url(" + __webpack_require__(109) + ") format(\"truetype\"), url(" + __webpack_require__(110) + "#iconfont) format(\"svg\");\n /* iOS 4.1- */ }\n\n.iconfont {\n font-family: \"iconfont\" !important;\n font-size: 16px;\n font-style: normal;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale; }\n\n.icon-list:before {\n content: \"\\E643\"; }\n\n.icon-skipnext:before {\n content: \"\\EA9E\"; }\n\n.icon-skip-previous:before {\n content: \"\\E6D3\"; }\n\n.icon-close:before {\n content: \"\\E616\"; }\n\n.icon-player-rotate-left:before {\n content: \"\\E658\"; }\n\n.icon-player-rotate-right:before {\n content: \"\\E659\"; }\n\n.icon-player-switch:before {\n content: \"\\E781\"; }\n\n.icon-danmu-close:before {\n content: \"\\E696\"; }\n\n.icon-danmu-open:before {\n content: \"\\E697\"; }\n\n.icon-player-play:before {\n content: \"\\E641\"; }\n\nbody {\n font-family: \"Helvetica Neue\",Helvetica,\"PingFang SC\",\"Hiragino Sans GB\",\"Microsoft YaHei\",\"\\5FAE\\8F6F\\96C5\\9ED1\",Arial,sans-serif; }\n\n/* previewVodComponents 中的自定义 css */\n.vip-join {\n color: #00c1de; }\n\n.vip_limit_content {\n display: flex;\n width: 100%;\n height: 100%;\n flex-wrap: wrap;\n justify-content: center;\n align-items: center; }\n\n.vip_limit_content .title {\n font-size: 18px;\n line-height: 36px;\n color: #fff;\n text-align: center;\n width: 100%; }\n\n.vip_limit_button_box {\n text-align: center;\n white-space: nowrap;\n overflow: hidden;\n width: 100%; }\n\n.vip_limit_btn {\n display: inline-block;\n min-width: 100px;\n position: relative;\n background: #f60;\n padding: 0 35px;\n margin: 0px 5px 20px 5px;\n border-radius: 38px;\n font-size: 18px;\n line-height: 38px;\n color: #623A0C;\n text-align: center;\n background-image: linear-gradient(-135deg, #FBE8A8 0%, #F8E7AC 15%, #E2C078 100%);\n cursor: pointer; }\n\n.vip_limit_close {\n text-align: center; }\n .vip_limit_close span {\n display: inline-block;\n width: 40px;\n height: 40px;\n line-height: 36px;\n background: rgba(165, 165, 165, 0.54);\n border-radius: 50%;\n font-size: 24px;\n cursor: pointer; }\n", ""]);
  4931. // exports
  4932. /***/ }),
  4933. /* 109 */
  4934. /***/ (function(module, exports) {
  4935. module.exports = "data:application/x-font-ttf;base64,AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzJW70yOAAABfAAAAFZjbWFwO8hK/wAAAgQAAAI8Z2x5ZmPo5JYAAARcAAAHLGhlYWQSO9jUAAAA4AAA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