Search.../

src

Sets or gets the file location of the current video.

Description

Setting the src property changes the displayed video to the video found at the new src value.

Getting the src property returns the location of the current video file.

The video file is a video from the Media Manager. URL Format: wix:video://v1/<video_uri>/<filename>#posterUri=<poster_uri>&posterWidth=<width>&posterHeight=<height>.

Transparent videos are also supported.

Type:

stringRead & Write

Was this helpful?

Get the current video's location

Copy Code
1let videoSrc = $w("#myVideoBox").src;
2// "wix:video://v1/80c05f_be1c421575e34915ad257571c4055ee4/SampleVideo_1280x720_10mb.mp4#posterUri=80c05f_be1c421575e34915ad257571c4055ee4f001.jpg&posterWidth=1280&posterHeight=720"
Set the current video to a video uploaded to your site

Copy Code
1$w("#myVideoBox").src = "wix:video://v1/80c05f_be1c421575e34915ad257571c4055ee4/SampleVideo_1280x720_10mb.mp4#posterUri=80c05f_be1c421575e34915ad257571c4055ee4f001.jpg&posterWidth=1280&posterHeight=720";