webmovieplayer how?

The documentation on using webmovieplayer is poor. I’ve got an app that uploads a video to a folderitem and then it should play it, but I can’t get it to work. I certainly do not understand the mobileWiFiURL thing. It seems that identifying the video should be different.

Any ideas?

code below:

[code]videoUploader.visible = false
btnBeginUpload.visible = false
mpUploadedVideo.visible = true

dim f as folderItem
f = app.uploadedFiles.child(session.uploadedFiles(0))

if f <> nil then
if f.exists then
mpUploadedVideo.autoPlay = true
mpUploadedVideo.mobileWifiURL = f.urlPath
end if
end if[/code]

Edit (Paul): Add code tags per Post Formatting Tips.

You can’t point a WebMoviePlayer at a file url. Try creating a WebFile, loading the file into that and use the WebFile’s url property instead,

Make sure the WebFile is instantiated as a property of the WebPage or the Session so it doesn’t go out of scope before the MoviePlayer requests it.

You’ll eat something like:

myWebFile = WebFile.Open(f, False)

Second parameter leaves the file on disk.


As for the three urls, browsers will automatically choose the correct version based on their connectivity to the web, so you should be doing something like this:

Desktop = High Bandwidth
WiFi = Medium Bandwidth
Cellular = Low Bandwidth

I’ve updated these doc pages to explicitly state you cannot use local file URLs as a web URL.

Thanks Greg. Any way to play the video in my web page?

Did you try my suggestion about the web File?

Yes Greg . . . Worked great. Allowed a download and play on my movie player on my computer.