I can’t see any reason why it doesn’t or shouldn’t if you have the element on screen for the user to click the play button so that.
Plus, you are setting the video through the src so Wix knows where to get the video to play from.
$w(‘#videoPlayer1’).src = ‘wix:video://v1/11062b_735a34726eb64df29a56b30b60fe2db8/_#posterUri=11062b_735a34726eb64df29a56b30b60fe2db8f000.jpg&posterWidth=1920&posterHeight=1080’;
Or when you have it with an event handler like onClick
export function playButton_onclick(event) {
$w(“#myVideoPlayer”).play();
or
$w(“#playButton”).onClick( (event) => {
$w(“#myVideoPlayer”).play();
Or you wrap it all up in the page onReady function for example
$w.onReady(function () {
$w(“#myVideoPlayer”).play();
or
$w.onReady( () => {
$w(“#myVideoPlayer”).play();
Or you use the isPlaying function to check if the video is playing and if not set to play.
if( $w(“#myElement”).isPlaying ) {
$w(“#myElement”).pause();
}
else {
$w(“#myElement”).play();
}
However, you would probably want to use Pause.
if( $w(“#myElement”).isPlaying ) {
$w(“#myElement”).play();
}
else {
$w(“#myElement”).pause();
}
Like here if you want to hide the videoplayer if there is no video file to play.
Plus check to see if you have used togglePlay to as that could cause it to be paused when you want it to be playing instead.
Also, if you are using an videoplayer element, then check to see what your autoplay settings are on too, as if it is disabled then the user will need to click play to get it going.
Otherwise, it could be that autoplay is paused unless sound is muted.
https://support.wix.com/en/article/adding-a-videobox
Finally, note that some browsers have changed things so videos don’t autostart etc.