background
Sets or gets an object containing information about the TextMask's background.
Setting the src
property sets the source of the TextMask's background. The src
property can be set to an image or a video. Images can either be from the Media Manager or an external image from any web location. Videos must come from the Media Manager.
The supported URL formats are:
- Images from the Media Manager:
wix:image://v1/<uri>/<filename>#originWidth=<width>&originHeight=<height>[&watermark=<watermark_manifest_string>]
- Videos from the Media Manager:
wix:video://v1/<video_uri>/<filename>#posterUri=<poster_uri>&posterWidth=<width>&posterHeight=<height>
- Images from the web:
http(s)://<image url>
The URL for Media Manager images and videos is the fileUrl
value returned by the listFiles()
function.
Getting the src
property gets the source of the TextMask's background.
Type:
NAME
TYPE
DESCRIPTION
The file location of the background image or video.
Setting the src
property changes the
displayed image or video to the image or video found at the new src
value.
Getting the src
property returns the
location of the current image or video file.
Images can either be from the Media Manager or an external image from any web location. Videos must come from the Media Manager.
The URL formats supported are:
- Images from the Media Manager:
wix:image://v1/<uri>/<filename>#originWidth=<width>&originHeight=<height>[&watermark=<watermark_manifest_string>]
- Videos from the Media Manager:
wix:video://v1/<video_uri>/<filename>#posterUri=<poster_uri>&posterWidth=<width>&posterHeight=<height>
- Images from the web:
http(s)://<image url>
Was this helpful?
1const textMaskBackground = $w("#textMask1").background.src; // "wix:image://v1/68d3a9_1de7529c444b4c9eb38401f8efe0cad2.jpg/flowers.jpg#originWidth=1970&originHeight=1120"
1$w("#textMask1").background.src = "wix:video://v1/8b7eef_d46e23f9619c4e0a8b96babbf002/file%20(1).mp4#posterUri=8b7eef_d46e23f9619c4e0a8b96babbf002.jpg&posterWidth=1080&posterHeight=1080";
1$w("#textMask1").background.src = "http://placehold.it/250x250";