VideoPlayer is not resuming on unpausing the game

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Trider

I use a Viewport with a VideoPlayer as a VideoTexture for a Sprite

example

When I pause the game with GetTree().paused = true; both video and sound pause, but when I unpause the game with GetTree().paused = false; only the audio resumes but the image stands still.

:bust_in_silhouette: Reply From: Trider

I’ve found a workaround by overriding the paused and unpaused events of the player:

public override void _Notification(int what)
{
    switch (what)
    {
        case NotificationPaused:
        {
            Paused = true;
            break;
        }
        case NotificationUnpaused:
        {
            Paused = false;
            break;
        }
    }
}