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 one of the following:

  • A video from the Media Manager. URL Format: wix:video://v1/<video_uri>/<filename>#posterUri=<poster_uri>&posterWidth=<width>&posterHeight=<height>
  • A video from a video sharing site. URL Format: https://www.site.com/video-path
  • An external video URL. URL Format: http(s)://site.com/video-file.mp4

Type:

stringRead & Write

Was this helpful?

Get the current video's location

Copy Code
1let videoSrc = $w("#myVideoPlayer").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("#myVideoPlayer").src = "wix:video://v1/80c05f_be1c421575e34915ad257571c4055ee4/SampleVideo_1280x720_10mb.mp4#posterUri=80c05f_be1c421575e34915ad257571c4055ee4f001.jpg&posterWidth=1280&posterHeight=720";
Set the current video to a YouTube video

Copy Code
1$w("#myVideoPlayer").src = "https://www.youtube.com/watch?v=VyMsDTwge18";