mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-01 20:16:36 +08:00
优化播放体验
优化播放体验
This commit is contained in:
@@ -12,6 +12,10 @@ export function pickPlayerMode(media: Media): PlayerMode {
|
||||
|
||||
export function needsTranscodeForBrowser(media: Media): boolean {
|
||||
const container = (media.container ?? '').toLowerCase()
|
||||
// .strm 媒体内容是远程直链(服务端 302 到播放 CDN 或反向代理),
|
||||
// 浏览器直接播放该远程流即可,转码无意义且必然失败(ffmpeg 无法读取
|
||||
// 文本 strm),恒走 direct play。
|
||||
if (container.includes('strm') || String(media.strm_url ?? '').trim() !== '') return false
|
||||
const videoCodec = (media.video_codec ?? '').toLowerCase()
|
||||
const audioCodec = (media.audio_codec ?? '').toLowerCase()
|
||||
const containerOK = directContainers.some((item) => container.includes(item))
|
||||
|
||||
Reference in New Issue
Block a user