Javascript Reference - HTML DOM Track srclang Property








The srclang property sets or gets the value of the srclang attribute of the track.

The srclang attribute specifies the language of the track text data.

Browser Support

srclang Yes 10.0 Yes Yes Yes

Syntax

Return the srclang property.

var v = trackObject.srclang

Set the srclang property.

trackObject.srclang=language_code




Property Values

Value Description
language_code Specifies a two-letter language code that specifies the language of the track text data

Return Value

A String, representing the language code of the text track data.