Kodi Community Forum

Full Version: Pausing video playback when entering the menu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!
I've run into some problems using the Raspberry Pi (with RaspBMC) when playing video (XVID/H264) and returning to the menu: the performance is quite slow.
So I found the option in Confluence to hide the video/visualization in the background but this just hides the problem because you can still hear the video lagging (audio is still playing).
Is there any way to pause the video when entering the menu?

Here is the post in the RaspBMC Forum for cross-reference:
http://forum.stmlabs.com/showthread.php?tid=455

Cheers,
fanthomas
yes, put a
Code:
<onunload condition="!Player.Paused">PlayerControl(Play)</onunload>
at the beginning of videofullscreen.xml
Hi!
(2012-06-13, 13:42)phil65 Wrote: [ -> ]yes, put a
Code:
<onunload condition="!Player.Paused">PlayerControl(Play)</onunload>
at the beginning of videofullscreen.xml

I edited this in confluence and now the video is gone when I start playing a video (black screen - subtitle still play). When I exit it it pauses for a short time.

What could be the reason for that?
I just pasted your line right at the top of the VideoFullScreen.xml

Cheers,
fanthomas
Haven't tried this, but shouldn't the line be
PHP Code:
<onunload condition="!Player.Paused">PlayerControl(Pause)</onunload

Why check if the video is NOT paused, then try to play?
(2012-06-21, 12:41)filigran Wrote: [ -> ]Why check if the video is NOT paused, then try to play?

because if you don't it will just start playing it again on window exit because Play and Pause are toggles (at least play is)
you have to make sure that you insert the line after the <window> tag, not at the first line.