|
@@ -176,20 +176,20 @@
|
|
|
watch:{
|
|
|
show(val){
|
|
|
this.updateShowList()
|
|
|
- },
|
|
|
- mediaType(val){
|
|
|
- if( !val ) return;
|
|
|
- let mediaUrl = this.mediaUrl;
|
|
|
- if( val == 'ld'){
|
|
|
- mediaUrl = mediaUrl.replace('/hls/', '/ld/');
|
|
|
- }else{
|
|
|
- mediaUrl = mediaUrl.replace('/ld/', '/hls/');
|
|
|
- }
|
|
|
- this.options.sources = [{src:mediaUrl,type: "application/x-mpegURL"}];
|
|
|
- this.options.playtimes = this.media.position||0;
|
|
|
- this.options.autoplay = this.options.playtimes>0;
|
|
|
- this.mediaDialog = true;
|
|
|
}
|
|
|
+ // mediaType(val){
|
|
|
+ // if( !val ) return;
|
|
|
+ // let mediaUrl = this.mediaUrl;
|
|
|
+ // if( val == 'ld'){
|
|
|
+ // mediaUrl = mediaUrl.replace('/hls/', '/ld/');
|
|
|
+ // }else{
|
|
|
+ // mediaUrl = mediaUrl.replace('/ld/', '/hls/');
|
|
|
+ // }
|
|
|
+ // this.options.sources = [{src:mediaUrl,type: "application/x-mpegURL"}];
|
|
|
+ // this.options.playtimes = this.media.position||0;
|
|
|
+ // this.options.autoplay = this.options.playtimes>0;
|
|
|
+ // this.mediaDialog = true;
|
|
|
+ // }
|
|
|
},
|
|
|
filters:{
|
|
|
showProgressColor: function (val) {
|
|
@@ -360,10 +360,10 @@
|
|
|
if( res.code != 200) return;
|
|
|
let {mediaUrl, id, position} = res.data||{};
|
|
|
this.mediaUrl = res.data.mediaUrl;
|
|
|
- if( this.mediaType == 'ld' ){
|
|
|
- this.mediaUrl = this.mediaUrl.replace('/hls/', '/ld/')
|
|
|
+ if( this.mediaUrl.indexOf('/hls/') == -1){
|
|
|
+ this.mediaType = 'ld'
|
|
|
}else{
|
|
|
- this.mediaUrl = this.mediaUrl.replace('/ld/', '/hls/')
|
|
|
+ this.mediaType = 'hls'
|
|
|
}
|
|
|
this.media.position = position;
|
|
|
this.media.id = id;
|