Having problems with Media Players using Image Media Sources.


This is NOT for a game.

I have 9 media players; each one has a corresponding media texture and image media source.

The user selects for each media source which image sequence will be played. These are all dynamically loaded. This is for broadcast, not a game, and the media can and will change, so it can’t be built into the project.

The files are opened like this:

I have checks to see if the sources are opened; I bind to the event dispatchers on open, on open fail, I am doing every check I can think of, but sometimes it just won’t open and play the sequence.

While in PIE, I can look at the media source, and it’s correct. I can look at the player in question, and it’s set to the correct source… it’s been an extremely frustrating problem, as sometimes it works, sometimes it doesn’t. Sometimes if I repeatedly run the event that opens the media (call in editor is checked), it will work… So if it won’t work, I run it a couple times explicitly, and then it will work.

But I’m sure it’s all loading and opening (assuming I can believe the media player events). This is ALWAYS called when I try to open:

But then it simply won’t work.

Any tips on how to double check an “open” actually worked, and the media player is actually read to play?

I’ve tried waiting for events that signal the sequence is open, I’ve tried adding delays… it’s just a hit or miss problem.

EDIT: in a simplified level with only one player, it seems to work consistently, so there is something about trying to open multiple media sources (even with multiple media sources defined) that makes it fail, I think.

It is a bit complicated and I don’t get it fully but…

Are you unbinding anywhere?

Also, can I suggest you make a dummy component with some timers and use that instead of the Media Player to check if the problem is in it or is it in the blueprint that controls it.

1 Like

EDIT: I take it back, it’s still not working.

I’m not unbinding because I’m only binding once on begin play.

I managed to replicate the problem in a simpler level with only 3 media players… (I’m only updating/playing 3 at a time anyway).

I am unable to break it once I added a delay between “pause” and “rewind.”

Without that delay, it breaks - apparently WAS loading the media source, but was just stuck at the end without rewinding.

:man_shrugging:

So there is a timing thing going on there, and it only failed intermittently…. now I can click as fast as I can on my “Update” function, then “Play” still works…

EDIT: If, in PIE, I explicitly open the sequence on the Media Source, it will work, but the problem is there is no open in blueprints on the media source, the open is on the media player. I don’t know how to make it force open on the media source…