I have try by adding a Movie Player control on the canvas also put the Movie Player control inside an HTML Viewer and it doesn’t work. I find that there is a lack of documentation on this subject. Maybe I’m not looking in the right place.
Can you help me please. It’s supposed to be straightforward according to the documentation I found, but again, it’s not accurate. After 1:30 of trying, I have no choice but to ask for your help.
The test mp4 file I got by googling “test mp4 video” as the sample in the Xojo documentation was not available.
Are you perhaps loading the file via http and not https? macOS doesn’t really like this. There are workarounds, but Apple has a habit of breaking them… You’ll have to dig them up.
I do this in my app, and it’s been working perfectly for over a year. Of note, I am using an HTMLViewer, and not MoviePlayer
Two screens. One has a list of movies in a listbox. Select a movie and press the Play button. Note. My MovieCode is a string property, and this changes with the listbox.change. The MovieCode holds the YouTube ID you get from your YouTube channel. Here is an example of one of mine you can replace with my MovieCode property: rKmdHr8ruO4
Hey Ryan, thanks I will try that.
I have used the MoviePlayer control inside of the HTMLViewer, but it didn’t work out too.
I will study your code.
Big thanks!
The problem with the Movie.OpenURL problem is the syntax of the URL.
If you put a (s) to the HTTPS - it is going to work!
But, if you don’t put the (s) after the HTTP, you will get the problem. The video won’t show up in the MoviePlay1.Play control even the movie loading up.
So, hope this help people with the same situation.
Thanks to all the reply and help from Tim and Ryan! You’re the best!
VideoScreen is the name of my second window. All the code I have above is in the Play button of the first screen. This opens the second screen (VideoScreen), plays the movie, and maximizes the size. You would replace this with the name of your video window if you were using a second window to display the video, but it sounds like you discovered what you need with the MoviePlayer
On macOs you need to add an exemption to your plist requesting macos to allow that domain to be used unsecured. Otherwise macos only allows secure “https” connnections to you application.
You have to add this to your plist and drop the plist in the navigator.