Jump to content

Ability to kick users, or limit time on same tv channel


pir8radio

Recommended Posts

pir8radio

I gotcha. Tomorrow I will look into how easy this is to add to the roku. It shouldn't be that difficult. I can't promise when this will happen not knowing how hard it will be.

 

Pop the "are you still here" dialog every 2 hours.

Spawn a timer that lasts for 1 minute.

If yes, cancel the timer and close the dialog.

If no, cancel the timer, close the dialog, and exit the video player.

If timer expires it has the same effect as clicking no.

 

This should be entirely possible.

 

Sent from my Nexus 7 using Tapatalk

 

I think every 2 hours will cause a bunch of complaints from other emby users, How about something unrealistic like 5 hours?  I can see someone watching a game, or marathon and get angry with a popup every 2 hours..  LOL Not that i'm complaining!  I'm just trying to save you the trouble of dealing with a mob of complainers, vs just me complaining about a few users on my system..   ;)    Thanks for looking at it guys!!!

Link to comment
Share on other sites

I agree 2 hours is too short but the popup should also only fire after n hours of absolutely no user interaction - not just playback.

Link to comment
Share on other sites

Yeah, I am using rotimespan and every user interaction of the remote during playback will cause a mark(). The mark() is the same as unixtime at that moment. I am using seconds. Every handler event (main videoplayer event loop) I subtract this mark() from now() and see if it is greater than 5*60*60. If it is I will mark() the rotimespan and spawn an rodialog stating "Are you still here? You have 60 seconds to respond or the videoplayer will close.". At this same time create a second rotimespan and mark() it. Now inside the dialog handler subtract this second mark() from now() and see if it is over 60. If it is over 60 or the user chooses no then close the dialog, videoplayer and invalidate all rotimespans. If the user chooses yes in the dialog, close the dialog, invalidate the second rotimespan, and mark() the first rotimespan.

 

This should allow it to be 5 hours with no user interaction. So maybe this should be 2 hours? Every interaction with the remote will cause a mark() and reset the timer. I have started on this already, but far from complete. Just wanted to alleviate fears. :)

 

Sent from my Nexus 7 using Tapatalk

Edited by speechles
  • Like 1
Link to comment
Share on other sites

pir8radio

Yeah, I am using rotimespan and every user interaction of the remote during playback will cause a mark(). The mark() is the same as unixtime at that moment. I am using seconds. Every handler event (main videoplayer event loop) I subtract this mark() from now() and see if it is greater than 5*60*60. If it is I will mark() the rotimespan and spawn an rodialog stating "Are you still here? You have 60 seconds to respond or the videoplayer will close.". At this same time create a second rotimespan and mark() it. Now inside the dialog handler subtract this second mark() from now() and see if it is over 60. If it is over 60 or the user chooses no then close the dialog, videoplayer and invalidate all rotimespans. If the user chooses yes in the dialog, close the dialog, invalidate the second rotimespan, and mark() the first rotimespan.

 

This should allow it to be 5 hours with no user interaction. So maybe this should be 2 hours? Every interaction with the remote will cause a mark() and reset the timer. I have started on this already, but far from complete. Just wanted to alleviate fears. :)

 

Sent from my Nexus 7 using Tapatalk

 

I like that, 5 hours with NO interaction.   I have sat drooling with no bathroom/snack breaks for at least 4 hours during my stargate binge-watching.. Well, i guess i did skip commercials...  But I think 5 hours most people wont even know its there as a restriction... But my internet connection will notice!   

Edited by pir8radio
Link to comment
Share on other sites

@@pir8radio

7b2fe16b8938236ffed49828a5ca3787.jpg

You can see the dialog includes a countdown timer. Right now I am running some final tests to make sure this respects the last "user interaction". A video queue or playlist when automatically changing to the next video is not considered a "user interaction".

 

There will also be a new preference in options called "interaction timeout" (see image below). This affects all media played through the video player, not only livetv. If it should only work with livetv and when runtime is not known we can do that. Let me know. The reason it works on all videos is to make this work when people fall asleep.

3a2063fa01fac4bdfa4e79fb45f9cd9e.jpg

There is no way to disable this, because if remote users could do that then it defeats the purpose of this entirely. If the server had a setting that could keep this preference that apps could use we wouldnt need this setting. The server could decide on a per user basis what each users "interaction timeout" should be. Until then, you can see how it works by choosing the "test" mode of 5 minutes.

 

This feature is 100% complete for the roku and in testing I think I have ironed out all the bugs (98% sure). Tomorrow I will release this as part of the blueneon app and also add changes needed for this as pull requests to the official apps github page.

Edited by speechles
  • Like 2
Link to comment
Share on other sites

Do you think the "No" option is really necessary...?

 

Under what circumstance would that ever be used?

Link to comment
Share on other sites

pir8radio

Great work man!  Like the options, too...   Is this on Blueneon only? None of my users use blue neon...  When would this make it to the default emby roku client?

 

"This affects all media played through the video player, not only livetv."

 I personally only see issues with live TV I have never seen anyone leave/turn off TV leave roku on/fall asleep with a movie playlist going...   

 

"Do you think the "No" option is really necessary...?"

Agree with ebr the NO selection on the popup seems kind of useless...  ^_^

 

Thanks again guys!!  I'm excited!!   :D

Edited by pir8radio
Link to comment
Share on other sites

Ian-Highlander

Please don't implement this on the WMC app or at least give us the option somehow to disable it completely. We tend to leave ours playing constantly even if we're not actually paying attention to it sometimes and that would absolutely drive me insane.

 

If you do implement it as a forced option, please announce it clearly so I can make sure I don't upgrade any longer and stick with the version that doesn't have it as a function. Thanks :)

Link to comment
Share on other sites

