UMF - OnMediaOpened and -Closed not firing ingame

Hey guys,

we are currently on 4.7.1.

As far as I understand the delegates OnMediaOpened and OnMediaClosed should fire ingame when the media player starts resp. ends playback, is that correct? However, breakpoints in e.g. UMediaPlayer::HandleMediaPlayerMediaClosed(), where the delegate OnMediaClosed is broadcasted, do only hit outside of a running game, e.g. when changing properties in the asset itself, accessing it from the content browser, due to UMediaPlayer::InitializePlayer() calling it every time something’s changed.

I also tried binding the delegate in Blueprints with the same outcome: breakpoints do not trigger when the game is running, ever.

Is this a bug? How is it intended to work?

Cheers!

From what I have experienced, this only works if you use OpenURL. It also behaves oddly if you’re using PIE, because the editor still runs UMF when closing down the game session.

OnMediaClosed does not broadcast unless you call Close() on the media player, but that’s not possible right now because it has not been implemented in 4.7. You will have to implement it in C++ or wait for the next UE4 release where gmpreussner’s fix is included. See this other thread regarding the Close() functionality.