Using Video Player to show an external video URL

I am trying to use the VideoPlayer to show an external video.
I have been able to do this with the video using .VideoUrl, however, using a video player I have so far been unsucessful in my attempts.

I am trying to follow this instruction;
The URL format is: 1. wix:video://v1/<video_uri>/#posterUri=<poster_uri>&posterWidth=&posterHeight= Or 2. (http(s)|blob|data)://site.com/video-file.mp4

Can someone provide a working example of an external video playing in a VideoPlayer using this method please?

Hello

To set the source of a video player all you have to do is access the .src property of the element.
It would look like this:

$w('#videoPlayer1').src = 'wix:video://v1/11062b_735a34726eb64df29a56b30b60fe2db8/_#posterUri=11062b_735a34726eb64df29a56b30b60fe2db8f000.jpg&posterWidth=1920&posterHeight=1080';

Goodluck!
Majd

Thanks for the reply.
However, I am looking for a solution to have a video play that is not stored in wix, using this player.
For example, a youtube video.
(I know this can be done quite easily with the other video player, but would like to use this one as it has more functionality)

Could you give an example of this working with an EXTERNAL url

The instructions say to do this, but I cannot get it to work!
(http(s)|blob|data)://site.com/video-file.mp4

@mqumseya @majdq @qumseyamajd ???

Hello Eaton,

Can you give me an example of the video you want to upload? Paste its url here.

All there is to do is to select the element src property and set it to that url

$w('#videoPlayer1).src = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'

Goodluck!

@mqumseya

I have used your exact example and it is not working…

https://eatonjthomas.wixsite.com/topupvid/addvideo

When the CHANGE button is pressed it should change but it doesn’t.
Here is the code…

export function button4_click() {
$w(‘#videoPlayer1’).src = ‘Rick Astley - Never Gonna Give You Up (Official Music Video) - YouTube’;

}

@mqumseya

As I am not getting any more responses, I have opened a new post for this question here…

@eaton-thomas
Answered by Yisrael in the link you wrote above.
Roi