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

|

|
||||||

|

|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 6.二次开发 下载项目
|
## 6.二次开发 下载项目
|
||||||
@ -375,6 +417,7 @@ git clone https://github.com/langyuxiansheng/vue-aliplayer-v2.git
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Project setup
|
## Project setup
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd vue-aliplayer-v2
|
cd vue-aliplayer-v2
|
||||||
|
|
||||||
@ -382,36 +425,57 @@ npm install
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Compiles and hot-reloads for development
|
### Compiles and hot-reloads for development
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compiles and minifies for production
|
### Compiles and minifies for production
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run build
|
npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
### Lints and fixes files
|
### Lints and fixes files
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run lint
|
npm run lint
|
||||||
```
|
```
|
||||||
|
|
||||||
## 7.缺陷 & 后期计划
|
## 7.缺陷 & 后期计划
|
||||||
|
|
||||||
> 2019 年 12 月 27 日 更新优化局部引用方式
|
> 2019 年 12 月 27 日 更新优化局部引用方式
|
||||||
|
|
||||||
> 您有功能建议,或者 bug 反馈请留言.
|
> 您有功能建议,或者 bug 反馈请留言.
|
||||||
|
|
||||||
## 8.感谢
|
## 8.感谢
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- vue-aliplayer 的作者,项目地址:https://github.com/slacrey/vue-aliplayer
|
- 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
|
- Alipayer 阿里云的开源播放器 https://help.aliyun.com/document_detail/125572.html?spm=a2c4g.11186623.6.1085.36fc6fc57WKZ5P#h2-u64ADu653Eu5668u4E8Bu4EF63
|
||||||
|
|
||||||
### Customize configuration
|
### Customize configuration
|
||||||
|
|
||||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
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.5 更换默认的播放器 SDK 版本 2.8.2 => 2.9.0,2.8.2 的版本存在多个播放器同时播放直播流异常的 bug,增加了全局 SDK 版本配置,可以在 Vue.use()的时候进行配置.
|
||||||
|
|
||||||
> v1.2.4 修复多个播放器加载,只初始化一个播放器的 bug.文档部分更新,增加了问题栏. 感谢"沙洲 ad"的反馈与建议.
|
> v1.2.4 修复多个播放器加载,只初始化一个播放器的 bug.文档部分更新,增加了问题栏. 感谢"沙洲 ad"的反馈与建议.
|
||||||
@ -433,6 +497,7 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
|
|||||||
> v1.1.6 修复部分已知 bug 和优化局部的引用方式
|
> v1.1.6 修复部分已知 bug 和优化局部的引用方式
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 其它问题
|
## 其它问题
|
||||||
|
|
||||||
1. IOS 或者其它设备无法全屏播放,或者点击全屏按钮的时候也只是显示竖屏?
|
1. IOS 或者其它设备无法全屏播放,或者点击全屏按钮的时候也只是显示竖屏?
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<template v-if="!isShowMultiple && show">
|
<template v-if="!isShowMultiple && show">
|
||||||
<vue-aliplayer-v2 :source="source" ref="VueAliplayerV2" :options="options" />
|
<vue-aliplayer-v2 :source="source" ref="VueAliplayerV2" :options="options"
|
||||||
|
:forbidFastForward="forbidFastForward"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<div v-if="isShowMultiple && show" class="show-multiple">
|
<div v-if="isShowMultiple && show" class="show-multiple">
|
||||||
<template v-for="x in 5">
|
<template v-for="x in 5">
|
||||||
@ -11,11 +13,13 @@
|
|||||||
<p class="remove-text" v-if="!show">播放器已销毁!</p>
|
<p class="remove-text" v-if="!show">播放器已销毁!</p>
|
||||||
<div class="player-btns">
|
<div class="player-btns">
|
||||||
<template v-if="!isShowMultiple && show">
|
<template v-if="!isShowMultiple && show">
|
||||||
|
|
||||||
<span @click="play()">播放</span>
|
<span @click="play()">播放</span>
|
||||||
<span @click="pause()">暂停</span>
|
<span @click="pause()">暂停</span>
|
||||||
<span @click="replay()">重播</span>
|
<span @click="replay()">重播</span>
|
||||||
<span @click="getCurrentTime()">播放时刻</span>
|
<span @click="getCurrentTime()">播放时刻</span>
|
||||||
<span @click="getStatus()">获取播放器状态</span>
|
<span @click="getStatus()">获取播放器状态</span>
|
||||||
|
<span @click="handlerForbidFastForward()">禁止快进</span>
|
||||||
</template>
|
</template>
|
||||||
<span @click="show = !show">{{ show ? '销毁' : '重载' }}</span>
|
<span @click="show = !show">{{ show ? '销毁' : '重载' }}</span>
|
||||||
<span @click="options.isLive = !options.isLive">{{ options.isLive ? '切换普通模式' : '切换直播模式' }}</span>
|
<span @click="options.isLive = !options.isLive">{{ options.isLive ? '切换普通模式' : '切换直播模式' }}</span>
|
||||||
@ -34,6 +38,20 @@
|
|||||||
<span class="source-label">输入播放源(支持动态切换):</span>
|
<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>
|
||||||
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -44,13 +62,51 @@ export default {
|
|||||||
return {
|
return {
|
||||||
options: {
|
options: {
|
||||||
// source:'//player.alicdn.com/video/aliyunmedia.mp4',
|
// source:'//player.alicdn.com/video/aliyunmedia.mp4',
|
||||||
isLive: true, //切换为直播流的时候必填
|
isLive: !true, //切换为直播流的时候必填
|
||||||
// format: 'm3u8' //切换为直播流的时候必填
|
// 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
|
||||||
},
|
},
|
||||||
source: '//player.alicdn.com/video/aliyunmedia.mp4',
|
source: '//player.alicdn.com/video/aliyunmedia.mp4',
|
||||||
// source: '//ivi.bupt.edu.cn/hls/cctv1.m3u8',
|
// source: '//ivi.bupt.edu.cn/hls/cctv1.m3u8',
|
||||||
show: true,
|
show: true,
|
||||||
isShowMultiple: false
|
forbidFastForward: false,
|
||||||
|
isShowMultiple: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -67,6 +123,11 @@ export default {
|
|||||||
replay () {
|
replay () {
|
||||||
this.$refs.VueAliplayerV2.replay();
|
this.$refs.VueAliplayerV2.replay();
|
||||||
},
|
},
|
||||||
|
handlerForbidFastForward () {
|
||||||
|
|
||||||
|
this.forbidFastForward = true
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
getCurrentTime () {
|
getCurrentTime () {
|
||||||
// this.$refs.VueAliplayerV2.getCurrentTime();
|
// this.$refs.VueAliplayerV2.getCurrentTime();
|
||||||
@ -124,7 +185,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.source-box {
|
.source-box {
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 10px;
|
||||||
.source-label {
|
.source-label {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
23
gh-page.sh
Normal file
23
gh-page.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
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,16 +142,29 @@ if (typeof window !== 'undefined') {
|
|||||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.function.name.js
|
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.function.name.js
|
||||||
var es6_function_name = __webpack_require__("7cfd");
|
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=d74f17bc&
|
// 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&
|
||||||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.playerId}})}
|
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 = []
|
var staticRenderFns = []
|
||||||
|
|
||||||
|
|
||||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc&
|
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=c8a41478&
|
||||||
|
|
||||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/web.dom.iterable.js
|
// CONCATENATED MODULE: ./node_modules/_@babel_runtime@7.7.2@@babel/runtime/helpers/esm/typeof.js
|
||||||
var web_dom_iterable = __webpack_require__("4634");
|
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); }
|
||||||
|
|
||||||
|
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
|
// 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");
|
var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||||
|
|
||||||
@ -164,6 +177,12 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
/* harmony default export */ var AliplayerV2vue_type_script_lang_js_ = ({
|
/* harmony default export */ var AliplayerV2vue_type_script_lang_js_ = ({
|
||||||
name: 'VueAliplayerV2',
|
name: 'VueAliplayerV2',
|
||||||
props: {
|
props: {
|
||||||
|
forbidFastForward: {
|
||||||
|
//禁止拖拽快进
|
||||||
|
required: false,
|
||||||
|
type: [Boolean],
|
||||||
|
default: false
|
||||||
|
},
|
||||||
options: {
|
options: {
|
||||||
//配置项
|
//配置项
|
||||||
required: false,
|
required: false,
|
||||||
@ -182,13 +201,13 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
//css版本源
|
//css版本源
|
||||||
required: false,
|
required: false,
|
||||||
type: [String],
|
type: [String],
|
||||||
default: "https://g.alicdn.com/de/prismplayer/2.9.0/skins/default/aliplayer-min.css"
|
default: "https://g.alicdn.com/de/prismplayer/2.9.20/skins/default/aliplayer-min.css"
|
||||||
},
|
},
|
||||||
scriptSrc: {
|
scriptSrc: {
|
||||||
//js版本源
|
//js版本源
|
||||||
required: false,
|
required: false,
|
||||||
type: [String],
|
type: [String],
|
||||||
default: "https://g.alicdn.com/de/prismplayer/2.9.0/aliplayer-min.js"
|
default: "https://g.alicdn.com/de/prismplayer/2.9.20/aliplayer-min.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: function data() {
|
data: function data() {
|
||||||
@ -291,6 +310,9 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
//监听播放源变化
|
//监听播放源变化
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
|
forbidFastForward: function forbidFastForward() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
options: {
|
options: {
|
||||||
//配置项是对象,只能深度监听
|
//配置项是对象,只能深度监听
|
||||||
handler: function handler() {
|
handler: function handler() {
|
||||||
@ -315,6 +337,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handlerFastForward: function handlerFastForward() {},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建script和css
|
* 创建script和css
|
||||||
* 加载Alipayer的SDK
|
* 加载Alipayer的SDK
|
||||||
@ -322,8 +346,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
init: function init() {
|
init: function init() {
|
||||||
var _this3 = this;
|
var _this3 = this;
|
||||||
|
|
||||||
var linkID = 'aliplayer-min-css';
|
var linkID = 'app__aliplayer-min-css';
|
||||||
var scriptID = 'aliplayer-min-js';
|
var scriptID = 'app__aliplayer-min-js';
|
||||||
var head = document.getElementsByTagName('head');
|
var head = document.getElementsByTagName('head');
|
||||||
var html = document.getElementsByTagName('html');
|
var html = document.getElementsByTagName('html');
|
||||||
var scriptTag = document.getElementById(scriptID);
|
var scriptTag = document.getElementById(scriptID);
|
||||||
@ -335,7 +359,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
link.type = 'text/css';
|
link.type = 'text/css';
|
||||||
link.rel = 'stylesheet';
|
link.rel = 'stylesheet';
|
||||||
link.href = this.cssLink;
|
link.href = this.cssLink;
|
||||||
link.id = linkID;
|
link.id = linkID; // link.className = linkID;
|
||||||
|
|
||||||
head[0].appendChild(link);
|
head[0].appendChild(link);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,7 +368,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
// console.log('scriptTag');
|
// console.log('scriptTag');
|
||||||
scriptTag = document.createElement('script');
|
scriptTag = document.createElement('script');
|
||||||
scriptTag.type = "text/javascript";
|
scriptTag.type = "text/javascript";
|
||||||
scriptTag.id = scriptID;
|
scriptTag.id = scriptID; // scriptTag.className = scriptID;
|
||||||
|
|
||||||
scriptTag.src = this.scriptSrc;
|
scriptTag.src = this.scriptSrc;
|
||||||
html[0].appendChild(scriptTag);
|
html[0].appendChild(scriptTag);
|
||||||
} else {
|
} else {
|
||||||
@ -364,7 +390,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
var _this4 = this;
|
var _this4 = this;
|
||||||
|
|
||||||
if (typeof window.Aliplayer != 'undefined') {
|
if (typeof window.Aliplayer != 'undefined') {
|
||||||
var options = this.options;
|
var options = this.deepCloneObject(this.options);
|
||||||
|
|
||||||
if (options) {
|
if (options) {
|
||||||
for (var key in options) {
|
for (var key in options) {
|
||||||
@ -389,6 +415,25 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
|
|
||||||
for (var ev in this.events) {
|
for (var ev in this.events) {
|
||||||
_loop(ev);
|
_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方法取消订阅
|
} //通过播放器实例的off方法取消订阅
|
||||||
//player.off('ready',handleReady);
|
//player.off('ready',handleReady);
|
||||||
|
|
||||||
@ -668,18 +713,45 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
*/
|
*/
|
||||||
off: function off(ev, handle) {
|
off: function off(ev, handle) {
|
||||||
this.player && this.player.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() {
|
beforeDestroy: function beforeDestroy() {
|
||||||
//防止重复创建
|
//防止重复创建
|
||||||
this.dispose(); //销毁播放器(防止直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的bug)
|
this.dispose(); //销毁播放器(防止直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的bug)
|
||||||
|
// const head = document.querySelector('head');
|
||||||
var head = document.querySelector('head'); //移除所有的重复创建的标签
|
// const cssNodes = document.querySelectorAll(`link.app__aliplayer-min-css`);
|
||||||
|
// (html && cssNodes.length > 1) && cssNodes.forEach((item, index)=>{
|
||||||
var nodes = document.querySelectorAll('script[src="https://g.alicdn.com/de/prismplayer/2.8.2/hls/aliplayer-hls-min.js"]');
|
// if(index != 0) head.removeChild(item);
|
||||||
head && nodes.forEach(function (item) {
|
// });
|
||||||
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);
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=script&lang=js&
|
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=script&lang=js&
|
||||||
@ -820,113 +892,6 @@ 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":
|
/***/ "25ae":
|
||||||
@ -956,32 +921,6 @@ 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":
|
/***/ "3f8b":
|
||||||
@ -995,148 +934,6 @@ var global = module.exports = typeof window != 'undefined' && window.Math == Mat
|
|||||||
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
|
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":
|
/***/ "4d2c":
|
||||||
@ -1160,79 +957,6 @@ 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":
|
/***/ "6618":
|
||||||
@ -1263,30 +987,6 @@ module.exports = false;
|
|||||||
module.exports = __webpack_require__("f341")('native-function-to-string', Function.toString);
|
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":
|
/***/ "7cfd":
|
||||||
@ -1310,44 +1010,6 @@ 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":
|
/***/ "8cac":
|
||||||
@ -1360,93 +1022,6 @@ 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":
|
/***/ "9f7e":
|
||||||
@ -1459,19 +1034,6 @@ 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":
|
/***/ "a6d5":
|
||||||
@ -1510,32 +1072,6 @@ __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":
|
/***/ "b8ea":
|
||||||
@ -1551,51 +1087,6 @@ 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":
|
/***/ "cc1d":
|
||||||
@ -1629,26 +1120,6 @@ 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":
|
/***/ "d3d8":
|
||||||
@ -1672,17 +1143,6 @@ 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":
|
/***/ "da0b":
|
||||||
@ -1702,14 +1162,6 @@ var core = module.exports = { version: '2.6.10' };
|
|||||||
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "e3b3":
|
|
||||||
/***/ (function(module, exports) {
|
|
||||||
|
|
||||||
module.exports = {};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "e67d":
|
/***/ "e67d":
|
||||||
@ -1774,33 +1226,6 @@ 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":
|
/***/ "f341":
|
||||||
|
@ -151,16 +151,29 @@ if (typeof window !== 'undefined') {
|
|||||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.function.name.js
|
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.function.name.js
|
||||||
var es6_function_name = __webpack_require__("7cfd");
|
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=d74f17bc&
|
// 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&
|
||||||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.playerId}})}
|
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 = []
|
var staticRenderFns = []
|
||||||
|
|
||||||
|
|
||||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc&
|
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=c8a41478&
|
||||||
|
|
||||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/web.dom.iterable.js
|
// CONCATENATED MODULE: ./node_modules/_@babel_runtime@7.7.2@@babel/runtime/helpers/esm/typeof.js
|
||||||
var web_dom_iterable = __webpack_require__("4634");
|
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); }
|
||||||
|
|
||||||
|
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
|
// 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");
|
var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||||
|
|
||||||
@ -173,6 +186,12 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
/* harmony default export */ var AliplayerV2vue_type_script_lang_js_ = ({
|
/* harmony default export */ var AliplayerV2vue_type_script_lang_js_ = ({
|
||||||
name: 'VueAliplayerV2',
|
name: 'VueAliplayerV2',
|
||||||
props: {
|
props: {
|
||||||
|
forbidFastForward: {
|
||||||
|
//禁止拖拽快进
|
||||||
|
required: false,
|
||||||
|
type: [Boolean],
|
||||||
|
default: false
|
||||||
|
},
|
||||||
options: {
|
options: {
|
||||||
//配置项
|
//配置项
|
||||||
required: false,
|
required: false,
|
||||||
@ -191,13 +210,13 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
//css版本源
|
//css版本源
|
||||||
required: false,
|
required: false,
|
||||||
type: [String],
|
type: [String],
|
||||||
default: "https://g.alicdn.com/de/prismplayer/2.9.0/skins/default/aliplayer-min.css"
|
default: "https://g.alicdn.com/de/prismplayer/2.9.20/skins/default/aliplayer-min.css"
|
||||||
},
|
},
|
||||||
scriptSrc: {
|
scriptSrc: {
|
||||||
//js版本源
|
//js版本源
|
||||||
required: false,
|
required: false,
|
||||||
type: [String],
|
type: [String],
|
||||||
default: "https://g.alicdn.com/de/prismplayer/2.9.0/aliplayer-min.js"
|
default: "https://g.alicdn.com/de/prismplayer/2.9.20/aliplayer-min.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: function data() {
|
data: function data() {
|
||||||
@ -300,6 +319,9 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
//监听播放源变化
|
//监听播放源变化
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
|
forbidFastForward: function forbidFastForward() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
options: {
|
options: {
|
||||||
//配置项是对象,只能深度监听
|
//配置项是对象,只能深度监听
|
||||||
handler: function handler() {
|
handler: function handler() {
|
||||||
@ -324,6 +346,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handlerFastForward: function handlerFastForward() {},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建script和css
|
* 创建script和css
|
||||||
* 加载Alipayer的SDK
|
* 加载Alipayer的SDK
|
||||||
@ -331,8 +355,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
init: function init() {
|
init: function init() {
|
||||||
var _this3 = this;
|
var _this3 = this;
|
||||||
|
|
||||||
var linkID = 'aliplayer-min-css';
|
var linkID = 'app__aliplayer-min-css';
|
||||||
var scriptID = 'aliplayer-min-js';
|
var scriptID = 'app__aliplayer-min-js';
|
||||||
var head = document.getElementsByTagName('head');
|
var head = document.getElementsByTagName('head');
|
||||||
var html = document.getElementsByTagName('html');
|
var html = document.getElementsByTagName('html');
|
||||||
var scriptTag = document.getElementById(scriptID);
|
var scriptTag = document.getElementById(scriptID);
|
||||||
@ -344,7 +368,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
link.type = 'text/css';
|
link.type = 'text/css';
|
||||||
link.rel = 'stylesheet';
|
link.rel = 'stylesheet';
|
||||||
link.href = this.cssLink;
|
link.href = this.cssLink;
|
||||||
link.id = linkID;
|
link.id = linkID; // link.className = linkID;
|
||||||
|
|
||||||
head[0].appendChild(link);
|
head[0].appendChild(link);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -352,7 +377,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
// console.log('scriptTag');
|
// console.log('scriptTag');
|
||||||
scriptTag = document.createElement('script');
|
scriptTag = document.createElement('script');
|
||||||
scriptTag.type = "text/javascript";
|
scriptTag.type = "text/javascript";
|
||||||
scriptTag.id = scriptID;
|
scriptTag.id = scriptID; // scriptTag.className = scriptID;
|
||||||
|
|
||||||
scriptTag.src = this.scriptSrc;
|
scriptTag.src = this.scriptSrc;
|
||||||
html[0].appendChild(scriptTag);
|
html[0].appendChild(scriptTag);
|
||||||
} else {
|
} else {
|
||||||
@ -373,7 +399,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
var _this4 = this;
|
var _this4 = this;
|
||||||
|
|
||||||
if (typeof window.Aliplayer != 'undefined') {
|
if (typeof window.Aliplayer != 'undefined') {
|
||||||
var options = this.options;
|
var options = this.deepCloneObject(this.options);
|
||||||
|
|
||||||
if (options) {
|
if (options) {
|
||||||
for (var key in options) {
|
for (var key in options) {
|
||||||
@ -398,6 +424,25 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
|
|
||||||
for (var ev in this.events) {
|
for (var ev in this.events) {
|
||||||
_loop(ev);
|
_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方法取消订阅
|
} //通过播放器实例的off方法取消订阅
|
||||||
//player.off('ready',handleReady);
|
//player.off('ready',handleReady);
|
||||||
|
|
||||||
@ -677,18 +722,45 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
|||||||
*/
|
*/
|
||||||
off: function off(ev, handle) {
|
off: function off(ev, handle) {
|
||||||
this.player && this.player.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() {
|
beforeDestroy: function beforeDestroy() {
|
||||||
//防止重复创建
|
//防止重复创建
|
||||||
this.dispose(); //销毁播放器(防止直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的bug)
|
this.dispose(); //销毁播放器(防止直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的bug)
|
||||||
|
// const head = document.querySelector('head');
|
||||||
var head = document.querySelector('head'); //移除所有的重复创建的标签
|
// const cssNodes = document.querySelectorAll(`link.app__aliplayer-min-css`);
|
||||||
|
// (html && cssNodes.length > 1) && cssNodes.forEach((item, index)=>{
|
||||||
var nodes = document.querySelectorAll('script[src="https://g.alicdn.com/de/prismplayer/2.8.2/hls/aliplayer-hls-min.js"]');
|
// if(index != 0) head.removeChild(item);
|
||||||
head && nodes.forEach(function (item) {
|
// });
|
||||||
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);
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=script&lang=js&
|
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=script&lang=js&
|
||||||
@ -829,113 +901,6 @@ 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":
|
/***/ "25ae":
|
||||||
@ -965,32 +930,6 @@ 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":
|
/***/ "3f8b":
|
||||||
@ -1004,148 +943,6 @@ var global = module.exports = typeof window != 'undefined' && window.Math == Mat
|
|||||||
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
|
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":
|
/***/ "4d2c":
|
||||||
@ -1169,79 +966,6 @@ 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":
|
/***/ "6618":
|
||||||
@ -1272,30 +996,6 @@ module.exports = false;
|
|||||||
module.exports = __webpack_require__("f341")('native-function-to-string', Function.toString);
|
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":
|
/***/ "7cfd":
|
||||||
@ -1319,44 +1019,6 @@ 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":
|
/***/ "8cac":
|
||||||
@ -1369,93 +1031,6 @@ 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":
|
/***/ "9f7e":
|
||||||
@ -1468,19 +1043,6 @@ 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":
|
/***/ "a6d5":
|
||||||
@ -1519,32 +1081,6 @@ __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":
|
/***/ "b8ea":
|
||||||
@ -1560,51 +1096,6 @@ 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":
|
/***/ "cc1d":
|
||||||
@ -1638,26 +1129,6 @@ 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":
|
/***/ "d3d8":
|
||||||
@ -1681,17 +1152,6 @@ 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":
|
/***/ "da0b":
|
||||||
@ -1711,14 +1171,6 @@ var core = module.exports = { version: '2.6.10' };
|
|||||||
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "e3b3":
|
|
||||||
/***/ (function(module, exports) {
|
|
||||||
|
|
||||||
module.exports = {};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "e67d":
|
/***/ "e67d":
|
||||||
@ -1783,33 +1235,6 @@ 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":
|
/***/ "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",
|
"name": "vue-aliplayer-v2",
|
||||||
"version": "1.2.5",
|
"version": "1.3.1",
|
||||||
"author": "yxs",
|
"author": "yxs",
|
||||||
"description": "感谢每一位支持开源的朋友. 这是一个基于Alipayer 开发并封装成vue组件的集成播放器.可播放rtmp,m3u8,mp4....视频.除支持直播流与点播的基础功能外,也支持视频的加密播放、清晰度切换、直播时移等业务场景",
|
"description": "感谢每一位支持开源的朋友. 这是一个基于Alipayer 开发并封装成vue组件的集成播放器.可播放rtmp,m3u8,mp4....视频.除支持直播流与点播的基础功能外,也支持视频的加密播放、清晰度切换、直播时移等业务场景",
|
||||||
"main": "lib/vue-aliplayer-v2.umd.min.js",
|
"main": "lib/vue-aliplayer-v2.umd.min.js",
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'VueAliplayerV2',
|
name: 'VueAliplayerV2',
|
||||||
props: {
|
props: {
|
||||||
|
forbidFastForward: { //禁止拖拽快进
|
||||||
|
required: false,
|
||||||
|
type: [Boolean],
|
||||||
|
default: false
|
||||||
|
},
|
||||||
options: { //配置项
|
options: { //配置项
|
||||||
required: false,
|
required: false,
|
||||||
type: [Object],
|
type: [Object],
|
||||||
@ -18,12 +23,12 @@ export default {
|
|||||||
cssLink: { //css版本源
|
cssLink: { //css版本源
|
||||||
required: false,
|
required: false,
|
||||||
type: [String],
|
type: [String],
|
||||||
default: `https://g.alicdn.com/de/prismplayer/2.9.0/skins/default/aliplayer-min.css`
|
default: `https://g.alicdn.com/de/prismplayer/2.9.20/skins/default/aliplayer-min.css`
|
||||||
},
|
},
|
||||||
scriptSrc: { //js版本源
|
scriptSrc: { //js版本源
|
||||||
required: false,
|
required: false,
|
||||||
type: [String],
|
type: [String],
|
||||||
default: `https://g.alicdn.com/de/prismplayer/2.9.0/aliplayer-min.js`
|
default: `https://g.alicdn.com/de/prismplayer/2.9.20/aliplayer-min.js`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@ -124,6 +129,10 @@ export default {
|
|||||||
source () { //监听播放源变化
|
source () { //监听播放源变化
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
|
forbidFastForward () {
|
||||||
|
this.init();
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
options: { //配置项是对象,只能深度监听
|
options: { //配置项是对象,只能深度监听
|
||||||
handler () {
|
handler () {
|
||||||
@ -144,14 +153,16 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handlerFastForward () {
|
||||||
|
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 创建script和css
|
* 创建script和css
|
||||||
* 加载Alipayer的SDK
|
* 加载Alipayer的SDK
|
||||||
*/
|
*/
|
||||||
init () {
|
init () {
|
||||||
const linkID = 'aliplayer-min-css';
|
const linkID = 'app__aliplayer-min-css';
|
||||||
const scriptID = 'aliplayer-min-js';
|
const scriptID = 'app__aliplayer-min-js';
|
||||||
const head = document.getElementsByTagName('head');
|
const head = document.getElementsByTagName('head');
|
||||||
const html = document.getElementsByTagName('html');
|
const html = document.getElementsByTagName('html');
|
||||||
let scriptTag = document.getElementById(scriptID);
|
let scriptTag = document.getElementById(scriptID);
|
||||||
@ -163,6 +174,7 @@ export default {
|
|||||||
link.rel = 'stylesheet';
|
link.rel = 'stylesheet';
|
||||||
link.href = this.cssLink;
|
link.href = this.cssLink;
|
||||||
link.id = linkID;
|
link.id = linkID;
|
||||||
|
// link.className = linkID;
|
||||||
head[0].appendChild(link);
|
head[0].appendChild(link);
|
||||||
}
|
}
|
||||||
if (!scriptTag) {
|
if (!scriptTag) {
|
||||||
@ -170,6 +182,7 @@ export default {
|
|||||||
scriptTag = document.createElement('script');
|
scriptTag = document.createElement('script');
|
||||||
scriptTag.type = "text/javascript";
|
scriptTag.type = "text/javascript";
|
||||||
scriptTag.id = scriptID;
|
scriptTag.id = scriptID;
|
||||||
|
// scriptTag.className = scriptID;
|
||||||
scriptTag.src = this.scriptSrc;
|
scriptTag.src = this.scriptSrc;
|
||||||
html[0].appendChild(scriptTag);
|
html[0].appendChild(scriptTag);
|
||||||
} else {
|
} else {
|
||||||
@ -187,7 +200,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
initPlayer () {
|
initPlayer () {
|
||||||
if (typeof window.Aliplayer != 'undefined') {
|
if (typeof window.Aliplayer != 'undefined') {
|
||||||
const options = this.options;
|
const options = this.deepCloneObject(this.options);
|
||||||
if (options) {
|
if (options) {
|
||||||
for (const key in options) {
|
for (const key in options) {
|
||||||
this.config[key] = options[key];
|
this.config[key] = options[key];
|
||||||
@ -203,6 +216,24 @@ export default {
|
|||||||
this.$emit(this.events[ev], e);
|
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方法取消订阅
|
//通过播放器实例的off方法取消订阅
|
||||||
//player.off('ready',handleReady);
|
//player.off('ready',handleReady);
|
||||||
}
|
}
|
||||||
@ -481,15 +512,44 @@ export default {
|
|||||||
*/
|
*/
|
||||||
off (ev, handle) {
|
off (ev, handle) {
|
||||||
this.player && this.player.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 () { //防止重复创建
|
beforeDestroy () { //防止重复创建
|
||||||
this.dispose(); //销毁播放器(防止直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的bug)
|
this.dispose(); //销毁播放器(防止直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的bug)
|
||||||
const head = document.querySelector('head'); //移除所有的重复创建的标签
|
// 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"]');
|
// const cssNodes = document.querySelectorAll(`link.app__aliplayer-min-css`);
|
||||||
head && nodes.forEach((item)=>{
|
// (html && cssNodes.length > 1) && cssNodes.forEach((item, index)=>{
|
||||||
head.removeChild(item);
|
// 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);
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
25
pages.sh
Normal file
25
pages.sh
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
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