Тип отслеживания _
Пример
Получить вид текстовой дорожки:
var x = document.getElementById("myTrack").kind;
Результат x может быть:
subtitles
Определение и использование
Свойство kind задает или возвращает значение атрибута kind дорожки.
Атрибут kind определяет вид текстовой дорожки.
Поддержка браузера
Property | |||||
---|---|---|---|---|---|
kind | Yes | 10.0 | Not supported | Not supported | Yes |
Синтаксис
Вернуть свойство вида:
trackObject.kind
Установите свойство вида:
trackObject.kind = "captions|chapters|descriptions|metadata|subtitles"
Значения свойств
Value | Description |
---|---|
captions | The track defines translation of dialogue and sound effects (suitable for deaf users) |
chapters | The track defines chapter titles (suitable for navigating the media resource) |
descriptions | The track defines a textual description of the video content (suitable for blind users) |
metadata | The track defines content used by scripts. Not visible for the user |
subtitles | The track defines subtitles, used to display subtitles in a video |
Технические детали
Возвращаемое значение: | Строка, представляющая вид текстовой дорожки. |
---|
Дополнительные примеры
Пример
Установите вид текстовой дорожки:
document.getElementById("myTrack").kind = "chapters";
Связанные страницы
Справочник по HTML: HTML-атрибут типа <track>
❮ Отслеживание объекта