Skip to content

Commit

Permalink
Merge pull request #30 from langyuxiansheng/dev_v1.2.5
Browse files Browse the repository at this point in the history
Dev v1.2.5 更新默认SDK版本,增加全局SDK源配置
  • Loading branch information
langyuxiansheng authored Oct 12, 2020
2 parents 66e2892 + 1b0d55a commit 9cc30d3
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 35 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ yarn add vue-aliplayer-v2
import VueAliplayerV2 from 'vue-aliplayer-v2';

Vue.use(VueAliplayerV2);

//可选全局配置
//Vue.use(VueAliplayerV2,{
// cssLink: 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css',
// scriptSrc: 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js'
//});
```

#### 局部注册 App.vue
Expand Down Expand Up @@ -200,12 +206,12 @@ props:{
cssLink:{ //css版本源
required: false,
type: [String],
default: `https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css`
default: `https://g.alicdn.com/de/prismplayer/2.9.0/skins/default/aliplayer-min.css`
},
scriptSrc:{ //js版本源
required: false,
type: [String],
default: `https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js`
default: `https://g.alicdn.com/de/prismplayer/2.9.0/aliplayer-min.js`
}
}
```
Expand Down Expand Up @@ -406,6 +412,8 @@ See [Configuration Reference](https://cli.vuejs.org/config/).

## 更新日志

> v1.2.5 更换默认的播放器SDK版本2.8.2 => 2.9.0,2.8.2的版本存在多个播放器同时播放直播流异常的bug,增加了全局SDK版本配置,可以在Vue.use()的时候进行配置.
> v1.2.4 修复多个播放器加载,只初始化一个播放器的bug.文档部分更新,增加了问题栏. 感谢"沙洲ad"的反馈与建议.
> v1.2.3 优化播放器的初始化代码,调整包内结构,优化局部组件的注册方式,也兼容老版本的引用方式.文档部分更新,增加了问题栏. 感谢"liangzhiyuan2015"和"fancheur"两位网友的反馈与建议.
Expand Down
5 changes: 4 additions & 1 deletion examples/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import Vue from 'vue';
import App from './App.vue';
import VueAliplayerV2 from '../packages';
Vue.use(VueAliplayerV2);
Vue.use(VueAliplayerV2,{
// cssLink: 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css',
// scriptSrc: 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js'
});
Vue.config.productionTip = false;
new Vue({
render: h => h(App),
Expand Down
17 changes: 7 additions & 10 deletions lib/vue-aliplayer-v2.common.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 7 additions & 10 deletions lib/vue-aliplayer-v2.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/vue-aliplayer-v2.umd.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "vue-aliplayer-v2",
"version": "1.2.4",
"version": "1.2.5",
"author": "yxs",
"description": "感谢每一位开源的开发者. 这是一个基于Alipayer 开发并封装成vue组件的集成播放器.",
"description": "感谢每一位支持开源的朋友. 这是一个基于Alipayer 开发并封装成vue组件的集成播放器.可播放rtmp,m3u8,mp4....视频.除支持直播流与点播的基础功能外,也支持视频的加密播放、清晰度切换、直播时移等业务场景",
"main":"lib/vue-aliplayer-v2.umd.min.js",
"private": false,
"license": "MIT",
Expand Down
9 changes: 2 additions & 7 deletions packages/AliplayerV2/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,15 @@ export default {
type: [String],
default: null
},
// id:{
// required: false,
// type: [String],
// default: null
// },
cssLink:{ //css版本源
required: false,
type: [String],
default: `https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css`
default: `https://g.alicdn.com/de/prismplayer/2.9.0/skins/default/aliplayer-min.css`
},
scriptSrc:{ //js版本源
required: false,
type: [String],
default: `https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js`
default: `https://g.alicdn.com/de/prismplayer/2.9.0/aliplayer-min.js`
}
},
data () {
Expand Down
6 changes: 4 additions & 2 deletions packages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
// 导入单个组件
import VueAliplayerV2 from './AliplayerV2';
// 定义 install 方法
VueAliplayerV2.install = (Vue) =>{
Vue.component(VueAliplayerV2.name, VueAliplayerV2)
VueAliplayerV2.install = (Vue, options) =>{
if(options && options.cssLink) VueAliplayerV2.props.cssLink.default = options.cssLink;
if(options && options.scriptSrc) VueAliplayerV2.props.scriptSrc.default = options.scriptSrc;
Vue.component(VueAliplayerV2.name, VueAliplayerV2);
};
VueAliplayerV2.Player = VueAliplayerV2;
export default VueAliplayerV2;

0 comments on commit 9cc30d3

Please sign in to comment.