Pausing video playback when entering the menu

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Fanthomas Offline
Junior Member
Posts: 2
Joined: Jun 2012
Reputation: 0
Post: #1
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
find quote
phil65 Offline
Skilled Skinner
Posts: 4,456
Joined: Mar 2009
Reputation: 56
Location: Cologne, Germany
Post: #2
yes, put a
Code:
<onunload condition="!Player.Paused">PlayerControl(Play)</onunload>
at the beginning of videofullscreen.xml
(This post was last modified: 2012-06-13 13:43 by phil65.)
find quote
Fanthomas Offline
Junior Member
Posts: 2
Joined: Jun 2012
Reputation: 0
Post: #3
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
find quote
filigran Offline
Senior Member
Posts: 187
Joined: Oct 2009
Reputation: 0
Post: #4
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?
(This post was last modified: 2012-06-21 12:43 by filigran.)
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,264
Joined: Jun 2006
Reputation: 55
Location: Earth
Post: #5
(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)

Skins I have done....
[Image: skinsq.png]
And others in the past...

Want to know what I'm working on currently? Check me out on Google+
find quote
phil65 Offline
Skilled Skinner
Posts: 4,456
Joined: Mar 2009
Reputation: 56
Location: Cologne, Germany
Post: #6
you have to make sure that you insert the line after the <window> tag, not at the first line.
find quote