mirror of
https://github.com/mmjee/Piped-Material.git
synced 2024-12-06 19:26:36 +01:00
Backport "Fix for browsers without vp9"
See https://github.com/TeamPiped/Piped/commit/e4b24043ee7b1aa187f0b90b5d0bce5dc8a8c347
This commit is contained in:
@@ -37,6 +37,14 @@ export default {
|
||||
computed: {
|
||||
shouldAutoPlay () {
|
||||
return this.$store.getters.getPreferenceBoolean('playerAutoPlay', true)
|
||||
},
|
||||
|
||||
preferredVideoCodecs () {
|
||||
const preferredVideoCodecs = []
|
||||
if (this.$refs.videoEl.canPlayType('video/mp4; codecs="av01.0.08M.08"') !== '') { preferredVideoCodecs.push('av01') }
|
||||
if (this.$refs.videoEl.canPlayType('video/webm; codecs="vp9"') !== '') preferredVideoCodecs.push('vp9')
|
||||
if (this.$refs.videoEl.canPlayType('video/mp4; codecs="avc1.4d401f"') !== '') { preferredVideoCodecs.push('avc1') }
|
||||
return preferredVideoCodecs
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -163,7 +171,7 @@ export default {
|
||||
const disableVideo = this.$store.getters.getPreferenceBoolean('listen', false) && !this.video.livestream
|
||||
|
||||
this.player.configure({
|
||||
preferredVideoCodecs: ['av01', 'vp9', 'avc1'],
|
||||
preferredVideoCodecs: this.preferredVideoCodecs,
|
||||
preferredAudioCodecs: ['opus', 'mp4a'],
|
||||
manifest: {
|
||||
disableVideo: disableVideo
|
||||
|
||||
Reference in New Issue
Block a user