<onunload> not working for VideoFullScreen
#1
I want to run the watchedlist script whenever a video is stopped so I added <onunload>RunScript(script.watchlist)</onunload> to the VideoFullScreen.xml thinking that would do the trick but the script fails to run.

This can easily be tested by adding <onunload>ReplaceWindow(Home)</onunload> instead and you'll see when stopping a video you wont be returned to the home screen. Changing it to <onload> however does work.

Bug or am I missing something?

Thanks.
Reply
#2
You are right, just confirmed that's a bug and onunload actions in VideoFullScreen aren't executed

---
edit: just random thought - running this when unloading VideoFullScreen won't be sufficent, it will execute when we toggle fullscreen (not stoppingvideo) and also when not in fullscreen, stopping video won't run script. Better approach would be to create service addon that will listen to xbmc.Player events (i.e. onPlaybackStopped) and will run proper script(s) then.

---
yet another edit: fixed in fb2e7d1e
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#3
pieh Wrote:edit: just random thought - running this when unloading VideoFullScreen won't be sufficent, it will execute when we toggle fullscreen (not stoppingvideo) and also when not in fullscreen, stopping video won't run script. Better approach would be to create service addon that will listen to xbmc.Player events (i.e. onPlaybackStopped) and will run proper script(s) then.

You're right I didn't think of those conditions. Rolleyes

I just wanted to avoid having to run the script every time you enter home.
Reply

Logout Mark Read Team Forum Stats Members Help
<onunload> not working for VideoFullScreen0