如果您為視頻提供兩個(gè)字幕軌道,請使用默認(rèn)屬性來標(biāo)識要啟用的軌道。
示例
您可以嘗試以下代碼來實(shí)現(xiàn)軌道的默認(rèn)屬性 –
<!DOCTYPE HTML> <html> <body> <video width = "300" height = "200" controls autoplay> <source src = "/html5/foo.ogg" type = "video/ogg" /> <source src = "/html5/foo.mp4" type = "video/mp4" /> <track src = "subtitles_en.vtt" kind = "subtitles" srclang = "en" label = "English"> <track src = "subtitles_ru.vtt" kind = "subtitles" srclang = "ru" label = "Russia" default> Your browser does not support the video element. </video> </body> </html>
登錄后復(fù)制
以上就是如果用戶的偏好設(shè)置沒有指示其他曲目更合適,如何識別應(yīng)啟用該曲目在HTML中?的詳細(xì)內(nèi)容,更多請關(guān)注www.92cms.cn其它相關(guān)文章!