pir8radio 1292 Posted April 28, 2016 Author Share Posted April 28, 2016 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 More sharing options...
ebr 14935 Posted April 28, 2016 Share Posted April 28, 2016 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 More sharing options...
speechles 1920 Posted April 28, 2016 Share Posted April 28, 2016 (edited) 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 April 28, 2016 by speechles 1 Link to comment Share on other sites More sharing options...
pir8radio 1292 Posted April 28, 2016 Author Share Posted April 28, 2016 (edited) 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 April 28, 2016 by pir8radio Link to comment Share on other sites More sharing options...
speechles 1920 Posted April 29, 2016 Share Posted April 29, 2016 (edited) @@pir8radio 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. 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 April 29, 2016 by speechles 2 Link to comment Share on other sites More sharing options...
ebr 14935 Posted April 29, 2016 Share Posted April 29, 2016 Do you think the "No" option is really necessary...? Under what circumstance would that ever be used? Link to comment Share on other sites More sharing options...
pir8radio 1292 Posted April 29, 2016 Author Share Posted April 29, 2016 (edited) 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!! Edited April 29, 2016 by pir8radio Link to comment Share on other sites More sharing options...
Ian-Highlander 145 Posted April 29, 2016 Share Posted April 29, 2016 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 More sharing options...
pir8radio 1292 Posted April 29, 2016 Author Share Posted April 29, 2016 (edited) 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... Edited April 29, 2016 by pir8radio Link to comment Share on other sites More sharing options...
Ian-Highlander 145 Posted April 29, 2016 Share Posted April 29, 2016 @@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 Link to comment Share on other sites More sharing options...
speechles 1920 Posted April 29, 2016 Share Posted April 29, 2016 (edited) 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 April 29, 2016 by speechles 1 Link to comment Share on other sites More sharing options...
ebr 14935 Posted April 29, 2016 Share Posted April 29, 2016 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 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 More sharing options...
CBers 6771 Posted April 29, 2016 Share Posted April 29, 2016 Nice work @@speechles. Link to comment Share on other sites More sharing options...
Deathsquirrel 741 Posted April 29, 2016 Share Posted April 29, 2016 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. 1 Link to comment Share on other sites More sharing options...
ebr 14935 Posted April 29, 2016 Share Posted April 29, 2016 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. 1 Link to comment Share on other sites More sharing options...
speechles 1920 Posted April 29, 2016 Share Posted April 29, 2016 (edited) 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. 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 April 30, 2016 by speechles 2 Link to comment Share on other sites More sharing options...
speechles 1920 Posted April 30, 2016 Share Posted April 30, 2016 (edited) @@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 April 30, 2016 by speechles 1 Link to comment Share on other sites More sharing options...
ebr 14935 Posted April 30, 2016 Share Posted April 30, 2016 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. 1 Link to comment Share on other sites More sharing options...
Ian-Highlander 145 Posted April 30, 2016 Share Posted April 30, 2016 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. 1 Link to comment Share on other sites More sharing options...
pir8radio 1292 Posted April 30, 2016 Author Share Posted April 30, 2016 (edited) 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 April 30, 2016 by pir8radio 2 Link to comment Share on other sites More sharing options...
Luke 37118 Posted September 18, 2019 Share Posted September 18, 2019 https://emby.media/community/index.php?/topic/48845-are-you-still-watching/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now