fix subtitle transcoding, guard play clicks
This commit is contained in:
@@ -212,9 +212,16 @@ export function browserDeviceProfile(audioPassthrough = false) {
|
|||||||
|
|
||||||
SubtitleProfiles: [
|
SubtitleProfiles: [
|
||||||
{ Format: 'vtt', Method: 'External' },
|
{ Format: 'vtt', Method: 'External' },
|
||||||
|
{ Format: 'vtt', Method: 'Hls' },
|
||||||
{ Format: 'subrip', Method: 'External' },
|
{ Format: 'subrip', Method: 'External' },
|
||||||
|
{ Format: 'subrip', Method: 'Embed' },
|
||||||
|
{ Format: 'subrip', Method: 'Hls' },
|
||||||
{ Format: 'ass', Method: 'External' },
|
{ Format: 'ass', Method: 'External' },
|
||||||
|
{ Format: 'ass', Method: 'Embed' },
|
||||||
|
{ Format: 'ass', Method: 'Hls' },
|
||||||
{ Format: 'ssa', Method: 'External' },
|
{ Format: 'ssa', Method: 'External' },
|
||||||
|
{ Format: 'ssa', Method: 'Embed' },
|
||||||
|
{ Format: 'ssa', Method: 'Hls' },
|
||||||
],
|
],
|
||||||
|
|
||||||
ResponseProfiles: [],
|
ResponseProfiles: [],
|
||||||
|
|||||||
@@ -1215,7 +1215,7 @@ export default function PlayerPage() {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
const p = playerRef.current
|
const p = playerRef.current
|
||||||
if (!p) return
|
if (!p) return
|
||||||
if (p.paused) p.play()
|
if (p.paused) p.play().catch(() => {})
|
||||||
else p.pause()
|
else p.pause()
|
||||||
showControls()
|
showControls()
|
||||||
}}
|
}}
|
||||||
@@ -1640,7 +1640,7 @@ export default function PlayerPage() {
|
|||||||
onChapterJump={seekToSeconds}
|
onChapterJump={seekToSeconds}
|
||||||
onTogglePlay={() => {
|
onTogglePlay={() => {
|
||||||
const p = playerRef.current
|
const p = playerRef.current
|
||||||
if (p?.paused) p.play()
|
if (p?.paused) p.play().catch(() => {})
|
||||||
else p?.pause()
|
else p?.pause()
|
||||||
}}
|
}}
|
||||||
onPrevious={() => {
|
onPrevious={() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user