"/> ">
如果您為影片提供兩個字幕軌道,請使用預設屬性來識別要啟用的軌道。
您可以嘗試以下程式碼來實現軌道的預設屬性 -
<!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>
以上是如果使用者的偏好設定沒有指示其他曲目更合適,如何識別應啟用該曲目在HTML中?的詳細內容。更多資訊請關注PHP中文網其他相關文章!