fixes
This commit is contained in:
parent
2a79ac6849
commit
7633f8ffe2
2 changed files with 26 additions and 8 deletions
|
|
@ -82,7 +82,13 @@ class FFStream:
|
||||||
"""
|
"""
|
||||||
Is the stream labelled as a video stream.
|
Is the stream labelled as a video stream.
|
||||||
"""
|
"""
|
||||||
return self.__dict__.get("codec_type", None) == "video"
|
if self.__dict__.get("codec_type", None) != "video":
|
||||||
|
return False
|
||||||
|
|
||||||
|
if self.__dict__.get("codec_name", None) in ["png", "mjpeg", "gif", "bmp", "tiff", "webp"]:
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
def is_subtitle(self):
|
def is_subtitle(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<video ref="video" :poster="previewImageLink" :controls="isControls" :title="title" playsinline>
|
<video ref="video" :data-poster="thumbnail" :controls="isControls" :title="title" playsinline>
|
||||||
<source :src="link" type="application/x-mpegURL" />
|
<source :src="link" type="application/x-mpegURL" />
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -31,10 +31,6 @@ import Plyr from 'plyr'
|
||||||
import 'plyr/dist/plyr.css'
|
import 'plyr/dist/plyr.css'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
previewImageLink: {
|
|
||||||
type: String,
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
link: {
|
link: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
|
|
@ -109,7 +105,7 @@ const prepareVideoPlayer = () => {
|
||||||
mediaMetadata['artist'] = props.artist
|
mediaMetadata['artist'] = props.artist
|
||||||
}
|
}
|
||||||
|
|
||||||
player = new Plyr(video.value, {
|
let opts = {
|
||||||
debug: false,
|
debug: false,
|
||||||
clickToPlay: true,
|
clickToPlay: true,
|
||||||
keyboard: { focused: true, global: true },
|
keyboard: { focused: true, global: true },
|
||||||
|
|
@ -125,12 +121,28 @@ const prepareVideoPlayer = () => {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
key: 'plyr'
|
key: 'plyr'
|
||||||
},
|
},
|
||||||
|
poster: props.thumbnail,
|
||||||
|
artist: props.artist,
|
||||||
title: props.title,
|
title: props.title,
|
||||||
mediaMetadata: mediaMetadata,
|
mediaMetadata: mediaMetadata,
|
||||||
captions: {
|
captions: {
|
||||||
update: true,
|
update: true,
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
|
if (props.artist) {
|
||||||
|
opts.artist = props.artist
|
||||||
|
}
|
||||||
|
|
||||||
|
if (props.title) {
|
||||||
|
opts.title = props.title
|
||||||
|
}
|
||||||
|
|
||||||
|
if (props.thumbnail) {
|
||||||
|
opts.poster = props.thumbnail
|
||||||
|
}
|
||||||
|
|
||||||
|
player = new Plyr(video.value, opts);
|
||||||
|
|
||||||
hls = new Hls({
|
hls = new Hls({
|
||||||
debug: false,
|
debug: false,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue