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