Is it possible to do something when a video "stops" or "ends"?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
igotdvds Offline
Skilled Skinner
Posts: 1,616
Joined: Jul 2009
Reputation: 11
Post: #11
wannabegt4 Wrote:Couldn't you just add the !Player.HasVideo to the condition that Jezz suggested that way it won't come up until stop is pressed. Also, What if the previous window isn't full screen video like I went to the home menu and pressed stop? Would you still get your dialog? Would you still want it to be available throughout the skin? That's the only reason I had thought about using the custom skin setting in the hidden control.

EDIT: You know; I'm probably over complicating things. I'm sure it's fine the way you have it now.

I added !Player.HasVideo, thanks for pointing it out. That solved that problem. Good to go now.
find quote
vikjon0 Offline
---
Posts: 2,429
Joined: Apr 2009
Reputation: 7
Location: Sweden
Post: #12
hello,
I am trying to implement this in confluence.

I am not a skinner, but I have made a few add-on skins and sometimes pretty good with code.

I take it the 9999 button is pre-existing in simplicity? It is not in confluence. I guess that means I have to forget the quick fix?
The tv tunes are loaded in onload.

Is there any way you could explain a bit more detail?
I guess the 9999 button is triggering one of the two actions added to include? Somehow it does not bite and I do not know how to debug a skin.
find quote
Hitcher Online
Skilled Skinner
Posts: 9,939
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #13
You should be able to do it this way -

PHP Code:
<onload condition="Container.Content(Episodes) + Window.Previous(FullScreenVideo) + Skin.HasSetting(DeleteEps)">Delete</onload>
<
onload condition="Container.Content(Episodes) + Window.Previous(FullScreenVideo) + Skin.HasSetting(DeleteEps)">SetFocus(50)</onload

[Image: sig_zps3af3b48e.jpg]
find quote
phil65 Offline
Skilled Skinner
Posts: 4,456
Joined: Mar 2009
Reputation: 56
Location: Cologne, Germany
Post: #14
(2011-04-05 06:07)igotdvds Wrote:  
wannabegt4 Wrote:What happens when someone isn't watching in fullscreen and presses stop? For instance I'm watching a video and decide to go back and look at the episode list while it's playing in the background.

It will ask them if they want to delete. This is a rough way of getting what I wanted, I wish I could say "If episode is 100% finished or Episode is playing and user presses "stop"" Then prompt to delete. But I cant get that exactly, so I use a hack. Sad

perhaps with
Code:
IntegerGreaterThan(ListItem.PercentPlayed,95)
?
(This post was last modified: 2012-05-31 20:41 by phil65.)
find quote
vikjon0 Offline
---
Posts: 2,429
Joined: Apr 2009
Reputation: 7
Location: Sweden
Post: #15
Yes, that is easier to understand. Thank you.
I couldn't get the trigger button to fire regardless of condition.

EDIT: Lost half the words...
However, this is true also if stopping before the end of the video and the adjustment from above does not work. Perhaps it only worked in dharma?

Code:
<onload condition="Container.Content(Episodes) + Window.Previous(FullScreenVideo)  + !Player.HasVideo + Skin.HasSetting(DeleteEps)">Delete</onload>
    <onload condition="Container.Content(Episodes) + Window.Previous(FullScreenVideo)  + !Player.HasVideo + Skin.HasSetting(DeleteEps)">SetFocus(50)</onload>
(This post was last modified: 2012-05-31 20:52 by vikjon0.)
find quote
snavaro Offline
Member
Posts: 81
Joined: Mar 2012
Reputation: 0
Post: #16
(2012-05-31 20:40)phil65 Wrote:  
(2011-04-05 06:07)igotdvds Wrote:  
wannabegt4 Wrote:What happens when someone isn't watching in fullscreen and presses stop? For instance I'm watching a video and decide to go back and look at the episode list while it's playing in the background.

It will ask them if they want to delete. This is a rough way of getting what I wanted, I wish I could say "If episode is 100% finished or Episode is playing and user presses "stop"" Then prompt to delete. But I cant get that exactly, so I use a hack. Sad

perhaps with
Code:
IntegerGreaterThan(ListItem.PercentPlayed,95)
?

That sounds nice and clean. I like it!
find quote
phil65 Offline
Skilled Skinner
Posts: 4,456
Joined: Mar 2009
Reputation: 56
Location: Cologne, Germany
Post: #17
if i think about it again, than it´s probably not that easy... my idea doesn´t take into account that another item can have focus when ending the video. Same applies to some other solutions here.
stringcomparing videoplayer and listitem episode title would be a work-around. (so set a string/property with the videoplayer episode title on videofullscreen.xml onunload and compare that with the listitem episodetitle. if true, then delete)
i think this can probably be done much better and nicer by a script.
(This post was last modified: 2012-05-31 21:39 by phil65.)
find quote
snavaro Offline
Member
Posts: 81
Joined: Mar 2012
Reputation: 0
Post: #18
(2012-05-31 20:24)Hitcher Wrote:  You should be able to do it this way -

PHP Code:
<onload condition="Container.Content(Episodes) + Window.Previous(FullScreenVideo) + Skin.HasSetting(DeleteEps)">Delete</onload>
<
onload condition="Container.Content(Episodes) + Window.Previous(FullScreenVideo) + Skin.HasSetting(DeleteEps)">SetFocus(50)</onload

Hitcher,

Will this work?:
<onload condition= "Window.Previous(FullScreenVideo) + IntegerGreaterThan(ListItem.PercentPlayed,95)">Delete</onload>
where the Delete button is in DialogVideoInfo (id=2003)
find quote
vikjon0 Offline
---
Posts: 2,429
Joined: Apr 2009
Reputation: 7
Location: Sweden
Post: #19
(2012-05-31 20:40)phil65 Wrote:  perhaps with
Code:
IntegerGreaterThan(ListItem.PercentPlayed,95)
?

Hm, there seem to some magic in that command.
IntegerGreaterThan(ListItem.PercentPlayed,95) does not work as expected
IntegerGreaterThan(ListItem.PercentPlayed,1) works better but I cant figure it out I need to trace it.

EDIT2:
Nope, I cant het it work. Perhaps it does not work when jumping forward and/or using resume.
(This post was last modified: 2012-05-31 21:29 by vikjon0.)
find quote
phil65 Offline
Skilled Skinner
Posts: 4,456
Joined: Mar 2009
Reputation: 56
Location: Cologne, Germany
Post: #20
since i edited, i´m not sure everyone took notice of this:

(2012-05-31 21:10)phil65 Wrote:  if i think about it again, than it´s probably not that easy... my idea doesn´t take into account that another item can have focus when ending the video. Same applies to some other solutions here.
stringcomparing videoplayer and listitem episode title would be a work-around. (so set a string/property with the videoplayer episode title on videofullscreen.xml onunload and compare that with the listitem episodetitle. if true, then delete)
i think this can probably be done much better and nicer by a script.
(This post was last modified: 2012-05-31 21:39 by phil65.)
find quote
Post Reply