Playing movie in a web app

Hi, guys,

I just learned that movie cannot be played in a web app via FolderItem or directly imported into the project.

If I have a XOJO cloud account, do I need to upload the movie to the the cloud, get it URL and put it into the the corresponding field for the Movie Player?

Are there alternative ways? I though of putting the movie to the Youtube and play it via the YouTube Player.

For some reason, the YouTube Player returns an error when I try to play a random movie from it.

I would appreciate any guidance with this regard.

Thank you,

Val

I guess, the question is “What is the best way to play a movie in a web app?”

That’s one way. You could use a WebFile to get a URL, but if you upload the file near the app, you could also use a direct URL, which would be infinitely more efficient for the app. For instance, if you put it next to the app and the app’s name was MyApplication, the URL might look like this:

http://12.34.56.78/MyApplication/movie.mp4

Some YouTube movies have restrictions on just being played anywhere.

HI, Greg,

Thank you for the advice. I tried to test playing movie via placing it next to the app. Since I do not have a server yet, I placed it into the MyApplication.debug folder and replaced the first part of the URL with “127.0.0.1”

The URL looked like this “http://127.0.0.1/MyAppliation/movie.com

It did not work.

Then I found a YouTube video produced by our university and tried playing it with the YouTubeMovie. It worked but all those YouTube controls are very distracting.

I need to find a way to play the movie via the WebMoviePlayer.

I am working on a EHR (Electronic Health Record) for medical school. I would like medical students to see a series of videos where occupational therapists are performing some tests on the patients. All content is simulated - no HIPPA protection is needed.

I am learning web app development as I go. This is my first one. I’ve created several desktop apps though.

I am just trying to see if I could make something useful for the school.

Thank you again,

Val

I’m pretty sure “…movie.com” will not work. it must be movie.mp4 or mpeg or mkv ?

Hi, Jean-Yves,

Thank you for catching up the typo. It was actually an mp4 extension. I just checked it again.

I must be doing something wrong.

Val

Does anyone have a video on their server and is willing to give me the URL to test if my app can play a movie?

Thank you in advance,

Val

This is very frustrating.

I have placed a movie in the DropBox. When I past the link to the movie to the web browser, it shows up the movie.

In my test web app I have created two objects - an HTMLViewer and a WebMoviePlayer.

The HTMLViewer shows a web page with the movie in it, and WebMoviePlayer does not do anything.

I am getting desperate.

Can anyone help?

Thank you,

Val

[quote=404218:@VALERIY KOZMENKO]This is very frustrating.

I have placed a movie in the DropBox. When I past the link to the movie to the web browser, it shows up the movie.

In my test web app I have created two objects - an HTMLViewer and a WebMoviePlayer.

The HTMLViewer shows a web page with the movie in it, and WebMoviePlayer does not do anything.

I am getting desperate.

Can anyone help?

Thank you,

Val[/quote]
ok, so dropbox is going to be tricky. if you look at a dropbox link, it typically looks like this:

https://www.dropbox.com/s/hkutvkluduxlo29/LoadLog.png?dl=0

What you need to do is change that last bit after the ? to raw=1 like this:

https://www.dropbox.com/s/hkutvkluduxlo29/LoadLog.png?raw=1

Even then, the mime types may not be correct from the server.

[quote=404175:@VALERIY KOZMENKO]Thank you for the advice. I tried to test playing movie via placing it next to the app. Since I do not have a server yet, I placed it into the MyApplication.debug folder and replaced the first part of the URL with “127.0.0.1”

The URL looked like this “http://127.0.0.1/MyAppliation/movie.com

It did not work.[/quote]
Right. you can’t test that way locally because there isn’t an external web server running to serve the file.

Thank you, Greg,

When I changed the end of the URL to “raw=1” it worked.

What a relief! I was struggling with playing the video whole day.

I hope playing it from the server is not much different from playing it from dropbox.

Thank you again,

Val

Do you still need that URL?

http://www.1816media.nl/xojo/XojoDevFaster.mp4