pir8radio

Please don't implement this on the WMC app or at least give us the option somehow to disable it completely. We tend to leave ours playing constantly even if we're not actually paying attention to it sometimes and that would absolutely drive me insane.

 

If you do implement it as a forced option, please announce it clearly so I can make sure I don't upgrade any longer and stick with the version that doesn't have it as a function. Thanks :)

 

@@Ian-Highlander This is for the Roku Client.  The issue is with roku, its easy to change inputs, or turn off the TV and forget the roku was streaming TV in the background, this is an issue for remote users that are sucking a constant HD video stream using both the users and servers bandwidth for no reason. If not caught it can continue to stream for days.   

 

@@speechles any way to have this function only work on "remote" connections, disable for local server ips?  I know it's getting deep now.. lol   If not, a disable option would be "ok" then if server users see 10 hour streams they just disable that user for punishment...   :)   Trying to keep the masses happy here...    This is why I was hoping for a server side solution, so the server owner can decide..  That way nothing is "forced" seems people don't like to be forced into things even if they never hit the 5 hour limit, the word FORCE makes everyone put on their tin foil hats and block the streets...  Just joking tin foil hat wearers...   :lol:

Edited by pir8radio
Link to comment
Share on other sites

Ian-Highlander

@@Ian-Highlander This is for the Roku Client.  The issue is with roku, its easy to change inputs, or turn off the TV and forget the roku was streaming TV in the background, this is an issue for remote users that are sucking a constant HD video stream using both the users and servers bandwidth for no reason. If not caught it can continue to stream for days. 

Admittedly I only scan read the whole thread (and not going back to read it again), but I thought it was mentioned by ebr or luke that all the clients should (and by insinuation possibly would in the future) do this. If I've mis-read it or mis-understood it I apologise and ignore the ramblings of this moody old man  :lol:

Link to comment
Share on other sites

https://github.com/MediaBrowser/Emby.Roku/pull/142

 

Here are the changes to get the official roku client to do this. Also updated all links in the blueneon app thread.

 

The "NO" has been removed too. I had that there because it was funny, hence the "No, I am a zombie!". I removed it so this won't cause confusion. There is only a "Yes, I am still here!" button now.

 

Also, the 5 hours is without interaction. I doubt anyone will see this unless they fall asleep. So I haven't made this work for only remote users. The preference allows setting up to a maximum of 5 hours. I can't allow a disable option or remote users would just disable this.

 

If luke would make an option in the server for each user called "interaction timeout" it would be better. If the "interaction timeout" is set to 0 it means never timeout. Then apps would only need to read this value from the server. In this way users and the apps they use wont control the interaction limit, the server owner would based upon which user is using the app.

Edited by speechles
  • Like 1
Link to comment
Share on other sites

Admittedly I only scan read the whole thread (and not going back to read it again), but I thought it was mentioned by ebr or luke that all the clients should (and by insinuation possibly would in the future) do this. If I've mis-read it or mis-understood it I apologise and ignore the ramblings of this moody old man  :lol:

 

It should be in all the apps but only in relation to watching a live stream or, perhaps, a long playlist like a whole season.

 

If you don't touch the remote for five straight hours, it shouldn't be too much to ask for you to confirm that you are there.  Almost any live streaming app does this in order to not use resources feeding content to no one.

Link to comment
Share on other sites

Deathsquirrel

I appreciate how valuable this is to some but I absolutely do NOT want this on my server.  Please consider making this something that can be disabled universally, even if only through XML edits on the server.

  • Like 1
Link to comment
Share on other sites

I think an on/off switch on the server (or, if we want to be more detailed, I guess a timeout value) that the admin can set and the apps all check to tell them if they should do this is the best approach.

  • Like 1
Link to comment
Share on other sites

I appreciate how valuable this is to some but I absolutely do NOT want this on my server. Please consider making this something that can be disabled universally, even if only through XML edits on the server.

Okay, so lets make it so only an administrator can disable it.

 

d79130e06da0203a574e9f6a0fc2cf3d.jpg

 

Now the feature can be completely disabled by an administrator of the server. Users who are not administrator cannot disable this on their roku devices. This should make it work for all users now.

 

I am still feeling the need for a server level "interaction timeout" so I dont need this preference though. I think @@ebr has the same feeling.

Edited by speechles
  • Like 2
Link to comment
Share on other sites

@@Luke

 

https://github.com/MediaBrowser/Emby.Roku/pull/143

 

Here is a version uses the rokus internal time since keypress function. Also has the preferences change to obtain an interaction timeout. Spent some time testing methods and this is the best way, so much more reliable.

Edited by speechles
  • Like 1
Link to comment
Share on other sites

I am still feeling the need for a server level "interaction timeout" so I dont need this preference though. I think @@ebr has the same feeling.

 

Yes, I agree.  It should be a setting on the server dashboard that is delivered to the app in system configuration. 

  • Like 1
Link to comment
Share on other sites

Ian-Highlander

It should be in all the apps but only in relation to watching a live stream or, perhaps, a long playlist like a whole season.

 

If you don't touch the remote for five straight hours, it shouldn't be too much to ask for you to confirm that you are there.  Almost any live streaming app does this in order to not use resources feeding content to no one.

With the greatest of respect, the resources are mine to use and it's my choice if I want them to be used or not. No software should be making that choice for me unless I tell it to.

  • Like 1
Link to comment
Share on other sites

pir8radio

With the greatest of respect, the resources are mine to use and it's my choice if I want them to be used or not. No software should be making that choice for me unless I tell it to.

 

ebr is also saying in the post just above yours, that there should be a setting that activates this feature from the server dashboard.  Meaning you the server operator would be making the choice, and not the guests of your server. 

Edited by pir8radio
  • Like 2
Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...