# Media Player fast forwards video on lag/minimizing

**URL:** <https://forums.unrealengine.com/t/media-player-fast-forwards-video-on-lag-minimizing/637422>\
**Category:** Cinematics & Media\
**Tags:** unreal-engine, UE5-0, question\
**Created:** [August 30, 2022, 8:37pm UTC](https://forums.unrealengine.com/t/media-player-fast-forwards-video-on-lag-minimizing/637422 "2022-08-30T20:37:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FaceW.TearsOfJoy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FaceW.TearsOfJoy](https://forums.unrealengine.com/u/FaceW.TearsOfJoy)\
**Post date:** [August 30, 2022, 8:37pm UTC](https://forums.unrealengine.com/t/media-player-fast-forwards-video-on-lag-minimizing/637422/1 "2022-08-30T20:37:21Z")

</div>

I use looping video widget as a background in Main Menu. The issue is that when I minimize the game and then maximize it, the video fast forwards until it reaches the time where it would be without the lag/minimizing/etc.

How can I solve this issue? So that the video always plays with constant speed without trying to catch up for the lost time when the game was minimized.

---

<div class="post-metadata">

**Author:** ![HISPlayerUnreal](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hisplayerunreal/32/712778_2.png) [@HISPlayerUnreal](https://forums.unrealengine.com/u/HISPlayerUnreal)\
**Post date:** [April 26, 2023, 10:25am UTC](https://forums.unrealengine.com/t/media-player-fast-forwards-video-on-lag-minimizing/637422/2 "2023-04-26T10:25:45Z")

</div>

On which platform are facing this issue?[HISPlayer](https://forums.unrealengine.com/t/hisplayer-http-live-streaming-hls-and-dash-video-streaming-plugin-for-unreal-engine-games-and-metaverse/1135877) media player plugin supports HLS and DASH streaming formarts. You can try a demo.

---

<div class="post-metadata">

**Author:** ![surmounter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@surmounter](https://forums.unrealengine.com/u/surmounter)\
**Post date:** [April 24, 2024, 4:20am UTC](https://forums.unrealengine.com/t/media-player-fast-forwards-video-on-lag-minimizing/637422/3 "2024-04-24T04:20:09Z")

</div>

When the app is minimized, it’s necessary to cache the media playback time and adjust the media accordingly when it’s maximized like this.

 ![이미지 (1)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/d/d/2dd24c36e0fe863ca1c51d8eb297281fc705c4a0.png)

OnAppEnterBackground and OnAppEnterForeground are custom event and called when

```auto
	FCoreDelegates::ApplicationHasEnteredForegroundDelegate.AddWeakLambda(this, [this]()
	{
		OnAppEnterForeground();
	});
	FCoreDelegates::ApplicationWillEnterBackgroundDelegate.AddWeakLambda(this, [this]()
	{
		OnAppEnterBackground();
	});

```

I hope this example is helpful to you.
