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?
Help!
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.
[quote=376709:@Brian O’Brien]It would seem that the WebFileURL doesn’t have http: or file: prepended to it.
[/quote]
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
The URL i’ve formed is
MoviePlayer1.DesktopURL=Files(0).File.URLPath
file:///private/var/folders/8_/p8x5jhqs1ll0jt5bzs5t8f800000gn/T/TemporaryItems/3
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,127.0.0.1:8080, 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…
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.
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.
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?
example:
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.
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.