Posts: 16
Joined: Aug 2015
Reputation:
0
Georg
Junior Member
Posts: 16
Would it, please, be possible to have Kodi display in windowed mode & switch to fullscreen only when playing movies using the internal player and then back to windowed mode when we exit the player (movie stops)? PatK has suggested the backslash method, which is good until (if?) a setting is implemented, but it means it has to be done at the keyboard which is not always available at the viewing position (as is my case).
I have Nexus, W10 PC, 4k, HDR movies in mkv container.
The reason I want this is because "administrative" tasks are more conveniently done if Kodi is in a smaller window, but the movie must be presented in all its glory and the display's resolution. Thank you!
Posts: 2,714
Joined: Jan 2012
Reputation:
83
I suspect this would have to be something handled by an addon script of some sort and not something for the main codebase. The use case / demand for this will be minuscule.
I suspect a minority of users run Kodi on desktop hardware connected to a mouse and keyboard these days as opposed to a device using a 10ft interface with a large screen and remote and this feature would be specific to this use case only.
I'm not a developer so maybe one of our devs could comment whether there is any restriction to an addon making calls to trigger a switch in the screen mode by detecting an instruction to play a video? I wouldn't think there would be.
Posts: 10,081
Joined: Oct 2011
Reputation:
545
jjd-uk
Team-Kodi Member
Posts: 10,081
2023-03-07, 19:37
(This post was last modified: 2023-03-07, 19:40 by jjd-uk. Edited 1 time in total.)
Good as it was just a thought and was completely untested.
So to do exactly as asked and only do this for movies you could do it this way:
<onload condition="VideoPlayer.Content(movies)">togglefullscreen</onload>
<onunload condition="VideoPlayer.Content(movies)">togglefullscreen</onunload>
The other thing is that this is just a toggle command, so you need to start from Kodi being in a windowed state prior to playing anything, as if you were fullscreen in the UI and started to play something it would send Kodi into windowed mode.
Posts: 10,081
Joined: Oct 2011
Reputation:
545
jjd-uk
Team-Kodi Member
Posts: 10,081
We don't seem to have an explict fullscreen action that would:
1. If already in fullscreen then do nothing.
2. If Windowed change to fullscreen.
We only seem to have the toggle action which is not ideal for what is wanted.
So perhaps this feature request should be to add a fullscreen action (not a toggle) to go fullscreen if Kodi is not already fullscreen.
Posts: 10,081
Joined: Oct 2011
Reputation:
545
jjd-uk
Team-Kodi Member
Posts: 10,081
2023-03-18, 17:53
(This post was last modified: 2023-03-18, 17:54 by jjd-uk. Edited 1 time in total.)
Just realised there is a boolean System.IsFullscreen
So this can be done:
<onload condition="VideoPlayer.Content(movies) + !System.IsFullscreen">togglefullscreen</onload>
<onunload condition="VideoPlayer.Content(movies) + System.IsFullscreen">togglefullscreen</onunload>
So when movie playback is started (which uses onload) this will only do the togglefullscreen action if Kodi is not already fullscreen, if you happen to have Kodi already in fullscreen then this prevent to togglefullscreen action happening to send Kodi back to windowed mode.
Then when movie playback is stopped (which uses onunload) this will only do the togglefullscreen action if Kodi is already fullscreen to send it back to windowed mode, if you happen to have Kodi already in windowed mode then this prevent to togglefullscreen action happening to send Kodi back to fullscreen mode.