WebMoviePlayer question.

My web app prompts the user to up load an mp4 video to the server with a WebFileUploader
That server needs to make a link that the client can access from the data it just took from the client.

According to the documentation:

So I can write the mp4 to my drive and then in my App HandleURL event, serve the file to the player?

WebFiles work great for that sort of thing!

Well my videos aren’t playing…
It would seem that the WebFileURL doesn’t have http: or file: prepended to it.
I am assuming the extension is irrelevant. mp4 or mpg or mpeg or mpeg-2
i have tried mime type video/mp4 and video/mpg…
no luck.

I would not assume so, since as you posted

and without the extension, the URL is incomplete

[quote=376709:@Brian O’Brien]It would seem that the WebFileURL doesn’t have http: or file: prepended to it.
If it starts with just // (like for example the url is: //myserver.com/videofile.mp4) it’s a special shortcut that tells the browser to use the same protocol it’s already on. This means if you load your web app on https:// and the file URL is //myserver.com/videofile.mp4, then the browser will use https://myserver.com/videofile.mp4

I’ve posted a demo project here
Everything looks ok to me in code but nothing plays…

Care to take a look?

The URL i’ve formed is

The mp4 is in a MemoryBlock from the file upload.
I can not pass the memory block to the movie player for it to play.
I have to write it to disk (forcedownload) and then form a url to that file that ‘my app’ will serve when the client requests it?

Should I mangle this URL into http to my host and port… 3 doesn’t look like

One might think the url needs to be formed differently depending on who and where the client is?

I’m testing my server on localhost,, which is also where I’m running the browser. (Chrome)

If I use showURL then video plays but then it starts popping up in a new window or it takes over the entire browser display…

I had a quick look,
I changed

MoviePlayer1.DesktopURL=Files(0).File.URLPath  //MyWebFile.URL



Seemed to work with a webm file I downloaded but it failed with a mp4 file I had… Don’t have time to find out why though!

no luck me…

This is the url i ended up forming …

The stuff in bold i put in myself as that’s where I believe I’m serving from…
The WebMoviePlayer isn’t playing it… but VLC / open network… The video is playing fine.

I’m on a mac on chrome… hmm… h264?

If you open that link with your browser, does it play or offer a download?

Depending on what type of media. AVI got downloaded mp4 did nothing. I’m trying mov now then mpeg.
I don’t know if you know VLC but it’s a media player. It has a file open network. I copy the url into that application and the video plays.

I’m tempted to put a HtmlViewer?



That might work. I would build a webSDK control. The problem with htmlViewers is they place the control in an i-frame that is out of your reach.

I havn’t tried to use the webmovieplayer before but it seems to use flash not HTML5, for this reason alone I would opt for building a webSDK control.

However, by the sounds of it, the real issue is video codec browser compatibility. does the video play if you load it directly from the browser?


I was just looking for iFrames… how ironic.

The video do not play directly from the browser they download.

When they say htmlViewer do they mean html5?
I’m on a mac so flash is a pain.

I was just going to use a custompagesource and stuff it with the html5 example code from w3schools.
I would then set the video url in the html source.

I’m wondering where I’m going to get the resolution of the videostream, as the html5 seems to be able to use it… but maybe it doesn’t need it.

I would say: WebFile is bad for WebMoviePlayer!
The Xojo web app has better things to do than streaming video.

Better just put the video on some URL pointing to a Webserver and let the Webserver deliver it.
If needed, add temporary HTTP Access password or generate new random URL to video.

It works…
Pretty limited functionality mp4 only.
I guess everything needs to be transcoded with ffmpeg for reliability.

Here is the project. Thanks for the help.
No encrypted urls yet… soon come.
Movie Player and html5

Thanks for sharing the code Brian!

Did you get better video codec compatibility by using the html5 player?

If i remember correctly i put a MoviePlayer and a html5 player …
mp4 seems to be about the only thing properly supported.
avi mpg… pfff… not much luck.
I get the feeling people played to lose with file extensions to document what the data the file is and it probably isn’t what they think it is.

Found these in the 2018r1 release notes.
19275 Framework » Web WebMoviePlayer now shows native HTML5 video controls on all supported browsers.
37367 Framework » Web WebMoviePlayer now uses the native HTML5 video player for all browsers.

Ya… did something like this:

[code]dim html5 as string = _
" " +_
" " +_
" " +_
“<video width=” + chr(34) + “320”+ chr(34) + " height=" + chr(34) + “240” + chr(34) + " controls>" +_
“<source src=” + chr(34) + “URL” + chr(34) + " type=" + chr(34) + “MIME”+ chr(34) + “>” +_
“Your browser does not support the video tag.” +_
“” +_
“” +_

dim html5 as string = _

" " +_
" " +_
" " +_
“<video width=” + chr(34) + “320”+ chr(34) + " height=" + chr(34) + “240” + chr(34) + " controls>" +_
“<source src=” + chr(34) + “URL” + chr(34) + " type=" + chr(34) + “MIME”+ chr(34) + “>” +_
“Your browser does not support the video tag.” +_
“” +_
“” +_

html5 = replaceall(html5, “URL”, MyWebFile.URL)
html5 = replaceall(html5, “MIME”, MyWebFile.MIMEType)

The question is is a HTMLViewer html5 ready?

Desktop, it depends. Web, yes, it’s just an iframe.