mirror of
https://github.com/langyuxiansheng/vue-aliplayer-v2.git
synced 2025-04-05 19:41:39 +08:00
Merge pull request #30 from langyuxiansheng/dev_v1.2.5
Dev v1.2.5 更新默认SDK版本,增加全局SDK源配置
This commit is contained in:
commit
9cc30d3360
12
README.md
12
README.md
@ -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
|
||||
@ -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`
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -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"两位网友的反馈与建议.
|
||||
|
@ -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),
|
||||
|
@ -142,12 +142,12 @@ if (typeof window !== 'undefined') {
|
||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.function.name.js
|
||||
var es6_function_name = __webpack_require__("7cfd");
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=f019ba8a&
|
||||
// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc&
|
||||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.playerId}})}
|
||||
var staticRenderFns = []
|
||||
|
||||
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=f019ba8a&
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc&
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/web.dom.iterable.js
|
||||
var web_dom_iterable = __webpack_require__("4634");
|
||||
@ -178,22 +178,17 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
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: function data() {
|
||||
@ -810,7 +805,9 @@ var component = normalizeComponent(
|
||||
// 导入单个组件
|
||||
// 定义 install 方法
|
||||
|
||||
AliplayerV2.install = function (Vue) {
|
||||
AliplayerV2.install = function (Vue, options) {
|
||||
if (options && options.cssLink) AliplayerV2.props.cssLink.default = options.cssLink;
|
||||
if (options && options.scriptSrc) AliplayerV2.props.scriptSrc.default = options.scriptSrc;
|
||||
Vue.component(AliplayerV2.name, AliplayerV2);
|
||||
};
|
||||
|
||||
|
@ -151,12 +151,12 @@ if (typeof window !== 'undefined') {
|
||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.function.name.js
|
||||
var es6_function_name = __webpack_require__("7cfd");
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=f019ba8a&
|
||||
// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc&
|
||||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.playerId}})}
|
||||
var staticRenderFns = []
|
||||
|
||||
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=f019ba8a&
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc&
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/web.dom.iterable.js
|
||||
var web_dom_iterable = __webpack_require__("4634");
|
||||
@ -187,22 +187,17 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
|
||||
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: function data() {
|
||||
@ -819,7 +814,9 @@ var component = normalizeComponent(
|
||||
// 导入单个组件
|
||||
// 定义 install 方法
|
||||
|
||||
AliplayerV2.install = function (Vue) {
|
||||
AliplayerV2.install = function (Vue, options) {
|
||||
if (options && options.cssLink) AliplayerV2.props.cssLink.default = options.cssLink;
|
||||
if (options && options.scriptSrc) AliplayerV2.props.scriptSrc.default = options.scriptSrc;
|
||||
Vue.component(AliplayerV2.name, AliplayerV2);
|
||||
};
|
||||
|
||||
|
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,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",
|
||||
|
@ -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 () {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user