Video src Property
Example
Change the URL of a video:
document.getElementById("myVideo").src = "mov_bbb.ogg";
Try it Yourself »
Description
The src property sets or returns the value of the src attribute of a video.
The src attribute specifies the location (URL) of the video file.
Browser Support
Property | |||||
---|---|---|---|---|---|
src | Yes | 9.0 | Yes | Yes | Yes |
Syntax
Return the src property:
videoObject.src
Set the src property:
videoObject.src = URL
Property Values
Value | Description |
---|---|
URL |
Specifies the URL of the video file. Possible values:
|
Technical Details
Return Value: | A String, representing the URL of the video file. Returns the entire URL, including the protocol (like http://) |
---|
More Examples
Related Pages
HTML reference: HTML <video> src attribute
❮ Video Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.