Visible behind feature?
#31
At least stop on SCREEN_OFF worked for PVR before the VisibleBehind addition..
Reply
#32
You should see a "fixupvpstateL" build at "http://mirrors.kodi.tv/test-builds/android/arm/" at approx 19:00 UTC

Please give it a try...
Reply
#33
Great build. It fixes the following issues:

- no stop on SCREEN_OFF in PVR
- pause on second time going into VisibleBehind mode in PVR with Timeshifting enabled
- pause on second time overlaying Sony ACTION MENU in PVR with Timeshifting enabled
- disappearing PVR channel logo in Now Playing card


What I will test tomorrow is the pause/resume handling (also in PVR) after focus loss.
Reply
#34
So here is my analysis concerning focus loss...

I can provoke a focus loss of Kodi by:

- going in VisibleBehind mode by pressing the HOME button _AND_ starting another app on top
- plugging in an USB pen drive which results in Android's "open with" window being overlayed
- initiating a Chromecast session from a mobile device
- (there are for sure more scenarios)

Kodi reacts on a focus loss by pausing video. This bares several problems...

- when going back to Kodi, it tries to resume video playback, but fails [LOG] (tested with file playback, so no PVR involved here)

Audio resumes, video only shows a still image. After some seconds, audio also stops, the player tries to buffer but nothing more happens.

- in case of PVR, a pause means that the backend keeps running and delivering data with the PVR add-on hammering flash memory by filling the Timeshift buffer

So how do people usually switch apps? They press the HOME button and choose one. I don't think that it is a good idea to pause playback in case of PVR live playback due to the mentioned reason. It might be desirable, but most of the time it is not. Suppose we can't ask the user? I think a stop is the better option to deal with that and matches better the Android navigation flow. Pause is worth nothing if resume does not work anyway Wink .
Reply
#35
For PVR specifically, I should check if the stream is actually pausable, for sure Wink

If it is, no real clue.
It makes sense to me to pause, potentially going to timeshift if it's for a small amount of time like the "USB pen" use case you mention.

I tend to think that it'd be the responsibility of the user to think about the fact that their buffer is (potentially) not infinite if they suddenly decide to do something completely different.
Furthermore, stopping could potentially kill the current timeshift (no idea how it works in Kodi, nor if it's backend-dependent) which basically means loosing a bunch of watching time.
Reply
#36
Quote:For PVR specifically, I should check if the stream is actually pausable, for sure
Also with respect to O where what you can do in the background is more limited, no?

Resuming after focus loss does not work for file either though. At least for me.

Quote:I tend to think that it'd be the responsibility of the user to think about the fact that their buffer is (potentially) not infinite if they suddenly decide to do something completely different.
That's not the actual problem. It is no problem if you run out of memory. Then at least the buffering stops (at least in case it is not a ring). The problem is the unintentional wearing out of the flash memory if you forget to stop playback manually. Ususally multiple people use the same TV. I know that I have to stop playback first. The problem is educating the others as this is actually how you switch apps on Android. Go to the HOME screen and choose one...

Quote:Furthermore, stopping could potentially kill the current timeshift (no idea how it works in Kodi, nor if it's backend-dependent) which basically means loosing a bunch of watching time.
Stopping for sure results in the live stream getting closed (CloseLiveStream). In case of the DVBViewer Client, stream is stopped and timeshift buffer file (if we are in a timeshift session already) is truncated then. The whole behavior might indeed depend on the PVR add-on. That's how the DVBViewer Client works. Timeshifting can either be permanent (adding the possibility to skip backwards at any time) or triggered when pausing. I am using the latter as timeshift buffer is a USB3.0 pen drive which I can't permanently hammer with timeshift data.

But that's what I meant. In some cases it is desirable to indeed pause in order to be able to timeshift and resume later (which currently does not work after a focus loss though), or to stop playback because you want to switch app and not come back. In the latter case you don't want to wear out your precious flash memory.
Reply
#37
I am totally confused now. I installed latest nightly an action now seems to be stop when Kodi loses focus. I haven't seen any commit in that direction.
Reply
#38
I think this thing is pretty broken. I am doing the following:

(1) start playback in Kodi
(2) press HOME button -> VisibleBehind
(3) open Google Play Store

I think what is supposed to happen according to @Koying's code when I go back to Kodi now is that video playback should have been paused which hardly ever happens anymore though. There are 3 possible outcomes:

(1) playback in Kodi is paused (rarely happens anymore)
(2) playback in Kodi is stopped (happens most of the time) (kodi.log)
(3) Kodi crashes (logcat - search for SIGSEGV)

Seems to be quite flaky.
Reply
#39
Also weird is that I sometimes see the banner of the movie in the Now Playing card on the home screen and sometimes not. The whole VisibleBehind thing is really racy on my Sony.
Reply
#40
@Koying 

Is VisibleBehind working properly for you on the SHIELD? It is pretty broken for me, see posts above.
Reply
#41
Well, it's already deprecated in oreo, so I'm not really keen to spend time on it, honestly
Reply
#42
I‘d rather remove the feature then.
Reply

Logout Mark Read Team Forum Stats Members Help
Visible behind feature?0