The following is an answer I recently posted on UDN. You’re probably seeing the same problems.
So, there are two issues here, and both of them are my fault.
The first issue is that the fix for the missing MediaAssets module in Standalone didn’t make it into 4.12, but 4.11. I checked it into the correct branch this time, and it should be in 4.12 Hotfix 2, which is scheduled for June 27th right now (we already passed testing on the upcoming Hotfix 1, unfortunately). If you’re compiling the Engine from source, you can fix this locally by adding one line of code to the end of FEngineLoop::LoadStartupCoreModules() in Runtime/Launch/PrivateLaunchEngineLoop.cpp to make it look like this:
#if WITH_ENGINE
// Load runtime client modules (which are also needed at cook-time)
if( !IsRunningDedicatedServer() )
{
FModuleManager::Get().LoadModule(TEXT("GameLiveStreaming"));
FModuleManager::Get().LoadModule(TEXT("MediaAssets"));
}
#endif
The second issue is a workflow problem when working with Media in 4.10, 4.11, and 4.12. The MediaPlayer instance automatically loads the media URL on PostLoad. In the Editor, this happens when the Editor starts up, so by the time you’re running the game in PIE, the movie is already loaded. In Standalone, this happens on or around BeginPlay, which is also when you trigger the Play function. Since the movie takes some time to load, chances are that it is not yet ready to play by the time you call Play, so that call fails and does nothing.
The correct way to do this is to listen to the OnMediaOpened event on the MediaPlayer instances. In 4.13 and forward we will no longer auto-load movies, and you will have to explicitly Open them in your blueprint. In 4.12 and earlier, you can use the following trick to make it work in both PIE and Standalone:
Note that we’re binding to the OnMediaOpened event, so we only call Play once the movie actually finished loading. In PIE this won’t work, because that event will never be called (the movie already finished loading on startup), so we’re also calling Play via BeginPlay.
In 4.13 and forward, your blueprint will look more like this: