mirror of
https://github.com/langyuxiansheng/vue-aliplayer-v2.git
synced 2025-04-06 03:57:55 +08:00
1 line
37 KiB
Plaintext
1 line
37 KiB
Plaintext
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./examples/App.vue?d78c","webpack:///./examples/App.vue?99b2","webpack:///examples/App.vue","webpack:///./examples/App.vue?b85d","webpack:///./examples/App.vue","webpack:///./packages/AliplayerV2/src/main.vue?f6ec","webpack:///packages/AliplayerV2/src/main.vue","webpack:///./packages/AliplayerV2/src/main.vue?f5c2","webpack:///./packages/AliplayerV2/src/main.vue","webpack:///./packages/AliplayerV2/index.js","webpack:///./packages/index.js","webpack:///./examples/main.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","_vm","this","_h","$createElement","_c","_self","attrs","ref","options","staticClass","on","$event","play","_v","pause","replay","getCurrentTime","staticRenderFns","component","id","VueAliplayerV2","install","Vue","components","installed","map","use","config","productionTip","render","h","App","$mount"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EA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AAN,qCAMI,kBAnNJ,WAoNM,QAAN,mBACM,KAAN,6EAMI,iBA3NJ,WA4NM,QAAN,mBACM,KAAN,4EAMI,gBAnOJ,WAqOM,OADA,QAAN,uGACA,gFAOI,UA5OJ,WA8OM,OADA,QAAN,6FACA,0EASI,iBAvPJ,SAuPA,KACM,QAAN,+DACM,KAAN,6EAQI,UAjQJ,SAiQA,GACM,QAAN,8BACM,KAAN,qBAOI,UA1QJ,WA4QM,OADA,QAAN,+CACA,yBAQI,SApRJ,SAoRA,GACM,QAAN,2BACM,KAAN,oBAMI,QA5RJ,WA6RM,QAAN,cACM,KAAN,kBAOI,SArSJ,SAqSA,GACM,QAAN,uBACM,KAAN,oBAOI,mBA9SJ,SA8SA,GACM,QAAN,gCACM,KAAN,8BAOI,eAvTJ,SAuTA,GACM,QAAN,iCACM,KAAN,0BAOI,eAhUJ,WAkUM,OADA,QAAN,oDACA,8BAMI,UAxUJ,WAyUM,QAAN,YACM,KAAN,oBAOI,IAjVJ,SAiVA,KACM,KAAN,mBC9cic,ICO7b,EAAY,eACd,EACA,EACA,GACA,EACA,KACA,KACA,MAIa,I,QCffC,EAAeC,QAAU,SAAUC,GAC/BA,EAAIJ,UAAUE,EAAe7C,KAAM6C,IAExBA,QCDTG,EAAa,CACfH,GAIEC,EAAU,SAAVA,EAAWC,GACb,GAAID,EAAQG,UAAW,OAAO,EAC9BH,EAAQG,WAAY,EAEpBD,EAAWE,KAAI,SAAAP,GACX,OAAOI,EAAIJ,UAAUA,EAAU3C,KAAM2C,OAGvB,qBAAXrB,QAA0BA,OAAOyB,KACxCD,EAAQxB,OAAOyB,KAEJ,OAEXD,UACAD,kBCrBJE,OAAII,IAAIN,GACRE,OAAIK,OAAOC,eAAgB,EAC3B,IAAIN,OAAI,CACJO,OAAQ,SAAAC,GAAC,OAAIA,EAAEC,MAChBC,OAAO","file":"js/index.5dd18869.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"index\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/vue-aliplayer-v2/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import mod from \"-!../node_modules/_mini-css-extract-plugin@0.8.0@mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../node_modules/_css-loader@1.0.1@css-loader/index.js??ref--10-oneOf-1-1!../node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/stylePostLoader.js!../node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js??ref--10-oneOf-1-2!../node_modules/_less-loader@5.0.0@less-loader/dist/cjs.js??ref--10-oneOf-1-3!../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../node_modules/_vue-loader@15.7.2@vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&id=45a4aaea&lang=less&scoped=true&\"; export default mod; export * from \"-!../node_modules/_mini-css-extract-plugin@0.8.0@mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../node_modules/_css-loader@1.0.1@css-loader/index.js??ref--10-oneOf-1-1!../node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/stylePostLoader.js!../node_modules/_postcss-loader@3.0.0@postcss-loader/src/index.js??ref--10-oneOf-1-2!../node_modules/_less-loader@5.0.0@less-loader/dist/cjs.js??ref--10-oneOf-1-3!../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../node_modules/_vue-loader@15.7.2@vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&id=45a4aaea&lang=less&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('vue-aliplayer-v2',{ref:\"VueAliplayerV2\",attrs:{\"id\":\"player-1194076936807170050\",\"options\":_vm.options}}),_c('div',{staticClass:\"player-btns\"},[_c('span',{on:{\"click\":function($event){return _vm.play()}}},[_vm._v(\"播放\")]),_c('span',{on:{\"click\":function($event){return _vm.pause()}}},[_vm._v(\"暂停\")]),_c('span',{on:{\"click\":function($event){return _vm.replay()}}},[_vm._v(\"重播\")]),_c('span',{on:{\"click\":function($event){return _vm.getCurrentTime()}}},[_vm._v(\"播放时刻\")])])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div id=\"app\">\r\n <vue-aliplayer-v2 ref=\"VueAliplayerV2\" id=\"player-1194076936807170050\" :options=\"options\" />\r\n <div class=\"player-btns\">\r\n <span @click=\"play()\">播放</span>\r\n <span @click=\"pause()\">暂停</span>\r\n <span @click=\"replay()\">重播</span>\r\n <span @click=\"getCurrentTime()\">播放时刻</span>\r\n </div>\r\n </div>\r\n</template>\r\n<script>\r\nexport default {\r\n data(){\r\n return {\r\n options: {\r\n source:'//player.alicdn.com/video/aliyunmedia.mp4'\r\n }\r\n }\r\n },\r\n\r\n methods:{\r\n\r\n play(){\r\n this.$refs.VueAliplayerV2.play()\r\n },\r\n\r\n pause(){\r\n this.$refs.VueAliplayerV2.pause();\r\n },\r\n\r\n replay(){\r\n this.$refs.VueAliplayerV2.replay();\r\n },\r\n\r\n getCurrentTime(){\r\n this.$refs.VueAliplayerV2.getCurrentTime();\r\n },\r\n }\r\n}\r\n</script>\r\n<style lang=\"less\" scoped>\r\n* {\r\n margin: 0;\r\n padding: 0;\r\n}\r\n.player-btns{\r\n width: 800px;\r\n margin: 0 auto;\r\n display: flex;\r\n justify-content: space-between;\r\n span {\r\n margin: 0 auto;\r\n display: inline-block;\r\n padding: 5px 10px;\r\n width: 150px;\r\n height: 40px;\r\n line-height: 40px;\r\n border: 1px solid #eee;\r\n background: #e1e1e1;\r\n border-radius: 10px;\r\n text-align: center;\r\n margin: 20px auto;\r\n cursor: pointer;\r\n }\r\n}\r\n</style>\r\n","import mod from \"-!../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../node_modules/_babel-loader@8.0.6@babel-loader/lib/index.js!../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../node_modules/_vue-loader@15.7.2@vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../node_modules/_babel-loader@8.0.6@babel-loader/lib/index.js!../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../node_modules/_vue-loader@15.7.2@vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=45a4aaea&scoped=true&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&id=45a4aaea&lang=less&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/_vue-loader@15.7.2@vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"45a4aaea\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":_vm.id}})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div :id=\"id\"></div>\r\n</template>\r\n<script>\r\nexport default {\r\n name: 'VueAliplayerV2',\r\n props: {\r\n options: { //配置项\r\n required: false,\r\n type: [Object],\r\n default: () => null\r\n },\r\n id:{\r\n required: false,\r\n type: [String],\r\n default: `player-${Date.parse(new Date())}`\r\n }\r\n },\r\n data () {\r\n return {\r\n player: null, //播放器实例\r\n config:{\r\n id: null, //播放器的ID\r\n width: '100%',\r\n autoplay: true,\r\n // isLive: true,\r\n //支持播放地址播放,此播放优先级最高\r\n // source: 'rtmp://182.145.195.238:1935/hls/1194076936807170050',\r\n cssLink: 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css',\r\n scriptSrc: 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js',\r\n },\r\n events:[\r\n /**\r\n * 播放器视频初始化按钮渲染完毕。\r\n * 播放器UI初始设置需要此事件后触发,避免UI被初始化所覆盖。\r\n * 播放器提供的方法需要在此事件发生后才可以调用。\r\n */\r\n 'ready',\r\n /**\r\n * 视频由暂停恢复为播放时触发。\r\n */\r\n 'play',\r\n /**\r\n * 视频暂停时触发。\r\n */\r\n 'pause',\r\n /**\r\n * 能够开始播放音频/视频时发生,会多次触发,仅H5播放器。\r\n */\r\n 'canplay',\r\n /**\r\n * 播放中,会触发多次。\r\n */\r\n 'playing',\r\n /**\r\n * 当前视频播放完毕时触发。\r\n */\r\n 'ended',\r\n /**\r\n * 直播流中断时触发。\r\n * m3u8/flv/rtmp在重试5次未成功后触发。\r\n * 提示上层流中断或需要重新加载视频。\r\n * PS:m3u8一直自动重试,不需要上层添加重试。\r\n */\r\n 'liveStreamStop',\r\n /**\r\n * m3u8直播流中断后重试事件,每次断流只触发一次。\r\n */\r\n 'onM3u8Retry',\r\n /**\r\n * 控制栏自动隐藏事件。\r\n */\r\n 'hideBar',\r\n /**\r\n * 控制栏自动显示事件。\r\n */\r\n 'showBar',\r\n /**\r\n * 数据缓冲事件。\r\n */\r\n 'waiting',\r\n /**\r\n * 播放位置发生改变时触发,仅H5播放器。\r\n * 可通过getCurrentTime方法,得到当前播放时间。\r\n */\r\n 'timeupdate',\r\n /**\r\n * 截图完成。\r\n */\r\n 'snapshoted',\r\n /**\r\n * 全屏事件,仅H5支持。\r\n */\r\n 'requestFullScreen',\r\n /**\r\n * 取消全屏事件,iOS下不会触发,仅H5支持。\r\n */\r\n 'cancelFullScreen',\r\n /**\r\n * 错误事件。\r\n */\r\n 'error',\r\n /**\r\n * 开始拖拽,参数返回拖拽点的时间。\r\n */\r\n 'startSeek',\r\n /**\r\n * 完成拖拽,参数返回拖拽点的时间。\r\n */\r\n 'completeSeek'\r\n ],\r\n };\r\n },\r\n mounted () {\r\n this.$nextTick(()=>{\r\n this.init();\r\n });\r\n },\r\n updated(){\r\n //重载播放器\r\n this.$nextTick(()=>{\r\n this.init();\r\n });\r\n },\r\n methods: {\r\n\r\n /**\r\n * 创建script和css\r\n * 加载Alipayer的SDK\r\n */\r\n init(){\r\n let load = true;\r\n const linkID = 'aliplayer-min-css';\r\n const scriptID = 'aliplayer-min-js';\r\n const head = document.getElementsByTagName('head');\r\n const html = document.getElementsByTagName('html');\r\n let scriptTag = document.getElementById(scriptID);\r\n if(!document.getElementById(linkID)) {\r\n const link = document.createElement('link');\r\n link.type = 'text/css';\r\n link.rel = 'stylesheet';\r\n link.href = this.config.cssLink;\r\n link.setAttribute('id',linkID);\r\n head[0].appendChild(link);\r\n }\r\n if(!scriptTag) {\r\n scriptTag = document.createElement('script');\r\n scriptTag.type = \"text/javascript\";\r\n scriptTag.id = scriptID;\r\n scriptTag.src = this.config.scriptSrc;\r\n html[0].appendChild(scriptTag);\r\n }\r\n\r\n scriptTag.addEventListener(\"load\", () => {\r\n this.initPlayer();\r\n load = false;\r\n });\r\n\r\n if(!load){\r\n this.initPlayer();\r\n }\r\n },\r\n\r\n /**\r\n * 创建播放器\r\n * @description SDK文档地址:https://help.aliyun.com/document_detail/125572.html?spm=a2c4g.11186623.6.1084.131d1c4cJT7o5Z\r\n */\r\n initPlayer(){\r\n if(typeof window.Aliplayer != 'undefined') {\r\n const options = this.options;\r\n if(options){\r\n for (const key in options) {\r\n this.config[key] = options[key];\r\n }\r\n }\r\n this.config.id = this.id;\r\n this.player = new Aliplayer(this.config, function(player) {\r\n console.log('播放器创建好了。',player);\r\n });\r\n for(const ev in this.events){\r\n this.player.on(this.events[ev],(e)=>{\r\n console.log(`object ${this.events[ev]}`,e);\r\n this.$emit(this.events[ev],e);\r\n });\r\n }\r\n //通过播放器实例的off方法取消订阅\r\n //player.off('ready',handleReady);\r\n }\r\n },\r\n\r\n /**\r\n * @return player 实例\r\n */\r\n getPlayer(){\r\n return this.player;\r\n },\r\n\r\n /**\r\n * 播放视频。\r\n */\r\n play(){\r\n console.log(`播放视频。`);\r\n this.player.play();\r\n },\r\n\r\n /**\r\n * 暂停视频\r\n */\r\n pause(){\r\n console.log(`暂停视频`);\r\n this.player.pause();\r\n },\r\n\r\n /**\r\n * 重播视频\r\n */\r\n replay(){\r\n console.log(`重播视频`);\r\n this.player.replay();\r\n },\r\n\r\n /**\r\n * 跳转到某个时刻进行播放,time的单位为秒。\r\n * @param time\r\n * @return player\r\n */\r\n seek(time){\r\n console.log(`跳转到某个时刻进行播放,time为${time}秒。`);\r\n this.player.seek(time);\r\n },\r\n\r\n /**\r\n * 获取当前的播放时刻,返回的单位为秒。\r\n * @return player\r\n */\r\n getCurrentTime(){\r\n console.log(`获取当前的播放时刻,返回的单位为${this.player.getCurrentTime()}秒。`);\r\n return this.player.getCurrentTime();\r\n },\r\n\r\n /**\r\n * 获取视频总时长,返回的单位为秒,这个需要在视频加载完成以后才可以获取到,可以在play事件后获取。\r\n * @return player\r\n */\r\n getDuration(){\r\n console.log(`获取视频总时长,返回的单位为${this.player.getDuration()}秒。`);\r\n return this.player.getDuration();\r\n },\r\n\r\n /**\r\n * 获取当前的音量,返回值为0-1的实数。ios和部分android会失效。\r\n * @return player\r\n */\r\n getVolume(){\r\n console.log(`获取当前的音量${this.player.getVolume()}。`);\r\n return this.player.getVolume();\r\n },\r\n\r\n /**\r\n * 设置音量,vol为0-1的实数,ios和部分android会失效。\r\n * @return player\r\n */\r\n setVolume(v){\r\n console.log(`设置音量,vol为${v}。`);\r\n this.player.setVolume(v);\r\n },\r\n\r\n /**\r\n * 直接播放视频url,time为可选值(单位秒)。目前只支持同种格式(mp4/flv/m3u8)之间切换。\r\n * 暂不支持直播rtmp流切换。\r\n * @return player\r\n */\r\n loadByUrl(url, time){\r\n console.log(`直接播放视频url${url},time为${time}。`);\r\n this.player.loadByUrl(url, time);\r\n },\r\n\r\n /**\r\n * 目前只支持H5播放器。暂不支持不同格式视频间的之间切换。暂不支持直播rtmp流切换。\r\n * @param vid 视频id\r\n * @param 播放凭证\r\n */\r\n replayByVidAndPlayAuth(vid, playauth){\r\n console.log(`replayByVidAndPlayAuth vid${vid},playauth为${playauth}。`);\r\n this.player.replayByVidAndPlayAuth(vid, playauth);\r\n },\r\n\r\n /**\r\n * 目前只支持H5播放器。暂不支持不同格式视频间的之间切换。暂不支持直播rtmp流切换。\r\n * @param vid 视频id\r\n * @param 播放凭证\r\n * @description 仅MPS用户时使用 仅MPS用户时使用 参数顺序为:vid、accId、accSecret、stsToken、authInfo、domainRegion\r\n */\r\n replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion){\r\n console.log(`replayByVidAndAuthInfo 参数顺序为:vid、accId、accSecret、stsToken、authInfo、domainRegion`,vid, accId, accSecret, stsToken, authInfo, domainRegion);\r\n this.player.replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion);\r\n },\r\n\r\n /**\r\n * 设置播放器大小w,h可分别为400px像素或60%百分比。\r\n * @param w 宽度\r\n * @param h 宽度\r\n * @description chrome浏览器下flash播放器分别不能小于397x297。\r\n */\r\n setPlayerSize(w, h){\r\n console.log(`设置播放器大小 宽度:${w},高度:${h}`);\r\n this.player.setPlayerSize(w, h);\r\n },\r\n\r\n /**\r\n * 手动设置播放的倍速,倍速播放仅H5支持。移动端可能会失效,比如android微信。\r\n * 倍速播放UI默认是开启的。\r\n * 如果自定义过skinLaout属性,需要添加speedButton项到数组里:\r\n * @param h 宽度\r\n * @description {name:“speedButton”,align:“tr”,x:10,y:23}\r\n */\r\n setSpeed(speed){\r\n console.log(`手动设置播放的倍速:${speed}`);\r\n this.player.setSpeed(speed);\r\n },\r\n\r\n /**\r\n * 设置截图参数\r\n * @param width 宽度\r\n * @param height 高度\r\n * @param rate 截图质量\r\n */\r\n setSanpshotProperties(width, height, rate){\r\n console.log(`设置截图参数:`,width, height, rate);\r\n this.player.setSanpshotProperties(width, height, rate);\r\n },\r\n\r\n /**\r\n * 播放器全屏,仅H5支持。\r\n */\r\n requestFullScreen(){\r\n console.log(`播放器全屏,仅H5支持`);\r\n this.player.fullscreenService && this.player.fullscreenService.requestFullScreen();\r\n },\r\n\r\n /**\r\n * 播放器退出全屏,iOS调用无效,仅H5支持。\r\n */\r\n cancelFullScreen(){\r\n console.log(`播放器全屏,仅H5支持`);\r\n this.player.fullscreenService && this.player.fullscreenService.cancelFullScreen();\r\n },\r\n\r\n /**\r\n * 获取播放器全屏状态,仅H5支持。\r\n */\r\n getIsFullScreen(){\r\n console.log(`获取播放器全屏状态,仅H5支持。`,this.player.fullscreenService && this.player.fullscreenService.getIsFullScreen());\r\n return this.player.fullscreenService && this.player.fullscreenService.getIsFullScreen();\r\n },\r\n\r\n /**\r\n * 获取播放器状态,包含的值,\r\n * @returns init ready loading play pause playing waiting error ended\r\n */\r\n getStatus(){\r\n console.log(`获取播放器状态,包含的值`,this.player.fullscreenService && this.player.fullscreenService.getStatus());\r\n return this.player.fullscreenService && this.player.fullscreenService.getStatus();\r\n },\r\n\r\n /**\r\n * 设置直播的开始结束时间,开启直播时移功能时使用。\r\n * @param beginTime 开始时间\r\n * @param endTime 结束时间\r\n * @description 例子:player.liveShiftSerivce.setLiveTimeRange(“”,‘2018/01/04 20:00:00’)\r\n */\r\n setLiveTimeRange(beginTime, endTime){\r\n console.log(`设置直播的开始时间:${beginTime},结束时间:${endTime},开启直播时移功能时使用。`);\r\n this.player.liveShiftSerivce && this.player.liveShiftSerivce.setLiveTimeRange(beginTime, endTime);\r\n },\r\n\r\n /**\r\n * 参数为旋转角度, 正数为正时针旋转, 负数为逆时针旋转。\r\n * @param rotate 旋转角度\r\n * @description 例如: setRotate(90)。详情参见旋转和镜像。\r\n */\r\n setRotate(rotate){\r\n console.log(`参数为旋转角度:${rotate}。`);\r\n this.player.setRotate(rotate);\r\n },\r\n\r\n /**\r\n * 获取旋转角度。详情参见旋转和镜像。\r\n * @return rotate 旋转角度\r\n */\r\n getRotate(){\r\n console.log(`获取旋转角度:${this.player.getRotate()}`);\r\n return this.player.getRotate();\r\n },\r\n\r\n /**\r\n * 设置镜像\r\n * @param image 镜像类型 可选值为:horizon,vertical\r\n * @description 例如: setImage(‘horizon’)。详情参见旋转和镜像。\r\n */\r\n setImage(image){\r\n console.log(`设置镜像:${image}。`);\r\n this.player.setImage(image);\r\n },\r\n\r\n /**\r\n * 播放器销毁\r\n */\r\n dispose(){\r\n console.log(`播放器销毁。`);\r\n this.player.dispose();\r\n },\r\n\r\n /**\r\n * 设置封面\r\n * @param cover 封面地址\r\n */\r\n setCover(cover){\r\n console.log(`设置封面:${cover}`);\r\n this.player.setCover(cover);\r\n },\r\n\r\n /**\r\n * 设置封面\r\n * @param markers 设置打点数据\r\n */\r\n setProgressMarkers(markers){\r\n console.log(`markers打点数据集合:${markers}`);\r\n this.player.setProgressMarkers(markers);\r\n },\r\n\r\n /**\r\n * 设置试看时间,单位为秒,详情参见\r\n * @param time 试看时间\r\n */\r\n setPreviewTime(time){\r\n console.log(`设置试看时间,单位为:${time}秒`);\r\n this.player.setPreviewTime(time);\r\n },\r\n\r\n /**\r\n * 获取试看时间\r\n * @return rotate 旋转角度\r\n */\r\n getPreviewTime(){\r\n console.log(`获取试看时间:${this.player.getPreviewTime()}`);\r\n return this.player.getPreviewTime();\r\n },\r\n\r\n /**\r\n * 是否试看\r\n */\r\n isPreview(){\r\n console.log(`是否试看`);\r\n this.player.isPreview();\r\n },\r\n\r\n /**\r\n * @param ev 事件名\r\n * @param handle 回调方法\r\n */\r\n off(ev,handle){\r\n this.player.off(ev,handle);\r\n }\r\n }\r\n};\r\n</script>\r\n","import mod from \"-!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../node_modules/_babel-loader@8.0.6@babel-loader/lib/index.js!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/_vue-loader@15.7.2@vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../node_modules/_babel-loader@8.0.6@babel-loader/lib/index.js!../../../node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/_vue-loader@15.7.2@vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./main.vue?vue&type=template&id=2086d122&\"\nimport script from \"./main.vue?vue&type=script&lang=js&\"\nexport * from \"./main.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/_vue-loader@15.7.2@vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","// 导入组件,组件必须声明 name\r\nimport VueAliplayerV2 from './src/main.vue';\r\n// 为组件添加 install 方法,用于按需引入\r\nVueAliplayerV2.install = function (Vue) {\r\n Vue.component(VueAliplayerV2.name, VueAliplayerV2);\r\n}\r\nexport default VueAliplayerV2;\r\n","// packages / index.js\r\n// 导入单个组件\r\nimport VueAliplayerV2 from './AliplayerV2';\r\n\r\n// 以数组的结构保存组件,便于遍历\r\nconst components = [\r\n VueAliplayerV2\r\n];\r\n\r\n// 定义 install 方法\r\nconst install = (Vue) =>{\r\n if (install.installed) return false;\r\n install.installed = true;\r\n // 遍历并注册全局组件\r\n components.map(component => {\r\n return Vue.component(component.name, component)\r\n });\r\n};\r\nif (typeof window !== 'undefined' && window.Vue) {\r\n install(window.Vue);\r\n}\r\nexport default {\r\n // 导出的对象必须具备一个 install 方法\r\n install,\r\n VueAliplayerV2\r\n // 组件列表\r\n};\r\n","import Vue from 'vue';\r\nimport App from './App.vue';\r\nimport VueAliplayerV2 from '../packages';\r\nVue.use(VueAliplayerV2);\r\nVue.config.productionTip = false;\r\nnew Vue({\r\n render: h => h(App),\r\n}).$mount('#app');\r\n"],"sourceRoot":""} |