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...
@Brian OBrien I am assuming the extension is irrelevant. mp4 or mpg or mpeg or mpeg-2
I would not assume so, since as you posted
The URLs must be actual URLs that would also work in a web browser
and without the extension, the URL is incomplete
@Brian OBrien 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
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,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...
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?
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.
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.
Ya.. did something like this:
dim html5 as string = _ "<!DOCTYPE html> " +_ "<html> " +_ "<body> " +_ "<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." +_ "</video>" +_ "</body>" +_ "</html>" dim html5 as string = _ "<!DOCTYPE html> " +_ "<html> " +_ "<body> " +_ "<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." +_ "</video>" +_ "</body>" +_ "</html>" html5 = replaceall(html5, "URL", MyWebFile.URL) html5 = replaceall(html5, "MIME", MyWebFile.MIMEType) HTMLViewer1.LoadPage(html5)
The question is is a HTMLViewer html5 ready?
@Brian OBrien avi mpg.. pfff.. not much luck.
This hasn’t changed. But you can still use ogv files for Firefox if you want. The goal was to get the APIs updated (now that we can) and to have all supported browsers use the same format so you don’t have to serve different ones for each platform/browser.
You should be able to use an H.264 m4v file on all supported browsers.