I am able to upload a video file, it is uploading fine, but as it uploads, I provide the Url to the video player to preview the uploaded video. The video player does not play the preview. As you can see from the code below I generate the Media Manager URL as part of the process.
The console generates;
GET https://video.wixstatic.com/video/dbe870_efccdf0dae6f4357a693f7838934a269/720p/mp4/file.mp4 403
Which I assume is why the video is not playing. If I refresh the browser (which will NOT be an option in production), then pass the same URL to the video player it plays no problem.
$w ( “#uploadVideo” ). uploadFiles ()
. then ( ( uploadedFiles ) => {
$w ( "#mediaUploadInfo" ). text = "Preview is being prepared\n One moment, loading preview...." ;
wixUrl = uploadedFiles [ 0 ]. fileUrl ;
console . log ( 'Raw Video Url - ' + wixUrl );
this console log request returns;
wix:video://v1/dbe870_efccdf0dae6f4357a693f7838934a269/FACTS-4The-reason-economists- cant-wrap-their-head-around-high-inflation-a.mp4#posterUri=dbe870_efccdf0dae6f4357a693f7838934a269f001.jpg&posterWidth=1152&posterHeight=720
and this is what is being passed to the video player
$w ( "#videoPreview" ). src = wixUrl ;
$w ( "#newVideoUrl" ). value = wixUrl ;
I am not sure what the problem is. Because if I pass a placeholder video URL to the player in the same function, the player accepts it. I can only assume it’s the 403 error that’s the problem?