mirror of
https://github.com/langyuxiansheng/vue-aliplayer-v2.git
synced 2025-04-06 03:57:55 +08:00
Compare commits
No commits in common. "master" and "v1.2.5" have entirely different histories.
133
README.md
133
README.md
@ -1,17 +1,12 @@
|
||||
# vue-alipayer-v2
|
||||
|
||||
## 感谢每一位支持开源的朋友. 这是一个基于 Alipayer 开发并封装成 vue 组件的播放器.
|
||||
|
||||
## 感谢每一位开源的开发者. 这是一个基于Alipayer 开发并封装成vue组件的播放器.
|
||||
### vue中使用Alipayer,播放rtmp,m3u8,mp4视频
|
||||
|
||||
#### [本项目在线演示](https://langyuxiansheng.github.io/vue-aliplayer-v2/)
|
||||
|
||||
#### [阿里云播放器在线演示](https://player.alicdn.com/aliplayer/index.html)
|
||||
|
||||
> 假如此轮子对你有帮助,请顺手 star 一下吧.o(_ ̄︶ ̄_)o
|
||||
> 假如此轮子对你有帮助,请顺手star一下吧.o(* ̄︶ ̄*)o
|
||||
|
||||
## 1.安装使用! 下载安装npm包
|
||||
|
||||
```bash
|
||||
npm i vue-aliplayer-v2 --save
|
||||
or
|
||||
@ -21,7 +16,7 @@ yarn add vue-aliplayer-v2
|
||||
#### 全局注册 main.js
|
||||
|
||||
```javascript
|
||||
import VueAliplayerV2 from "vue-aliplayer-v2";
|
||||
import VueAliplayerV2 from 'vue-aliplayer-v2';
|
||||
|
||||
Vue.use(VueAliplayerV2);
|
||||
|
||||
@ -35,41 +30,28 @@ Vue.use(VueAliplayerV2);
|
||||
#### 局部注册 App.vue
|
||||
|
||||
```javascript
|
||||
|
||||
//推荐第一种(仅v1.2.3)及以上的版本可用
|
||||
import VueAliplayerV2 from "vue-aliplayer-v2";
|
||||
components: {
|
||||
VueAliplayerV2;
|
||||
}
|
||||
import VueAliplayerV2 from 'vue-aliplayer-v2';
|
||||
components:{ VueAliplayerV2 }
|
||||
|
||||
//或者
|
||||
components: {
|
||||
VueAliplayerV2: VueAliplayerV2.Player;
|
||||
}
|
||||
components:{ VueAliplayerV2: VueAliplayerV2.Player }
|
||||
|
||||
```
|
||||
|
||||
## 2.组件中使用
|
||||
|
||||
### 组件模板使用,下面的视频连接仅供演示测试.
|
||||
|
||||
```html
|
||||
<template>
|
||||
<div id="app">
|
||||
<template v-if="!isShowMultiple && show">
|
||||
<vue-aliplayer-v2
|
||||
:source="source"
|
||||
ref="VueAliplayerV2"
|
||||
:options="options"
|
||||
/>
|
||||
<vue-aliplayer-v2 :source="source" ref="VueAliplayerV2" :options="options" />
|
||||
</template>
|
||||
<div v-if="isShowMultiple && show" class="show-multiple">
|
||||
<template v-for="x in 5">
|
||||
<vue-aliplayer-v2
|
||||
class="multiple-player"
|
||||
:key="x"
|
||||
:source="source"
|
||||
ref="VueAliplayerV2"
|
||||
:options="options"
|
||||
/>
|
||||
<vue-aliplayer-v2 class="multiple-player" :key="x" :source="source" ref="VueAliplayerV2" :options="options" />
|
||||
</template>
|
||||
</div>
|
||||
<p class="remove-text" v-if="!show">播放器已销毁!</p>
|
||||
@ -82,32 +64,21 @@ components: {
|
||||
<span @click="getStatus()">获取播放器状态</span>
|
||||
</template>
|
||||
<span @click="show = !show">{{ show ? '销毁' : '重载' }}</span>
|
||||
<span @click="options.isLive = !options.isLive"
|
||||
>{{ options.isLive ? '切换普通模式' : '切换直播模式' }}</span
|
||||
>
|
||||
<span @click="showMultiple()"
|
||||
>{{isShowMultiple ? '显示1个播放器' : '显示多个播放器'}}</span
|
||||
>
|
||||
<span @click="options.isLive = !options.isLive">{{ options.isLive ? '切换普通模式' : '切换直播模式' }}</span>
|
||||
<span @click="showMultiple()">{{isShowMultiple ? '显示1个播放器' : '显示多个播放器'}}</span>
|
||||
</div>
|
||||
<div class="source-box">
|
||||
<span class="source-label">选择播放源(支持动态切换):</span>
|
||||
<select v-model="source" name="source" id="source">
|
||||
<option value="//player.alicdn.com/video/aliyunmedia.mp4"
|
||||
>播放源1</option
|
||||
>
|
||||
<option value="//yunqivedio.alicdn.com/user-upload/nXPDX8AASx.mp4"
|
||||
>播放源2</option
|
||||
>
|
||||
<option
|
||||
value="//tbm-auth.alicdn.com/e7qHgLdugbzzKh2eW0J/kXTgBkjvNXcERYxh2PA@@hd_hq.mp4?auth_key=1584519814-0-0-fc98b2738f331ff015f7bf5c62394888"
|
||||
>播放源3</option
|
||||
>
|
||||
<option value="//player.alicdn.com/video/aliyunmedia.mp4">播放源1</option>
|
||||
<option value="//yunqivedio.alicdn.com/user-upload/nXPDX8AASx.mp4">播放源2</option>
|
||||
<option value="//tbm-auth.alicdn.com/e7qHgLdugbzzKh2eW0J/kXTgBkjvNXcERYxh2PA@@hd_hq.mp4?auth_key=1584519814-0-0-fc98b2738f331ff015f7bf5c62394888">播放源3</option>
|
||||
<option value="//ivi.bupt.edu.cn/hls/cctv1.m3u8">直播播放源4</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="source-box">
|
||||
<span class="source-label">输入播放源(支持动态切换):</span>
|
||||
<input class="source-input" type="text" v-model="source" />
|
||||
<input class="source-input" type="text" v-model="source">
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -120,16 +91,17 @@ components: {
|
||||
isLive: true, //切换为直播流的时候必填
|
||||
// format: 'm3u8' //切换为直播流的时候必填
|
||||
},
|
||||
source: "//player.alicdn.com/video/aliyunmedia.mp4",
|
||||
source: '//player.alicdn.com/video/aliyunmedia.mp4',
|
||||
// source: '//ivi.bupt.edu.cn/hls/cctv1.m3u8',
|
||||
show: true,
|
||||
isShowMultiple: false,
|
||||
};
|
||||
isShowMultiple: false
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
|
||||
play(){
|
||||
this.$refs.VueAliplayerV2.play();
|
||||
this.$refs.VueAliplayerV2.play()
|
||||
},
|
||||
|
||||
pause(){
|
||||
@ -142,7 +114,7 @@ components: {
|
||||
|
||||
getCurrentTime(){
|
||||
// this.$refs.VueAliplayerV2.getCurrentTime();
|
||||
this.source = "http://ivi.bupt.edu.cn/hls/cctv1.m3u8";
|
||||
this.source = 'http://ivi.bupt.edu.cn/hls/cctv1.m3u8';
|
||||
},
|
||||
|
||||
getStatus(){
|
||||
@ -153,9 +125,9 @@ components: {
|
||||
|
||||
showMultiple(){
|
||||
this.isShowMultiple = !this.isShowMultiple;
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
* {
|
||||
@ -213,19 +185,12 @@ components: {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
```
|
||||
|
||||
```
|
||||
## 3.功能与配置
|
||||
|
||||
```javascript
|
||||
props:{
|
||||
|
||||
forbidFastForward: { //禁止拖拽快进
|
||||
required: false,
|
||||
type: [Boolean],
|
||||
default: false
|
||||
},
|
||||
|
||||
options: { //配置项 (options.source 不支持动态切换,需要动态切换请直接使用source)
|
||||
required: false,
|
||||
type: [Object],
|
||||
@ -241,22 +206,20 @@ props:{
|
||||
cssLink:{ //css版本源
|
||||
required: false,
|
||||
type: [String],
|
||||
default: `https://g.alicdn.com/de/prismplayer/2.9.7/skins/default/aliplayer-min.css`
|
||||
default: `https://g.alicdn.com/de/prismplayer/2.9.0/skins/default/aliplayer-min.css`
|
||||
},
|
||||
scriptSrc:{ //js版本源
|
||||
required: false,
|
||||
type: [String],
|
||||
default: `https://g.alicdn.com/de/prismplayer/2.9.7/aliplayer-min.js`
|
||||
default: `https://g.alicdn.com/de/prismplayer/2.9.0/aliplayer-min.js`
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 3.1 配置项 options 属性
|
||||
|
||||
可以参考 [属性和接口说明](https://help.aliyun.com/document_detail/125572.html?spm=a2c4g.11186623.6.1085.36fc6fc57WKZ5P)
|
||||
|
||||
| 名称 | 类型 | 说明 |
|
||||
| :----------------------- | :-----------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| :- | :-: | :- |
|
||||
| source | String | 视频播放地址url:单独url。默认状态,表示使用vid+playauth。source播放方式优先级最高。source支持多清晰度设置:source:’{“HD”:”address1”,”SD”:”address2”’,详情参见多清晰度播放。 |
|
||||
| vid | String | 媒体转码服务的媒体Id。 |
|
||||
| playauth | String | 播放权证,如何得到参见获取playauth。 |
|
||||
@ -317,16 +280,14 @@ props:{
|
||||
| liveRetry | int | 直播播放失败重试次数,默认5次 |
|
||||
|
||||
### 3.2 播放器方法
|
||||
|
||||
```javascript
|
||||
// 暂停播放
|
||||
this.$refs.VueAliplayerV2.pause();
|
||||
```
|
||||
|
||||
可以参考 [播放器接口方法](https://help.aliyun.com/document_detail/125572.html?spm=a2c4g.11186623.6.1085.36fc6fc57WKZ5P#h2-u64ADu653Eu5668u63A5u53E32)
|
||||
|
||||
| 名称 | 参数 | 说明 |
|
||||
| :--------------------- | :------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| :- | :- | :- |
|
||||
| play | - | 播放视频。 |
|
||||
| pause | - | 暂停视频。 |
|
||||
| replay | - | 重播视频。 |
|
||||
@ -372,16 +333,15 @@ this.$refs.VueAliplayerV2.pause();
|
||||
*/
|
||||
handleReady(e){
|
||||
console.log(`ready`,e);
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
```
|
||||
|
||||
可以参考 [播放器事件](https://help.aliyun.com/document_detail/125572.html?spm=a2c4g.11186623.6.1085.36fc6fc57WKZ5P#h2-u64ADu653Eu5668u4E8Bu4EF63)
|
||||
|
||||
| 名称 | 说明 |
|
||||
| :---------------- | :--------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| :- | :- |
|
||||
| ready | 播放器视频初始化按钮渲染完毕。播放器UI初始设置需要此事件后触发,避免UI被初始化所覆盖。播放器提供的方法需要在此事件发生后才可以调用。 |
|
||||
| play | 视频由暂停恢复为播放时触发。 |
|
||||
| pause | 视频暂停时触发。 |
|
||||
@ -402,12 +362,10 @@ this.$refs.VueAliplayerV2.pause();
|
||||
| completeSeek | 完成拖拽,参数返回拖拽点的时间。 |
|
||||
|
||||
---
|
||||
|
||||
## 5. 图片展示
|
||||
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
## 6.二次开发 下载项目
|
||||
@ -417,7 +375,6 @@ git clone https://github.com/langyuxiansheng/vue-aliplayer-v2.git
|
||||
```
|
||||
|
||||
## Project setup
|
||||
|
||||
```bash
|
||||
cd vue-aliplayer-v2
|
||||
|
||||
@ -425,57 +382,36 @@ npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
|
||||
```bash
|
||||
npm run lint
|
||||
```
|
||||
|
||||
## 7.缺陷 & 后期计划
|
||||
|
||||
> 2019年12月27日 更新优化局部引用方式
|
||||
|
||||
> 您有功能建议,或者bug反馈请留言.
|
||||
|
||||
## 8.感谢
|
||||
|
||||
---
|
||||
|
||||
- vue-aliplayer 的作者,项目地址:https://github.com/slacrey/vue-aliplayer
|
||||
|
||||
- Alipayer 阿里云的开源播放器 https://help.aliyun.com/document_detail/125572.html?spm=a2c4g.11186623.6.1085.36fc6fc57WKZ5P#h2-u64ADu653Eu5668u4E8Bu4EF63
|
||||
|
||||
### Customize configuration
|
||||
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
|
||||
## 更新日志
|
||||
|
||||
> v1.3.0 修复部分已知bug,增加forbidFastForward 属性,感谢 "william-xue"网友的功能提交.
|
||||
|
||||
- sdk 版本更新,默认 SDK 版本由 2.9.3 更新为 2.9.20
|
||||
- 默认注释更新
|
||||
- 增加禁止用户拖拽快进的属性选项 forbidFastForward [Boolean] 默认 false
|
||||
|
||||
> v1.2.9 修正部分默认属性, 感谢"Schean17"网友的反馈与建议.
|
||||
|
||||
> v1.2.8 更换底层默认 sdk 版本为 2.9.3 修复 options 遇到 update loop 错误 感谢"litmonw"网友的反馈与建议.
|
||||
|
||||
> v1.2.7 更换底层默认 sdk 版本为 2.9.1 的版本. 更新线上演示 demo 的选项
|
||||
|
||||
> v1.2.6 优化 beforeDestroy() 部分的代码.
|
||||
|
||||
> v1.2.5 更换默认的播放器SDK版本2.8.2 => 2.9.0,2.8.2的版本存在多个播放器同时播放直播流异常的bug,增加了全局SDK版本配置,可以在Vue.use()的时候进行配置.
|
||||
|
||||
> v1.2.4 修复多个播放器加载,只初始化一个播放器的bug.文档部分更新,增加了问题栏. 感谢"沙洲ad"的反馈与建议.
|
||||
@ -497,7 +433,6 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
> v1.1.6 修复部分已知bug和优化局部的引用方式
|
||||
|
||||
---
|
||||
|
||||
## 其它问题
|
||||
|
||||
1. IOS 或者其它设备无法全屏播放,或者点击全屏按钮的时候也只是显示竖屏?
|
||||
|
@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<template v-if="!isShowMultiple && show">
|
||||
<vue-aliplayer-v2 :source="source" ref="VueAliplayerV2" :options="options"
|
||||
:forbidFastForward="forbidFastForward"
|
||||
/>
|
||||
<vue-aliplayer-v2 :source="source" ref="VueAliplayerV2" :options="options" />
|
||||
</template>
|
||||
<div v-if="isShowMultiple && show" class="show-multiple">
|
||||
<template v-for="x in 5">
|
||||
@ -13,13 +11,11 @@
|
||||
<p class="remove-text" v-if="!show">播放器已销毁!</p>
|
||||
<div class="player-btns">
|
||||
<template v-if="!isShowMultiple && show">
|
||||
|
||||
<span @click="play()">播放</span>
|
||||
<span @click="pause()">暂停</span>
|
||||
<span @click="replay()">重播</span>
|
||||
<span @click="getCurrentTime()">播放时刻</span>
|
||||
<span @click="getStatus()">获取播放器状态</span>
|
||||
<span @click="handlerForbidFastForward()">禁止快进</span>
|
||||
</template>
|
||||
<span @click="show = !show">{{ show ? '销毁' : '重载' }}</span>
|
||||
<span @click="options.isLive = !options.isLive">{{ options.isLive ? '切换普通模式' : '切换直播模式' }}</span>
|
||||
@ -38,20 +34,6 @@
|
||||
<span class="source-label">输入播放源(支持动态切换):</span>
|
||||
<input class="source-input" type="text" v-model="source">
|
||||
</div>
|
||||
<div class="source-box">
|
||||
<span class="source-label">指定为flash:</span>
|
||||
<select v-model="options.useFlashPrism">
|
||||
<option :value="true">是</option>
|
||||
<option :value="false">否</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="source-box">
|
||||
<span class="source-label">禁止用户拖动(仅flash有效):</span>
|
||||
<select v-model="options.disableSeek">
|
||||
<option :value="true">是</option>
|
||||
<option :value="false">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -62,51 +44,13 @@ export default {
|
||||
return {
|
||||
options: {
|
||||
// source:'//player.alicdn.com/video/aliyunmedia.mp4',
|
||||
isLive: !true, //切换为直播流的时候必填
|
||||
// skinLayout: [
|
||||
// {
|
||||
// 'name': 'bigPlayButton',
|
||||
// 'align': 'blabs',
|
||||
// 'x': 30,
|
||||
// 'y': 80
|
||||
// },
|
||||
// {
|
||||
// 'name': 'infoDisplay'
|
||||
// },
|
||||
// {
|
||||
// 'name': 'controlBar',
|
||||
// 'align': 'blabs',
|
||||
// 'x': 0,
|
||||
// 'y': 0,
|
||||
// 'children': [
|
||||
// {
|
||||
// 'name': 'liveDisplay',
|
||||
// 'align': 'tlabs',
|
||||
// 'x': 15,
|
||||
// 'y': 6
|
||||
// },
|
||||
// {
|
||||
// 'name': 'fullScreenButton',
|
||||
// 'align': 'tr',
|
||||
// 'x': 10,
|
||||
// 'y': 10
|
||||
// },
|
||||
// {
|
||||
// 'name': 'volume',
|
||||
// 'align': 'tr',
|
||||
// 'x': 5,
|
||||
// 'y': 10
|
||||
// }
|
||||
// ]
|
||||
// }]
|
||||
// useFlashPrism: false, //指定为flash
|
||||
// disableSeek: true //禁用进度条的Seek,默认值为false
|
||||
isLive: true, //切换为直播流的时候必填
|
||||
// format: 'm3u8' //切换为直播流的时候必填
|
||||
},
|
||||
source: '//player.alicdn.com/video/aliyunmedia.mp4',
|
||||
// source: '//ivi.bupt.edu.cn/hls/cctv1.m3u8',
|
||||
show: true,
|
||||
forbidFastForward: false,
|
||||
isShowMultiple: false,
|
||||
isShowMultiple: false
|
||||
}
|
||||
},
|
||||
|
||||
@ -123,11 +67,6 @@ export default {
|
||||
replay(){
|
||||
this.$refs.VueAliplayerV2.replay();
|
||||
},
|
||||
handlerForbidFastForward () {
|
||||
|
||||
this.forbidFastForward = true
|
||||
|
||||
},
|
||||
|
||||
getCurrentTime(){
|
||||
// this.$refs.VueAliplayerV2.getCurrentTime();
|
||||
@ -185,7 +124,7 @@ export default {
|
||||
}
|
||||
.source-box{
|
||||
padding: 5px 10px;
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 20px;
|
||||
.source-label{
|
||||
margin-right: 20px;
|
||||
font-size: 16px;
|
||||
|
23
gh-page.sh
23
gh-page.sh
@ -1,23 +0,0 @@
|
||||
echo "打包 => dist";
|
||||
|
||||
npm run build;
|
||||
|
||||
echo "更新gh-pages";
|
||||
|
||||
git branch -D gh-pages;
|
||||
|
||||
echo "删除gh-pages";
|
||||
|
||||
git checkout -b gh-pages;
|
||||
|
||||
echo "创建并切换到gh-pages";
|
||||
|
||||
git add -f dist;
|
||||
|
||||
git commit -m 'create gh-pages';
|
||||
|
||||
git push origin -d gh-pages;
|
||||
|
||||
git subtree push --prefix dist origin gh-pages;
|
||||
|
||||
echo "已推送gh-pages";
|
@ -142,29 +142,16 @@ if (typeof window !== 'undefined') {
|
||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.function.name.js
|
||||
var es6_function_name = __webpack_require__("7cfd");
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./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??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=c8a41478&
|
||||
// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./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??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc&
|
||||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.playerId}})}
|
||||
var staticRenderFns = []
|
||||
|
||||
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=c8a41478&
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc&
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/_@babel_runtime@7.7.2@@babel/runtime/helpers/esm/typeof.js
|
||||
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
|
||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/web.dom.iterable.js
|
||||
var web_dom_iterable = __webpack_require__("4634");
|
||||
|
||||
function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
|
||||
_typeof = function _typeof(obj) {
|
||||
return _typeof2(obj);
|
||||
};
|
||||
} else {
|
||||
_typeof = function _typeof(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.regexp.to-string.js
|
||||
var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
|
||||
@ -177,12 +164,6 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
/* harmony default export */ var AliplayerV2vue_type_script_lang_js_ = ({
|
||||
name: 'VueAliplayerV2',
|
||||
props: {
|
||||
forbidFastForward: {
|
||||
//禁止拖拽快进
|
||||
required: false,
|
||||
type: [Boolean],
|
||||
default: false
|
||||
},
|
||||
options: {
|
||||
//配置项
|
||||
required: false,
|
||||
@ -201,13 +182,13 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
//css版本源
|
||||
required: false,
|
||||
type: [String],
|
||||
default: "https://g.alicdn.com/de/prismplayer/2.9.20/skins/default/aliplayer-min.css"
|
||||
default: "https://g.alicdn.com/de/prismplayer/2.9.0/skins/default/aliplayer-min.css"
|
||||
},
|
||||
scriptSrc: {
|
||||
//js版本源
|
||||
required: false,
|
||||
type: [String],
|
||||
default: "https://g.alicdn.com/de/prismplayer/2.9.20/aliplayer-min.js"
|
||||
default: "https://g.alicdn.com/de/prismplayer/2.9.0/aliplayer-min.js"
|
||||
}
|
||||
},
|
||||
data: function data() {
|
||||
@ -310,9 +291,6 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
//监听播放源变化
|
||||
this.init();
|
||||
},
|
||||
forbidFastForward: function forbidFastForward() {
|
||||
this.init();
|
||||
},
|
||||
options: {
|
||||
//配置项是对象,只能深度监听
|
||||
handler: function handler() {
|
||||
@ -337,8 +315,6 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
handlerFastForward: function handlerFastForward() {},
|
||||
|
||||
/**
|
||||
* 创建script和css
|
||||
* 加载Alipayer的SDK
|
||||
@ -346,8 +322,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
init: function init() {
|
||||
var _this3 = this;
|
||||
|
||||
var linkID = 'app__aliplayer-min-css';
|
||||
var scriptID = 'app__aliplayer-min-js';
|
||||
var linkID = 'aliplayer-min-css';
|
||||
var scriptID = 'aliplayer-min-js';
|
||||
var head = document.getElementsByTagName('head');
|
||||
var html = document.getElementsByTagName('html');
|
||||
var scriptTag = document.getElementById(scriptID);
|
||||
@ -359,8 +335,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = this.cssLink;
|
||||
link.id = linkID; // link.className = linkID;
|
||||
|
||||
link.id = linkID;
|
||||
head[0].appendChild(link);
|
||||
}
|
||||
|
||||
@ -368,8 +343,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
// console.log('scriptTag');
|
||||
scriptTag = document.createElement('script');
|
||||
scriptTag.type = "text/javascript";
|
||||
scriptTag.id = scriptID; // scriptTag.className = scriptID;
|
||||
|
||||
scriptTag.id = scriptID;
|
||||
scriptTag.src = this.scriptSrc;
|
||||
html[0].appendChild(scriptTag);
|
||||
} else {
|
||||
@ -390,7 +364,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
var _this4 = this;
|
||||
|
||||
if (typeof window.Aliplayer != 'undefined') {
|
||||
var options = this.deepCloneObject(this.options);
|
||||
var options = this.options;
|
||||
|
||||
if (options) {
|
||||
for (var key in options) {
|
||||
@ -415,25 +389,6 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
|
||||
for (var ev in this.events) {
|
||||
_loop(ev);
|
||||
} //开启禁止拖拽快进
|
||||
|
||||
|
||||
if (this.forbidFastForward) {
|
||||
var last = 0,
|
||||
max_time = 0;
|
||||
this.player.on('timeupdate', function () {
|
||||
var current = this.getCurrentTime();
|
||||
|
||||
if (current - last > 2) {
|
||||
this.seek(last);
|
||||
} else {
|
||||
last = current;
|
||||
|
||||
if (last >= max_time) {
|
||||
max_time = last;
|
||||
}
|
||||
}
|
||||
});
|
||||
} //通过播放器实例的off方法取消订阅
|
||||
//player.off('ready',handleReady);
|
||||
|
||||
@ -713,45 +668,18 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
*/
|
||||
off: function off(ev, handle) {
|
||||
this.player && this.player.off(ev, handle);
|
||||
},
|
||||
|
||||
/**
|
||||
* 深度拷贝
|
||||
* @param {*} obj
|
||||
*/
|
||||
deepCloneObject: function deepCloneObject(obj) {
|
||||
var objClone = Array.isArray(obj) ? [] : {};
|
||||
|
||||
if (obj && _typeof(obj) === 'object') {
|
||||
for (var key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
//判断ojb子元素是否为对象,如果是,递归复制
|
||||
if (obj[key] && _typeof(obj[key]) === 'object') {
|
||||
objClone[key] = this.deepCloneObject(obj[key]);
|
||||
} else {
|
||||
//如果不是,简单复制
|
||||
objClone[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return objClone;
|
||||
}
|
||||
},
|
||||
beforeDestroy: function beforeDestroy() {
|
||||
//防止重复创建
|
||||
this.dispose(); //销毁播放器(防止直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的bug)
|
||||
// const head = document.querySelector('head');
|
||||
// const cssNodes = document.querySelectorAll(`link.app__aliplayer-min-css`);
|
||||
// (html && cssNodes.length > 1) && cssNodes.forEach((item, index)=>{
|
||||
// if(index != 0) head.removeChild(item);
|
||||
// });
|
||||
// const html = document.querySelector('html');
|
||||
// const jsNodes = document.querySelectorAll(`script.app__aliplayer-min-js`);
|
||||
// (html && jsNodes.length > 1) && jsNodes.forEach((item, index)=>{
|
||||
// if(index != 0) html.removeChild(item);
|
||||
// });
|
||||
|
||||
var head = document.querySelector('head'); //移除所有的重复创建的标签
|
||||
|
||||
var nodes = document.querySelectorAll('script[src="https://g.alicdn.com/de/prismplayer/2.8.2/hls/aliplayer-hls-min.js"]');
|
||||
head && nodes.forEach(function (item) {
|
||||
head.removeChild(item);
|
||||
});
|
||||
}
|
||||
});
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=script&lang=js&
|
||||
@ -892,6 +820,113 @@ AliplayerV2.Player = AliplayerV2;
|
||||
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "1277":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var store = __webpack_require__("f341")('wks');
|
||||
var uid = __webpack_require__("4d2c");
|
||||
var Symbol = __webpack_require__("3f8b").Symbol;
|
||||
var USE_SYMBOL = typeof Symbol == 'function';
|
||||
|
||||
var $exports = module.exports = function (name) {
|
||||
return store[name] || (store[name] =
|
||||
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
|
||||
};
|
||||
|
||||
$exports.store = store;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "17cb":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var document = __webpack_require__("3f8b").document;
|
||||
module.exports = document && document.documentElement;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "1f9e":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// false -> Array#indexOf
|
||||
// true -> Array#includes
|
||||
var toIObject = __webpack_require__("6117");
|
||||
var toLength = __webpack_require__("8941");
|
||||
var toAbsoluteIndex = __webpack_require__("c3a9");
|
||||
module.exports = function (IS_INCLUDES) {
|
||||
return function ($this, el, fromIndex) {
|
||||
var O = toIObject($this);
|
||||
var length = toLength(O.length);
|
||||
var index = toAbsoluteIndex(fromIndex, length);
|
||||
var value;
|
||||
// Array#includes uses SameValueZero equality algorithm
|
||||
// eslint-disable-next-line no-self-compare
|
||||
if (IS_INCLUDES && el != el) while (length > index) {
|
||||
value = O[index++];
|
||||
// eslint-disable-next-line no-self-compare
|
||||
if (value != value) return true;
|
||||
// Array#indexOf ignores holes, Array#includes - not
|
||||
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
|
||||
if (O[index] === el) return IS_INCLUDES || index || 0;
|
||||
} return !IS_INCLUDES && -1;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "2498":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var global = __webpack_require__("3f8b");
|
||||
var core = __webpack_require__("da27");
|
||||
var hide = __webpack_require__("b8ea");
|
||||
var redefine = __webpack_require__("a6d5");
|
||||
var ctx = __webpack_require__("e85e");
|
||||
var PROTOTYPE = 'prototype';
|
||||
|
||||
var $export = function (type, name, source) {
|
||||
var IS_FORCED = type & $export.F;
|
||||
var IS_GLOBAL = type & $export.G;
|
||||
var IS_STATIC = type & $export.S;
|
||||
var IS_PROTO = type & $export.P;
|
||||
var IS_BIND = type & $export.B;
|
||||
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
|
||||
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
|
||||
var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
|
||||
var key, own, out, exp;
|
||||
if (IS_GLOBAL) source = name;
|
||||
for (key in source) {
|
||||
// contains in native
|
||||
own = !IS_FORCED && target && target[key] !== undefined;
|
||||
// export native or passed
|
||||
out = (own ? target : source)[key];
|
||||
// bind timers to global for call from export context
|
||||
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
||||
// extend global
|
||||
if (target) redefine(target, key, out, type & $export.U);
|
||||
// export
|
||||
if (exports[key] != out) hide(exports, key, exp);
|
||||
if (IS_PROTO && expProto[key] != out) expProto[key] = out;
|
||||
}
|
||||
};
|
||||
global.core = core;
|
||||
// type bitmap
|
||||
$export.F = 1; // forced
|
||||
$export.G = 2; // global
|
||||
$export.S = 4; // static
|
||||
$export.P = 8; // proto
|
||||
$export.B = 16; // bind
|
||||
$export.W = 32; // wrap
|
||||
$export.U = 64; // safe
|
||||
$export.R = 128; // real proto method for `library`
|
||||
module.exports = $export;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "25ae":
|
||||
@ -921,6 +956,32 @@ module.exports = function (it, S) {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "3038":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// 7.2.1 RequireObjectCoercible(argument)
|
||||
module.exports = function (it) {
|
||||
if (it == undefined) throw TypeError("Can't call method on " + it);
|
||||
return it;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "3d87":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var def = __webpack_require__("d3d8").f;
|
||||
var has = __webpack_require__("549d");
|
||||
var TAG = __webpack_require__("1277")('toStringTag');
|
||||
|
||||
module.exports = function (it, tag, stat) {
|
||||
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "3f8b":
|
||||
@ -934,6 +995,148 @@ var global = module.exports = typeof window != 'undefined' && window.Math == Mat
|
||||
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "4634":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var $iterators = __webpack_require__("96dd");
|
||||
var getKeys = __webpack_require__("7d56");
|
||||
var redefine = __webpack_require__("a6d5");
|
||||
var global = __webpack_require__("3f8b");
|
||||
var hide = __webpack_require__("b8ea");
|
||||
var Iterators = __webpack_require__("e3b3");
|
||||
var wks = __webpack_require__("1277");
|
||||
var ITERATOR = wks('iterator');
|
||||
var TO_STRING_TAG = wks('toStringTag');
|
||||
var ArrayValues = Iterators.Array;
|
||||
|
||||
var DOMIterables = {
|
||||
CSSRuleList: true, // TODO: Not spec compliant, should be false.
|
||||
CSSStyleDeclaration: false,
|
||||
CSSValueList: false,
|
||||
ClientRectList: false,
|
||||
DOMRectList: false,
|
||||
DOMStringList: false,
|
||||
DOMTokenList: true,
|
||||
DataTransferItemList: false,
|
||||
FileList: false,
|
||||
HTMLAllCollection: false,
|
||||
HTMLCollection: false,
|
||||
HTMLFormElement: false,
|
||||
HTMLSelectElement: false,
|
||||
MediaList: true, // TODO: Not spec compliant, should be false.
|
||||
MimeTypeArray: false,
|
||||
NamedNodeMap: false,
|
||||
NodeList: true,
|
||||
PaintRequestList: false,
|
||||
Plugin: false,
|
||||
PluginArray: false,
|
||||
SVGLengthList: false,
|
||||
SVGNumberList: false,
|
||||
SVGPathSegList: false,
|
||||
SVGPointList: false,
|
||||
SVGStringList: false,
|
||||
SVGTransformList: false,
|
||||
SourceBufferList: false,
|
||||
StyleSheetList: true, // TODO: Not spec compliant, should be false.
|
||||
TextTrackCueList: false,
|
||||
TextTrackList: false,
|
||||
TouchList: false
|
||||
};
|
||||
|
||||
for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
|
||||
var NAME = collections[i];
|
||||
var explicit = DOMIterables[NAME];
|
||||
var Collection = global[NAME];
|
||||
var proto = Collection && Collection.prototype;
|
||||
var key;
|
||||
if (proto) {
|
||||
if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
|
||||
if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
|
||||
Iterators[NAME] = ArrayValues;
|
||||
if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "4aef":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var LIBRARY = __webpack_require__("6cc2");
|
||||
var $export = __webpack_require__("2498");
|
||||
var redefine = __webpack_require__("a6d5");
|
||||
var hide = __webpack_require__("b8ea");
|
||||
var Iterators = __webpack_require__("e3b3");
|
||||
var $iterCreate = __webpack_require__("c264");
|
||||
var setToStringTag = __webpack_require__("3d87");
|
||||
var getPrototypeOf = __webpack_require__("d15b");
|
||||
var ITERATOR = __webpack_require__("1277")('iterator');
|
||||
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
|
||||
var FF_ITERATOR = '@@iterator';
|
||||
var KEYS = 'keys';
|
||||
var VALUES = 'values';
|
||||
|
||||
var returnThis = function () { return this; };
|
||||
|
||||
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
|
||||
$iterCreate(Constructor, NAME, next);
|
||||
var getMethod = function (kind) {
|
||||
if (!BUGGY && kind in proto) return proto[kind];
|
||||
switch (kind) {
|
||||
case KEYS: return function keys() { return new Constructor(this, kind); };
|
||||
case VALUES: return function values() { return new Constructor(this, kind); };
|
||||
} return function entries() { return new Constructor(this, kind); };
|
||||
};
|
||||
var TAG = NAME + ' Iterator';
|
||||
var DEF_VALUES = DEFAULT == VALUES;
|
||||
var VALUES_BUG = false;
|
||||
var proto = Base.prototype;
|
||||
var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
|
||||
var $default = $native || getMethod(DEFAULT);
|
||||
var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
|
||||
var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
|
||||
var methods, key, IteratorPrototype;
|
||||
// Fix native
|
||||
if ($anyNative) {
|
||||
IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
|
||||
if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
|
||||
// Set @@toStringTag to native iterators
|
||||
setToStringTag(IteratorPrototype, TAG, true);
|
||||
// fix for some old engines
|
||||
if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
|
||||
}
|
||||
}
|
||||
// fix Array#{values, @@iterator}.name in V8 / FF
|
||||
if (DEF_VALUES && $native && $native.name !== VALUES) {
|
||||
VALUES_BUG = true;
|
||||
$default = function values() { return $native.call(this); };
|
||||
}
|
||||
// Define iterator
|
||||
if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
|
||||
hide(proto, ITERATOR, $default);
|
||||
}
|
||||
// Plug for library
|
||||
Iterators[NAME] = $default;
|
||||
Iterators[TAG] = returnThis;
|
||||
if (DEFAULT) {
|
||||
methods = {
|
||||
values: DEF_VALUES ? $default : getMethod(VALUES),
|
||||
keys: IS_SET ? $default : getMethod(KEYS),
|
||||
entries: $entries
|
||||
};
|
||||
if (FORCED) for (key in methods) {
|
||||
if (!(key in proto)) redefine(proto, key, methods[key]);
|
||||
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
|
||||
}
|
||||
return methods;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "4d2c":
|
||||
@ -957,6 +1160,79 @@ module.exports = function (it, key) {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "6077":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var toString = {}.toString;
|
||||
|
||||
module.exports = function (it) {
|
||||
return toString.call(it).slice(8, -1);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "6117":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
||||
var IObject = __webpack_require__("9952");
|
||||
var defined = __webpack_require__("3038");
|
||||
module.exports = function (it) {
|
||||
return IObject(defined(it));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "65c3":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
||||
var anObject = __webpack_require__("8cac");
|
||||
var dPs = __webpack_require__("8d69");
|
||||
var enumBugKeys = __webpack_require__("d93f");
|
||||
var IE_PROTO = __webpack_require__("9947")('IE_PROTO');
|
||||
var Empty = function () { /* empty */ };
|
||||
var PROTOTYPE = 'prototype';
|
||||
|
||||
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
||||
var createDict = function () {
|
||||
// Thrash, waste and sodomy: IE GC bug
|
||||
var iframe = __webpack_require__("6618")('iframe');
|
||||
var i = enumBugKeys.length;
|
||||
var lt = '<';
|
||||
var gt = '>';
|
||||
var iframeDocument;
|
||||
iframe.style.display = 'none';
|
||||
__webpack_require__("17cb").appendChild(iframe);
|
||||
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
||||
// createDict = iframe.contentWindow.Object;
|
||||
// html.removeChild(iframe);
|
||||
iframeDocument = iframe.contentWindow.document;
|
||||
iframeDocument.open();
|
||||
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
||||
iframeDocument.close();
|
||||
createDict = iframeDocument.F;
|
||||
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
||||
return createDict();
|
||||
};
|
||||
|
||||
module.exports = Object.create || function create(O, Properties) {
|
||||
var result;
|
||||
if (O !== null) {
|
||||
Empty[PROTOTYPE] = anObject(O);
|
||||
result = new Empty();
|
||||
Empty[PROTOTYPE] = null;
|
||||
// add "__proto__" for Object.getPrototypeOf polyfill
|
||||
result[IE_PROTO] = O;
|
||||
} else result = createDict();
|
||||
return Properties === undefined ? result : dPs(result, Properties);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "6618":
|
||||
@ -987,6 +1263,30 @@ module.exports = false;
|
||||
module.exports = __webpack_require__("f341")('native-function-to-string', Function.toString);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "7afe":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var has = __webpack_require__("549d");
|
||||
var toIObject = __webpack_require__("6117");
|
||||
var arrayIndexOf = __webpack_require__("1f9e")(false);
|
||||
var IE_PROTO = __webpack_require__("9947")('IE_PROTO');
|
||||
|
||||
module.exports = function (object, names) {
|
||||
var O = toIObject(object);
|
||||
var i = 0;
|
||||
var result = [];
|
||||
var key;
|
||||
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
|
||||
// Don't enum bug & hidden keys
|
||||
while (names.length > i) if (has(O, key = names[i++])) {
|
||||
~arrayIndexOf(result, key) || result.push(key);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "7cfd":
|
||||
@ -1010,6 +1310,44 @@ NAME in FProto || __webpack_require__("f9a5") && dP(FProto, NAME, {
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "7d56":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
||||
var $keys = __webpack_require__("7afe");
|
||||
var enumBugKeys = __webpack_require__("d93f");
|
||||
|
||||
module.exports = Object.keys || function keys(O) {
|
||||
return $keys(O, enumBugKeys);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "8451":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function (it) {
|
||||
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
|
||||
return it;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "8941":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 7.1.15 ToLength
|
||||
var toInteger = __webpack_require__("a6ad");
|
||||
var min = Math.min;
|
||||
module.exports = function (it) {
|
||||
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "8cac":
|
||||
@ -1022,6 +1360,93 @@ module.exports = function (it) {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "8d69":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var dP = __webpack_require__("d3d8");
|
||||
var anObject = __webpack_require__("8cac");
|
||||
var getKeys = __webpack_require__("7d56");
|
||||
|
||||
module.exports = __webpack_require__("f9a5") ? Object.defineProperties : function defineProperties(O, Properties) {
|
||||
anObject(O);
|
||||
var keys = getKeys(Properties);
|
||||
var length = keys.length;
|
||||
var i = 0;
|
||||
var P;
|
||||
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
|
||||
return O;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "96dd":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var addToUnscopables = __webpack_require__("ab19");
|
||||
var step = __webpack_require__("c8e9");
|
||||
var Iterators = __webpack_require__("e3b3");
|
||||
var toIObject = __webpack_require__("6117");
|
||||
|
||||
// 22.1.3.4 Array.prototype.entries()
|
||||
// 22.1.3.13 Array.prototype.keys()
|
||||
// 22.1.3.29 Array.prototype.values()
|
||||
// 22.1.3.30 Array.prototype[@@iterator]()
|
||||
module.exports = __webpack_require__("4aef")(Array, 'Array', function (iterated, kind) {
|
||||
this._t = toIObject(iterated); // target
|
||||
this._i = 0; // next index
|
||||
this._k = kind; // kind
|
||||
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
|
||||
}, function () {
|
||||
var O = this._t;
|
||||
var kind = this._k;
|
||||
var index = this._i++;
|
||||
if (!O || index >= O.length) {
|
||||
this._t = undefined;
|
||||
return step(1);
|
||||
}
|
||||
if (kind == 'keys') return step(0, index);
|
||||
if (kind == 'values') return step(0, O[index]);
|
||||
return step(0, [index, O[index]]);
|
||||
}, 'values');
|
||||
|
||||
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
|
||||
Iterators.Arguments = Iterators.Array;
|
||||
|
||||
addToUnscopables('keys');
|
||||
addToUnscopables('values');
|
||||
addToUnscopables('entries');
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "9947":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var shared = __webpack_require__("f341")('keys');
|
||||
var uid = __webpack_require__("4d2c");
|
||||
module.exports = function (key) {
|
||||
return shared[key] || (shared[key] = uid(key));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "9952":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
||||
var cof = __webpack_require__("6077");
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
||||
return cof(it) == 'String' ? it.split('') : Object(it);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "9f7e":
|
||||
@ -1034,6 +1459,19 @@ if (__webpack_require__("f9a5") && /./g.flags != 'g') __webpack_require__("d3d8"
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "a6ad":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// 7.1.4 ToInteger
|
||||
var ceil = Math.ceil;
|
||||
var floor = Math.floor;
|
||||
module.exports = function (it) {
|
||||
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "a6d5":
|
||||
@ -1072,6 +1510,32 @@ __webpack_require__("da27").inspectSource = function (it) {
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "a9cf":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 7.1.13 ToObject(argument)
|
||||
var defined = __webpack_require__("3038");
|
||||
module.exports = function (it) {
|
||||
return Object(defined(it));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "ab19":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 22.1.3.31 Array.prototype[@@unscopables]
|
||||
var UNSCOPABLES = __webpack_require__("1277")('unscopables');
|
||||
var ArrayProto = Array.prototype;
|
||||
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("b8ea")(ArrayProto, UNSCOPABLES, {});
|
||||
module.exports = function (key) {
|
||||
ArrayProto[UNSCOPABLES][key] = true;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "b8ea":
|
||||
@ -1087,6 +1551,51 @@ module.exports = __webpack_require__("f9a5") ? function (object, key, value) {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "c264":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var create = __webpack_require__("65c3");
|
||||
var descriptor = __webpack_require__("0614");
|
||||
var setToStringTag = __webpack_require__("3d87");
|
||||
var IteratorPrototype = {};
|
||||
|
||||
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
||||
__webpack_require__("b8ea")(IteratorPrototype, __webpack_require__("1277")('iterator'), function () { return this; });
|
||||
|
||||
module.exports = function (Constructor, NAME, next) {
|
||||
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
|
||||
setToStringTag(Constructor, NAME + ' Iterator');
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "c3a9":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var toInteger = __webpack_require__("a6ad");
|
||||
var max = Math.max;
|
||||
var min = Math.min;
|
||||
module.exports = function (index, length) {
|
||||
index = toInteger(index);
|
||||
return index < 0 ? max(index + length, 0) : min(index, length);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "c8e9":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function (done, value) {
|
||||
return { value: value, done: !!done };
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "cc1d":
|
||||
@ -1120,6 +1629,26 @@ if (__webpack_require__("0cc1")(function () { return $toString.call({ source: 'a
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "d15b":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
|
||||
var has = __webpack_require__("549d");
|
||||
var toObject = __webpack_require__("a9cf");
|
||||
var IE_PROTO = __webpack_require__("9947")('IE_PROTO');
|
||||
var ObjectProto = Object.prototype;
|
||||
|
||||
module.exports = Object.getPrototypeOf || function (O) {
|
||||
O = toObject(O);
|
||||
if (has(O, IE_PROTO)) return O[IE_PROTO];
|
||||
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
||||
return O.constructor.prototype;
|
||||
} return O instanceof Object ? ObjectProto : null;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "d3d8":
|
||||
@ -1143,6 +1672,17 @@ exports.f = __webpack_require__("f9a5") ? Object.defineProperty : function defin
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "d93f":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// IE 8- don't enum bug keys
|
||||
module.exports = (
|
||||
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
||||
).split(',');
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "da0b":
|
||||
@ -1162,6 +1702,14 @@ var core = module.exports = { version: '2.6.10' };
|
||||
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "e3b3":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = {};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "e67d":
|
||||
@ -1226,6 +1774,33 @@ module.exports = function () {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "e85e":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// optional / simple context binding
|
||||
var aFunction = __webpack_require__("8451");
|
||||
module.exports = function (fn, that, length) {
|
||||
aFunction(fn);
|
||||
if (that === undefined) return fn;
|
||||
switch (length) {
|
||||
case 1: return function (a) {
|
||||
return fn.call(that, a);
|
||||
};
|
||||
case 2: return function (a, b) {
|
||||
return fn.call(that, a, b);
|
||||
};
|
||||
case 3: return function (a, b, c) {
|
||||
return fn.call(that, a, b, c);
|
||||
};
|
||||
}
|
||||
return function (/* ...args */) {
|
||||
return fn.apply(that, arguments);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "f341":
|
||||
|
@ -151,29 +151,16 @@ if (typeof window !== 'undefined') {
|
||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.function.name.js
|
||||
var es6_function_name = __webpack_require__("7cfd");
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./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??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=c8a41478&
|
||||
// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./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??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc&
|
||||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.playerId}})}
|
||||
var staticRenderFns = []
|
||||
|
||||
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=c8a41478&
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc&
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/_@babel_runtime@7.7.2@@babel/runtime/helpers/esm/typeof.js
|
||||
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
|
||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/web.dom.iterable.js
|
||||
var web_dom_iterable = __webpack_require__("4634");
|
||||
|
||||
function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
|
||||
_typeof = function _typeof(obj) {
|
||||
return _typeof2(obj);
|
||||
};
|
||||
} else {
|
||||
_typeof = function _typeof(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.regexp.to-string.js
|
||||
var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
|
||||
@ -186,12 +173,6 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
/* harmony default export */ var AliplayerV2vue_type_script_lang_js_ = ({
|
||||
name: 'VueAliplayerV2',
|
||||
props: {
|
||||
forbidFastForward: {
|
||||
//禁止拖拽快进
|
||||
required: false,
|
||||
type: [Boolean],
|
||||
default: false
|
||||
},
|
||||
options: {
|
||||
//配置项
|
||||
required: false,
|
||||
@ -210,13 +191,13 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
//css版本源
|
||||
required: false,
|
||||
type: [String],
|
||||
default: "https://g.alicdn.com/de/prismplayer/2.9.20/skins/default/aliplayer-min.css"
|
||||
default: "https://g.alicdn.com/de/prismplayer/2.9.0/skins/default/aliplayer-min.css"
|
||||
},
|
||||
scriptSrc: {
|
||||
//js版本源
|
||||
required: false,
|
||||
type: [String],
|
||||
default: "https://g.alicdn.com/de/prismplayer/2.9.20/aliplayer-min.js"
|
||||
default: "https://g.alicdn.com/de/prismplayer/2.9.0/aliplayer-min.js"
|
||||
}
|
||||
},
|
||||
data: function data() {
|
||||
@ -319,9 +300,6 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
//监听播放源变化
|
||||
this.init();
|
||||
},
|
||||
forbidFastForward: function forbidFastForward() {
|
||||
this.init();
|
||||
},
|
||||
options: {
|
||||
//配置项是对象,只能深度监听
|
||||
handler: function handler() {
|
||||
@ -346,8 +324,6 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
handlerFastForward: function handlerFastForward() {},
|
||||
|
||||
/**
|
||||
* 创建script和css
|
||||
* 加载Alipayer的SDK
|
||||
@ -355,8 +331,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
init: function init() {
|
||||
var _this3 = this;
|
||||
|
||||
var linkID = 'app__aliplayer-min-css';
|
||||
var scriptID = 'app__aliplayer-min-js';
|
||||
var linkID = 'aliplayer-min-css';
|
||||
var scriptID = 'aliplayer-min-js';
|
||||
var head = document.getElementsByTagName('head');
|
||||
var html = document.getElementsByTagName('html');
|
||||
var scriptTag = document.getElementById(scriptID);
|
||||
@ -368,8 +344,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = this.cssLink;
|
||||
link.id = linkID; // link.className = linkID;
|
||||
|
||||
link.id = linkID;
|
||||
head[0].appendChild(link);
|
||||
}
|
||||
|
||||
@ -377,8 +352,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
// console.log('scriptTag');
|
||||
scriptTag = document.createElement('script');
|
||||
scriptTag.type = "text/javascript";
|
||||
scriptTag.id = scriptID; // scriptTag.className = scriptID;
|
||||
|
||||
scriptTag.id = scriptID;
|
||||
scriptTag.src = this.scriptSrc;
|
||||
html[0].appendChild(scriptTag);
|
||||
} else {
|
||||
@ -399,7 +373,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
var _this4 = this;
|
||||
|
||||
if (typeof window.Aliplayer != 'undefined') {
|
||||
var options = this.deepCloneObject(this.options);
|
||||
var options = this.options;
|
||||
|
||||
if (options) {
|
||||
for (var key in options) {
|
||||
@ -424,25 +398,6 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
|
||||
for (var ev in this.events) {
|
||||
_loop(ev);
|
||||
} //开启禁止拖拽快进
|
||||
|
||||
|
||||
if (this.forbidFastForward) {
|
||||
var last = 0,
|
||||
max_time = 0;
|
||||
this.player.on('timeupdate', function () {
|
||||
var current = this.getCurrentTime();
|
||||
|
||||
if (current - last > 2) {
|
||||
this.seek(last);
|
||||
} else {
|
||||
last = current;
|
||||
|
||||
if (last >= max_time) {
|
||||
max_time = last;
|
||||
}
|
||||
}
|
||||
});
|
||||
} //通过播放器实例的off方法取消订阅
|
||||
//player.off('ready',handleReady);
|
||||
|
||||
@ -722,45 +677,18 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
*/
|
||||
off: function off(ev, handle) {
|
||||
this.player && this.player.off(ev, handle);
|
||||
},
|
||||
|
||||
/**
|
||||
* 深度拷贝
|
||||
* @param {*} obj
|
||||
*/
|
||||
deepCloneObject: function deepCloneObject(obj) {
|
||||
var objClone = Array.isArray(obj) ? [] : {};
|
||||
|
||||
if (obj && _typeof(obj) === 'object') {
|
||||
for (var key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
//判断ojb子元素是否为对象,如果是,递归复制
|
||||
if (obj[key] && _typeof(obj[key]) === 'object') {
|
||||
objClone[key] = this.deepCloneObject(obj[key]);
|
||||
} else {
|
||||
//如果不是,简单复制
|
||||
objClone[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return objClone;
|
||||
}
|
||||
},
|
||||
beforeDestroy: function beforeDestroy() {
|
||||
//防止重复创建
|
||||
this.dispose(); //销毁播放器(防止直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的bug)
|
||||
// const head = document.querySelector('head');
|
||||
// const cssNodes = document.querySelectorAll(`link.app__aliplayer-min-css`);
|
||||
// (html && cssNodes.length > 1) && cssNodes.forEach((item, index)=>{
|
||||
// if(index != 0) head.removeChild(item);
|
||||
// });
|
||||
// const html = document.querySelector('html');
|
||||
// const jsNodes = document.querySelectorAll(`script.app__aliplayer-min-js`);
|
||||
// (html && jsNodes.length > 1) && jsNodes.forEach((item, index)=>{
|
||||
// if(index != 0) html.removeChild(item);
|
||||
// });
|
||||
|
||||
var head = document.querySelector('head'); //移除所有的重复创建的标签
|
||||
|
||||
var nodes = document.querySelectorAll('script[src="https://g.alicdn.com/de/prismplayer/2.8.2/hls/aliplayer-hls-min.js"]');
|
||||
head && nodes.forEach(function (item) {
|
||||
head.removeChild(item);
|
||||
});
|
||||
}
|
||||
});
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=script&lang=js&
|
||||
@ -901,6 +829,113 @@ AliplayerV2.Player = AliplayerV2;
|
||||
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "1277":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var store = __webpack_require__("f341")('wks');
|
||||
var uid = __webpack_require__("4d2c");
|
||||
var Symbol = __webpack_require__("3f8b").Symbol;
|
||||
var USE_SYMBOL = typeof Symbol == 'function';
|
||||
|
||||
var $exports = module.exports = function (name) {
|
||||
return store[name] || (store[name] =
|
||||
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
|
||||
};
|
||||
|
||||
$exports.store = store;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "17cb":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var document = __webpack_require__("3f8b").document;
|
||||
module.exports = document && document.documentElement;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "1f9e":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// false -> Array#indexOf
|
||||
// true -> Array#includes
|
||||
var toIObject = __webpack_require__("6117");
|
||||
var toLength = __webpack_require__("8941");
|
||||
var toAbsoluteIndex = __webpack_require__("c3a9");
|
||||
module.exports = function (IS_INCLUDES) {
|
||||
return function ($this, el, fromIndex) {
|
||||
var O = toIObject($this);
|
||||
var length = toLength(O.length);
|
||||
var index = toAbsoluteIndex(fromIndex, length);
|
||||
var value;
|
||||
// Array#includes uses SameValueZero equality algorithm
|
||||
// eslint-disable-next-line no-self-compare
|
||||
if (IS_INCLUDES && el != el) while (length > index) {
|
||||
value = O[index++];
|
||||
// eslint-disable-next-line no-self-compare
|
||||
if (value != value) return true;
|
||||
// Array#indexOf ignores holes, Array#includes - not
|
||||
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
|
||||
if (O[index] === el) return IS_INCLUDES || index || 0;
|
||||
} return !IS_INCLUDES && -1;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "2498":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var global = __webpack_require__("3f8b");
|
||||
var core = __webpack_require__("da27");
|
||||
var hide = __webpack_require__("b8ea");
|
||||
var redefine = __webpack_require__("a6d5");
|
||||
var ctx = __webpack_require__("e85e");
|
||||
var PROTOTYPE = 'prototype';
|
||||
|
||||
var $export = function (type, name, source) {
|
||||
var IS_FORCED = type & $export.F;
|
||||
var IS_GLOBAL = type & $export.G;
|
||||
var IS_STATIC = type & $export.S;
|
||||
var IS_PROTO = type & $export.P;
|
||||
var IS_BIND = type & $export.B;
|
||||
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
|
||||
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
|
||||
var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
|
||||
var key, own, out, exp;
|
||||
if (IS_GLOBAL) source = name;
|
||||
for (key in source) {
|
||||
// contains in native
|
||||
own = !IS_FORCED && target && target[key] !== undefined;
|
||||
// export native or passed
|
||||
out = (own ? target : source)[key];
|
||||
// bind timers to global for call from export context
|
||||
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
||||
// extend global
|
||||
if (target) redefine(target, key, out, type & $export.U);
|
||||
// export
|
||||
if (exports[key] != out) hide(exports, key, exp);
|
||||
if (IS_PROTO && expProto[key] != out) expProto[key] = out;
|
||||
}
|
||||
};
|
||||
global.core = core;
|
||||
// type bitmap
|
||||
$export.F = 1; // forced
|
||||
$export.G = 2; // global
|
||||
$export.S = 4; // static
|
||||
$export.P = 8; // proto
|
||||
$export.B = 16; // bind
|
||||
$export.W = 32; // wrap
|
||||
$export.U = 64; // safe
|
||||
$export.R = 128; // real proto method for `library`
|
||||
module.exports = $export;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "25ae":
|
||||
@ -930,6 +965,32 @@ module.exports = function (it, S) {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "3038":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// 7.2.1 RequireObjectCoercible(argument)
|
||||
module.exports = function (it) {
|
||||
if (it == undefined) throw TypeError("Can't call method on " + it);
|
||||
return it;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "3d87":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var def = __webpack_require__("d3d8").f;
|
||||
var has = __webpack_require__("549d");
|
||||
var TAG = __webpack_require__("1277")('toStringTag');
|
||||
|
||||
module.exports = function (it, tag, stat) {
|
||||
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "3f8b":
|
||||
@ -943,6 +1004,148 @@ var global = module.exports = typeof window != 'undefined' && window.Math == Mat
|
||||
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "4634":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var $iterators = __webpack_require__("96dd");
|
||||
var getKeys = __webpack_require__("7d56");
|
||||
var redefine = __webpack_require__("a6d5");
|
||||
var global = __webpack_require__("3f8b");
|
||||
var hide = __webpack_require__("b8ea");
|
||||
var Iterators = __webpack_require__("e3b3");
|
||||
var wks = __webpack_require__("1277");
|
||||
var ITERATOR = wks('iterator');
|
||||
var TO_STRING_TAG = wks('toStringTag');
|
||||
var ArrayValues = Iterators.Array;
|
||||
|
||||
var DOMIterables = {
|
||||
CSSRuleList: true, // TODO: Not spec compliant, should be false.
|
||||
CSSStyleDeclaration: false,
|
||||
CSSValueList: false,
|
||||
ClientRectList: false,
|
||||
DOMRectList: false,
|
||||
DOMStringList: false,
|
||||
DOMTokenList: true,
|
||||
DataTransferItemList: false,
|
||||
FileList: false,
|
||||
HTMLAllCollection: false,
|
||||
HTMLCollection: false,
|
||||
HTMLFormElement: false,
|
||||
HTMLSelectElement: false,
|
||||
MediaList: true, // TODO: Not spec compliant, should be false.
|
||||
MimeTypeArray: false,
|
||||
NamedNodeMap: false,
|
||||
NodeList: true,
|
||||
PaintRequestList: false,
|
||||
Plugin: false,
|
||||
PluginArray: false,
|
||||
SVGLengthList: false,
|
||||
SVGNumberList: false,
|
||||
SVGPathSegList: false,
|
||||
SVGPointList: false,
|
||||
SVGStringList: false,
|
||||
SVGTransformList: false,
|
||||
SourceBufferList: false,
|
||||
StyleSheetList: true, // TODO: Not spec compliant, should be false.
|
||||
TextTrackCueList: false,
|
||||
TextTrackList: false,
|
||||
TouchList: false
|
||||
};
|
||||
|
||||
for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
|
||||
var NAME = collections[i];
|
||||
var explicit = DOMIterables[NAME];
|
||||
var Collection = global[NAME];
|
||||
var proto = Collection && Collection.prototype;
|
||||
var key;
|
||||
if (proto) {
|
||||
if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
|
||||
if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
|
||||
Iterators[NAME] = ArrayValues;
|
||||
if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "4aef":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var LIBRARY = __webpack_require__("6cc2");
|
||||
var $export = __webpack_require__("2498");
|
||||
var redefine = __webpack_require__("a6d5");
|
||||
var hide = __webpack_require__("b8ea");
|
||||
var Iterators = __webpack_require__("e3b3");
|
||||
var $iterCreate = __webpack_require__("c264");
|
||||
var setToStringTag = __webpack_require__("3d87");
|
||||
var getPrototypeOf = __webpack_require__("d15b");
|
||||
var ITERATOR = __webpack_require__("1277")('iterator');
|
||||
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
|
||||
var FF_ITERATOR = '@@iterator';
|
||||
var KEYS = 'keys';
|
||||
var VALUES = 'values';
|
||||
|
||||
var returnThis = function () { return this; };
|
||||
|
||||
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
|
||||
$iterCreate(Constructor, NAME, next);
|
||||
var getMethod = function (kind) {
|
||||
if (!BUGGY && kind in proto) return proto[kind];
|
||||
switch (kind) {
|
||||
case KEYS: return function keys() { return new Constructor(this, kind); };
|
||||
case VALUES: return function values() { return new Constructor(this, kind); };
|
||||
} return function entries() { return new Constructor(this, kind); };
|
||||
};
|
||||
var TAG = NAME + ' Iterator';
|
||||
var DEF_VALUES = DEFAULT == VALUES;
|
||||
var VALUES_BUG = false;
|
||||
var proto = Base.prototype;
|
||||
var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
|
||||
var $default = $native || getMethod(DEFAULT);
|
||||
var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
|
||||
var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
|
||||
var methods, key, IteratorPrototype;
|
||||
// Fix native
|
||||
if ($anyNative) {
|
||||
IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
|
||||
if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
|
||||
// Set @@toStringTag to native iterators
|
||||
setToStringTag(IteratorPrototype, TAG, true);
|
||||
// fix for some old engines
|
||||
if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
|
||||
}
|
||||
}
|
||||
// fix Array#{values, @@iterator}.name in V8 / FF
|
||||
if (DEF_VALUES && $native && $native.name !== VALUES) {
|
||||
VALUES_BUG = true;
|
||||
$default = function values() { return $native.call(this); };
|
||||
}
|
||||
// Define iterator
|
||||
if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
|
||||
hide(proto, ITERATOR, $default);
|
||||
}
|
||||
// Plug for library
|
||||
Iterators[NAME] = $default;
|
||||
Iterators[TAG] = returnThis;
|
||||
if (DEFAULT) {
|
||||
methods = {
|
||||
values: DEF_VALUES ? $default : getMethod(VALUES),
|
||||
keys: IS_SET ? $default : getMethod(KEYS),
|
||||
entries: $entries
|
||||
};
|
||||
if (FORCED) for (key in methods) {
|
||||
if (!(key in proto)) redefine(proto, key, methods[key]);
|
||||
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
|
||||
}
|
||||
return methods;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "4d2c":
|
||||
@ -966,6 +1169,79 @@ module.exports = function (it, key) {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "6077":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var toString = {}.toString;
|
||||
|
||||
module.exports = function (it) {
|
||||
return toString.call(it).slice(8, -1);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "6117":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
||||
var IObject = __webpack_require__("9952");
|
||||
var defined = __webpack_require__("3038");
|
||||
module.exports = function (it) {
|
||||
return IObject(defined(it));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "65c3":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
||||
var anObject = __webpack_require__("8cac");
|
||||
var dPs = __webpack_require__("8d69");
|
||||
var enumBugKeys = __webpack_require__("d93f");
|
||||
var IE_PROTO = __webpack_require__("9947")('IE_PROTO');
|
||||
var Empty = function () { /* empty */ };
|
||||
var PROTOTYPE = 'prototype';
|
||||
|
||||
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
||||
var createDict = function () {
|
||||
// Thrash, waste and sodomy: IE GC bug
|
||||
var iframe = __webpack_require__("6618")('iframe');
|
||||
var i = enumBugKeys.length;
|
||||
var lt = '<';
|
||||
var gt = '>';
|
||||
var iframeDocument;
|
||||
iframe.style.display = 'none';
|
||||
__webpack_require__("17cb").appendChild(iframe);
|
||||
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
||||
// createDict = iframe.contentWindow.Object;
|
||||
// html.removeChild(iframe);
|
||||
iframeDocument = iframe.contentWindow.document;
|
||||
iframeDocument.open();
|
||||
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
||||
iframeDocument.close();
|
||||
createDict = iframeDocument.F;
|
||||
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
||||
return createDict();
|
||||
};
|
||||
|
||||
module.exports = Object.create || function create(O, Properties) {
|
||||
var result;
|
||||
if (O !== null) {
|
||||
Empty[PROTOTYPE] = anObject(O);
|
||||
result = new Empty();
|
||||
Empty[PROTOTYPE] = null;
|
||||
// add "__proto__" for Object.getPrototypeOf polyfill
|
||||
result[IE_PROTO] = O;
|
||||
} else result = createDict();
|
||||
return Properties === undefined ? result : dPs(result, Properties);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "6618":
|
||||
@ -996,6 +1272,30 @@ module.exports = false;
|
||||
module.exports = __webpack_require__("f341")('native-function-to-string', Function.toString);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "7afe":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var has = __webpack_require__("549d");
|
||||
var toIObject = __webpack_require__("6117");
|
||||
var arrayIndexOf = __webpack_require__("1f9e")(false);
|
||||
var IE_PROTO = __webpack_require__("9947")('IE_PROTO');
|
||||
|
||||
module.exports = function (object, names) {
|
||||
var O = toIObject(object);
|
||||
var i = 0;
|
||||
var result = [];
|
||||
var key;
|
||||
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
|
||||
// Don't enum bug & hidden keys
|
||||
while (names.length > i) if (has(O, key = names[i++])) {
|
||||
~arrayIndexOf(result, key) || result.push(key);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "7cfd":
|
||||
@ -1019,6 +1319,44 @@ NAME in FProto || __webpack_require__("f9a5") && dP(FProto, NAME, {
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "7d56":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
||||
var $keys = __webpack_require__("7afe");
|
||||
var enumBugKeys = __webpack_require__("d93f");
|
||||
|
||||
module.exports = Object.keys || function keys(O) {
|
||||
return $keys(O, enumBugKeys);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "8451":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function (it) {
|
||||
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
|
||||
return it;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "8941":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 7.1.15 ToLength
|
||||
var toInteger = __webpack_require__("a6ad");
|
||||
var min = Math.min;
|
||||
module.exports = function (it) {
|
||||
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "8cac":
|
||||
@ -1031,6 +1369,93 @@ module.exports = function (it) {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "8d69":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var dP = __webpack_require__("d3d8");
|
||||
var anObject = __webpack_require__("8cac");
|
||||
var getKeys = __webpack_require__("7d56");
|
||||
|
||||
module.exports = __webpack_require__("f9a5") ? Object.defineProperties : function defineProperties(O, Properties) {
|
||||
anObject(O);
|
||||
var keys = getKeys(Properties);
|
||||
var length = keys.length;
|
||||
var i = 0;
|
||||
var P;
|
||||
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
|
||||
return O;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "96dd":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var addToUnscopables = __webpack_require__("ab19");
|
||||
var step = __webpack_require__("c8e9");
|
||||
var Iterators = __webpack_require__("e3b3");
|
||||
var toIObject = __webpack_require__("6117");
|
||||
|
||||
// 22.1.3.4 Array.prototype.entries()
|
||||
// 22.1.3.13 Array.prototype.keys()
|
||||
// 22.1.3.29 Array.prototype.values()
|
||||
// 22.1.3.30 Array.prototype[@@iterator]()
|
||||
module.exports = __webpack_require__("4aef")(Array, 'Array', function (iterated, kind) {
|
||||
this._t = toIObject(iterated); // target
|
||||
this._i = 0; // next index
|
||||
this._k = kind; // kind
|
||||
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
|
||||
}, function () {
|
||||
var O = this._t;
|
||||
var kind = this._k;
|
||||
var index = this._i++;
|
||||
if (!O || index >= O.length) {
|
||||
this._t = undefined;
|
||||
return step(1);
|
||||
}
|
||||
if (kind == 'keys') return step(0, index);
|
||||
if (kind == 'values') return step(0, O[index]);
|
||||
return step(0, [index, O[index]]);
|
||||
}, 'values');
|
||||
|
||||
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
|
||||
Iterators.Arguments = Iterators.Array;
|
||||
|
||||
addToUnscopables('keys');
|
||||
addToUnscopables('values');
|
||||
addToUnscopables('entries');
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "9947":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var shared = __webpack_require__("f341")('keys');
|
||||
var uid = __webpack_require__("4d2c");
|
||||
module.exports = function (key) {
|
||||
return shared[key] || (shared[key] = uid(key));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "9952":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
||||
var cof = __webpack_require__("6077");
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
||||
return cof(it) == 'String' ? it.split('') : Object(it);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "9f7e":
|
||||
@ -1043,6 +1468,19 @@ if (__webpack_require__("f9a5") && /./g.flags != 'g') __webpack_require__("d3d8"
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "a6ad":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// 7.1.4 ToInteger
|
||||
var ceil = Math.ceil;
|
||||
var floor = Math.floor;
|
||||
module.exports = function (it) {
|
||||
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "a6d5":
|
||||
@ -1081,6 +1519,32 @@ __webpack_require__("da27").inspectSource = function (it) {
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "a9cf":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 7.1.13 ToObject(argument)
|
||||
var defined = __webpack_require__("3038");
|
||||
module.exports = function (it) {
|
||||
return Object(defined(it));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "ab19":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 22.1.3.31 Array.prototype[@@unscopables]
|
||||
var UNSCOPABLES = __webpack_require__("1277")('unscopables');
|
||||
var ArrayProto = Array.prototype;
|
||||
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("b8ea")(ArrayProto, UNSCOPABLES, {});
|
||||
module.exports = function (key) {
|
||||
ArrayProto[UNSCOPABLES][key] = true;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "b8ea":
|
||||
@ -1096,6 +1560,51 @@ module.exports = __webpack_require__("f9a5") ? function (object, key, value) {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "c264":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var create = __webpack_require__("65c3");
|
||||
var descriptor = __webpack_require__("0614");
|
||||
var setToStringTag = __webpack_require__("3d87");
|
||||
var IteratorPrototype = {};
|
||||
|
||||
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
||||
__webpack_require__("b8ea")(IteratorPrototype, __webpack_require__("1277")('iterator'), function () { return this; });
|
||||
|
||||
module.exports = function (Constructor, NAME, next) {
|
||||
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
|
||||
setToStringTag(Constructor, NAME + ' Iterator');
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "c3a9":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var toInteger = __webpack_require__("a6ad");
|
||||
var max = Math.max;
|
||||
var min = Math.min;
|
||||
module.exports = function (index, length) {
|
||||
index = toInteger(index);
|
||||
return index < 0 ? max(index + length, 0) : min(index, length);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "c8e9":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function (done, value) {
|
||||
return { value: value, done: !!done };
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "cc1d":
|
||||
@ -1129,6 +1638,26 @@ if (__webpack_require__("0cc1")(function () { return $toString.call({ source: 'a
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "d15b":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
|
||||
var has = __webpack_require__("549d");
|
||||
var toObject = __webpack_require__("a9cf");
|
||||
var IE_PROTO = __webpack_require__("9947")('IE_PROTO');
|
||||
var ObjectProto = Object.prototype;
|
||||
|
||||
module.exports = Object.getPrototypeOf || function (O) {
|
||||
O = toObject(O);
|
||||
if (has(O, IE_PROTO)) return O[IE_PROTO];
|
||||
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
||||
return O.constructor.prototype;
|
||||
} return O instanceof Object ? ObjectProto : null;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "d3d8":
|
||||
@ -1152,6 +1681,17 @@ exports.f = __webpack_require__("f9a5") ? Object.defineProperty : function defin
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "d93f":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// IE 8- don't enum bug keys
|
||||
module.exports = (
|
||||
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
||||
).split(',');
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "da0b":
|
||||
@ -1171,6 +1711,14 @@ var core = module.exports = { version: '2.6.10' };
|
||||
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "e3b3":
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = {};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "e67d":
|
||||
@ -1235,6 +1783,33 @@ module.exports = function () {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "e85e":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// optional / simple context binding
|
||||
var aFunction = __webpack_require__("8451");
|
||||
module.exports = function (fn, that, length) {
|
||||
aFunction(fn);
|
||||
if (that === undefined) return fn;
|
||||
switch (length) {
|
||||
case 1: return function (a) {
|
||||
return fn.call(that, a);
|
||||
};
|
||||
case 2: return function (a, b) {
|
||||
return fn.call(that, a, b);
|
||||
};
|
||||
case 3: return function (a, b, c) {
|
||||
return fn.call(that, a, b, c);
|
||||
};
|
||||
}
|
||||
return function (/* ...args */) {
|
||||
return fn.apply(that, arguments);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "f341":
|
||||
|
2
lib/vue-aliplayer-v2.umd.min.js
vendored
2
lib/vue-aliplayer-v2.umd.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-aliplayer-v2",
|
||||
"version": "1.3.1",
|
||||
"version": "1.2.5",
|
||||
"author": "yxs",
|
||||
"description": "感谢每一位支持开源的朋友. 这是一个基于Alipayer 开发并封装成vue组件的集成播放器.可播放rtmp,m3u8,mp4....视频.除支持直播流与点播的基础功能外,也支持视频的加密播放、清晰度切换、直播时移等业务场景",
|
||||
"main":"lib/vue-aliplayer-v2.umd.min.js",
|
||||
|
@ -5,11 +5,6 @@
|
||||
export default {
|
||||
name: 'VueAliplayerV2',
|
||||
props: {
|
||||
forbidFastForward: { //禁止拖拽快进
|
||||
required: false,
|
||||
type: [Boolean],
|
||||
default: false
|
||||
},
|
||||
options: { //配置项
|
||||
required: false,
|
||||
type: [Object],
|
||||
@ -23,12 +18,12 @@ export default {
|
||||
cssLink:{ //css版本源
|
||||
required: false,
|
||||
type: [String],
|
||||
default: `https://g.alicdn.com/de/prismplayer/2.9.20/skins/default/aliplayer-min.css`
|
||||
default: `https://g.alicdn.com/de/prismplayer/2.9.0/skins/default/aliplayer-min.css`
|
||||
},
|
||||
scriptSrc:{ //js版本源
|
||||
required: false,
|
||||
type: [String],
|
||||
default: `https://g.alicdn.com/de/prismplayer/2.9.20/aliplayer-min.js`
|
||||
default: `https://g.alicdn.com/de/prismplayer/2.9.0/aliplayer-min.js`
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@ -129,10 +124,6 @@ export default {
|
||||
source(){ //监听播放源变化
|
||||
this.init();
|
||||
},
|
||||
forbidFastForward () {
|
||||
this.init();
|
||||
|
||||
},
|
||||
|
||||
options:{ //配置项是对象,只能深度监听
|
||||
handler(){
|
||||
@ -153,16 +144,14 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
handlerFastForward () {
|
||||
|
||||
},
|
||||
/**
|
||||
* 创建script和css
|
||||
* 加载Alipayer的SDK
|
||||
*/
|
||||
init(){
|
||||
const linkID = 'app__aliplayer-min-css';
|
||||
const scriptID = 'app__aliplayer-min-js';
|
||||
const linkID = 'aliplayer-min-css';
|
||||
const scriptID = 'aliplayer-min-js';
|
||||
const head = document.getElementsByTagName('head');
|
||||
const html = document.getElementsByTagName('html');
|
||||
let scriptTag = document.getElementById(scriptID);
|
||||
@ -174,7 +163,6 @@ export default {
|
||||
link.rel = 'stylesheet';
|
||||
link.href = this.cssLink;
|
||||
link.id = linkID;
|
||||
// link.className = linkID;
|
||||
head[0].appendChild(link);
|
||||
}
|
||||
if(!scriptTag) {
|
||||
@ -182,7 +170,6 @@ export default {
|
||||
scriptTag = document.createElement('script');
|
||||
scriptTag.type = "text/javascript";
|
||||
scriptTag.id = scriptID;
|
||||
// scriptTag.className = scriptID;
|
||||
scriptTag.src = this.scriptSrc;
|
||||
html[0].appendChild(scriptTag);
|
||||
} else {
|
||||
@ -200,7 +187,7 @@ export default {
|
||||
*/
|
||||
initPlayer(){
|
||||
if(typeof window.Aliplayer != 'undefined') {
|
||||
const options = this.deepCloneObject(this.options);
|
||||
const options = this.options;
|
||||
if(options){
|
||||
for (const key in options) {
|
||||
this.config[key] = options[key];
|
||||
@ -216,24 +203,6 @@ export default {
|
||||
this.$emit(this.events[ev],e);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//开启禁止拖拽快进
|
||||
if (this.forbidFastForward) {
|
||||
let last = 0, max_time = 0;
|
||||
this.player.on('timeupdate', function () {
|
||||
let current = this.getCurrentTime();
|
||||
if (current - last > 2) {
|
||||
this.seek(last);
|
||||
} else {
|
||||
last = current;
|
||||
if (last >= max_time) {
|
||||
max_time = last;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//通过播放器实例的off方法取消订阅
|
||||
//player.off('ready',handleReady);
|
||||
}
|
||||
@ -512,44 +481,15 @@ export default {
|
||||
*/
|
||||
off(ev,handle){
|
||||
this.player && this.player.off(ev,handle);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 深度拷贝
|
||||
* @param {*} obj
|
||||
*/
|
||||
deepCloneObject (obj) {
|
||||
let objClone = Array.isArray(obj) ? [] : {};
|
||||
if (obj && typeof obj === 'object') {
|
||||
for (let key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
//判断ojb子元素是否为对象,如果是,递归复制
|
||||
if (obj[key] && typeof obj[key] === 'object') {
|
||||
objClone[key] = this.deepCloneObject(obj[key]);
|
||||
} else {
|
||||
//如果不是,简单复制
|
||||
objClone[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return objClone;
|
||||
}
|
||||
|
||||
},
|
||||
beforeDestroy(){ //防止重复创建
|
||||
this.dispose(); //销毁播放器(防止直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的bug)
|
||||
// const head = document.querySelector('head');
|
||||
// const cssNodes = document.querySelectorAll(`link.app__aliplayer-min-css`);
|
||||
// (html && cssNodes.length > 1) && cssNodes.forEach((item, index)=>{
|
||||
// if(index != 0) head.removeChild(item);
|
||||
// });
|
||||
// const html = document.querySelector('html');
|
||||
// const jsNodes = document.querySelectorAll(`script.app__aliplayer-min-js`);
|
||||
// (html && jsNodes.length > 1) && jsNodes.forEach((item, index)=>{
|
||||
// if(index != 0) html.removeChild(item);
|
||||
// });
|
||||
const head = document.querySelector('head'); //移除所有的重复创建的标签
|
||||
const nodes = document.querySelectorAll('script[src="https://g.alicdn.com/de/prismplayer/2.8.2/hls/aliplayer-hls-min.js"]');
|
||||
head && nodes.forEach((item)=>{
|
||||
head.removeChild(item);
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
25
pages.sh
25
pages.sh
@ -1,25 +0,0 @@
|
||||
echo "打包 => dist";
|
||||
|
||||
# 打包 => dist
|
||||
npm run build;
|
||||
|
||||
# 更新gh-pages
|
||||
echo "更新gh-pages";
|
||||
|
||||
git branch -D gh-pages;
|
||||
|
||||
echo "删除gh-pages";
|
||||
|
||||
git checkout -b gh-pages;
|
||||
|
||||
echo "创建并切换到gh-pages";
|
||||
|
||||
git add -f dist;
|
||||
|
||||
git commit -m 'create gh-pages';
|
||||
|
||||
git push origin -d gh-pages;
|
||||
|
||||
git subtree push --prefix dist origin gh-pages;
|
||||
|
||||
echo "已推送gh-pages";
|
Loading…
x
Reference in New Issue
Block a user