YouTip LogoYouTip

Prop Track Src

# Track src Attribute [![Image 8: Track Object Reference](#) Track Object](#) ## Example Get the URL of the track file: var x = document.getElementById("myTrack").src; The _x_ output value is: http://www.w3cschool.cc/jsref/subtitles_en.vtt * * * ## Definition and Usage The src attribute is used to set or return the src attribute value of a track. The src attribute describes the URL of the track file. * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) The src attribute is supported in Internet Explorer, Opera, and Chrome. **Note:** Firefox, Safari, and Internet Explorer 9 and earlier versions do not support the src attribute. * * * * * * ## Syntax Get the src attribute: _trackObject_.src Set the src attribute: _trackObject_.src=_URL_ ## Property Values | Value | Description | | --- | --- | | _URL_ | Describes the URL of the track file | ## Technical Details | Return Value: | A string representing the URL of the track text, returns the absolute URL, including the protocol part (e.g., http://) | | --- | * * * ## More Examples ## Example Change the URL of the track file: document.getElementById("myTrack").src="subtitles_no.vtt"; * * * ## Related Pages HTML Reference: [HTML src Attribute](#) * * Track Object](#)
← Prop Video AudiotracksDom Obj Video β†’