MacOS is fine, but in Windows or Linux, when I start a movie in MoviePlayer, it flashes a black background in the player for a fraction of a second and then starts the movie. This is a bit annoying. Is there a way to prevent that? I’ve been searching and not found an answer. There was a thread from 2015 dealing with it going black at the end of the movie, but didn’t seem to apply here.
The idea here is I just want the new movie to start when I using Movieplayer.play with no interruption of the black showing up. In some cases, I’m going to want to have the start of the next movie to be played be the same as the one that just finished so I can have a smooth transition.
Media playback in xojo has being problematic for many many years in windows and linux. (Totally unusable to play something in response to events in raspberry last time I tested.)
For example, the Windows Media Player that xojo uses in windows is a legacy OS feature, designed for windows 7 and deprecated more than a decade ago
Maybe the MBS VLC Plugin can give you a better and consistent experience.
Thanks for the info. I don’t really want to be dependent on a plugin or something that needs special setup for the system it’s to be run on, I’ll have to figure out some type of creative solution or work around.
In searching, it looks like there have been issues with MoviePlayer for quite some time. While I haven’t been looping videos, I have been able to play a video in all 3 OSs with no plug-ins, no special setup or installation of any software on the target OS. It’s working fine except for the darn black background in the MoviePlayer control popping up at the very beginning of the video when it starts up. Otherwise the video plays fine. Since it works fine on the Mac, and works fine on Windows and Linux except for the quick flash of black in the player, it seems like it’s almost there. I’d think that Xojo knows about this and could find a way to fix it. I’m wondering if there was a way to preload the video, it might help…but I see no way to do that. There must be away to fix it or deal with it…I’m still looking
A “cheat” would be to put something (i.e. a canvas) on top of the movie player with an image, e.g. a message in a fancy font which says “Delving into the mines…”, etc… then have the image fade out shortly after the movie starts playing.
This isn’t as hard as it sounds. You can do a quick loop to change the transparency of the “cover image” from opaque to 100% transparent.
I did something similar (years ago!) with showing training videos though I used the much more boring text “Loading Video…” since it was a training app and not a cool adventure game. (which I think is what you’d be using the video for, right?)
The graphics in Xojo have changed a lot since them, but I’m pretty darn sure this would still be possible. (fading out an image)
I like the idea, but it happens so fast the viewer probably wouldn’t be able to read it. Plus I’d need to know when the video actually starts to play after the black appears. Timing would be critical and I’m not sure how to handle that. I did try to display a label with the “Loading…” message, but I couldn’t get it to work properly. I have to say that this is Frustrating to say the least. I can’t believe that Xojo hasn’t seen this and considered some type of fix.
I’d rather not go that route. The MoviePlayer is working and gives control over the movie. If it wasn’t for the flash of black on the screen when starting a new movie, it would be perfect. I just want to find a work around for it if one exists.
Not to hijack Steve’s post, but I don’t think HTMLViewer can loop, so it’s not an option for me.
I wouldn’t hold my breath for a fix from Xojo. The workaround is probably going to be another control, like the MBS one. Just wish it wasn’t so complicated to use.
I can confirm this is also the case on Linux. But there are more issues there: autorepeat does not work, reversing does not work, video controls don’t work. Xojo really needs to give the MoviePlayer some more love. See issue #75864