ivarbrandt / skin.nimbus

Other
51 stars 9 forks source link

[Idea] allow the back button in fullscreenvideo to stop the video in settings #107

Closed hcgiub001 closed 1 week ago

hcgiub001 commented 2 weeks ago
image

Most aren't capable or willing to delve into keymap editor or change xml files. The behaviour of the back button really frustrated me in early days. especially when I didn't know how to toggle this. I was thinking how about make it default in Nimbus and the ability to change back in a setting menu.

Now no need to figure out how to download an addon (keymap editor) and understand how to make the changes just for a basic useability. Would make a massive difference?

ivarbrandt commented 2 weeks ago

Kodi is designed this way. One click of the back button during video playback takes you to the previous screen and keeps the media playing in the background. Long pressing the back button during video playback will stop the video playback.

This is why skins have entire interfaces specifically designed around being able to browse around the skin during media playback.

hcgiub001 commented 2 weeks ago

until recently I myself didn't realise we had that long press functionality and I've delved into keyboard.xml So people will press back button in Nimbus and the image goes to top right. If they do not have a remote with a stop button how are they able to toggle Fullscreen?

then they will keep pressing back, once they exit far back enough the video now gets in the background, which is even worse.

I have a solution for people that will get confused with the back button having movie in background and rather just have it simple.

image

so if users click that they get a screen similar to this image

where at the top It will say

Choose the action when pressing back (Long press back will close the video)

and if they have already chosen the default behaviour as "Close video" they will see this message instead

Choose the action when pressing back (Long press back will display the video in background)

this might even raise awareness that we have a long press.

You can see from my OP how frustrated people are about this but I'm not bothered I can change it haha. anyway it was a suggestion to make Nimbus more user friendly and what people's familiarity is with the behaviour with the back button. feel free to close

Side note: what hardware and remote do you use for kodi?

ivarbrandt commented 2 weeks ago

If they do not have a remote with a stop button how are they able to toggle Fullscreen?

By clicking the toggle fullscreen button in the View options or home screen button menu during video playback.

I have a solution for people that will get confused with the back button having movie in background and rather just have it simple.

The biggest problem I have with this is that it's something that I'd never use and it's not simple to implement. Especially if it's to be done by modifying the keymap as I already have code for modifying it for one-click trailers.

I'll try to implement it in a simpler way but if that doesn't work then I'm not gonna bother with this.

Side note: what hardware and remote do you use for kodi?

I have a Shield Pro and I use the remote that came with it. I just click stop manually every time I end playback.

hcgiub001 commented 2 weeks ago

Yeah I know you modify the keyboard.xml, you also have your gen.xml I thought you pretty much have all the pieces so in fullscreenvideo tag, it's Fullscreen for default behaviour and close if you want the other behaviour right?

<?xml version="1.0" ?>

Fullscreen If it's too much effort , it's okay to leave it. they have keymap editor also > By clicking the toggle fullscreen button in the View options or home screen button menu during > video playback. this is cool, I had zero idea this was here, is this only Nimbus feature? the remote question was to do with a feature I'm working at. you might like it. messed up something so I have to try again.
ivarbrandt commented 2 weeks ago

I thought you pretty much have all the pieces so in fullscreenvideo tag, it's Fullscreen for default behavior and close if you want the other behaviour right?

Yeah but I would have to create a different version of the keymap.xml for every element of modifying it. And that's a pain. I tried to do it a simpler way, and like I thought, it's not possible.

this is cool, I had zero idea this was here, is this only Nimbus feature?

Yeah it is far as I know. Other skins might have similar functionality but I'm not sure. Estuary has it too.

the remote question was to do with a feature I'm working at. you might like it. messed up something so I have to try again.

Awesome! Looking forward to checking it out. Does this mean you forked the skin and are working on your own version?

hcgiub001 commented 2 weeks ago

I found a way , it will also give you much more control

Microsoft Copilot

In Kodi, you can indeed create multiple XML files in the userdata/keymaps folder, and Kodi will process all of them. The keymaps are applied in alphabetical order, meaning that if you have multiple XML files with different actions for the same key, the action defined in the last file processed will take precedence1.

To ensure that your new XML file takes precedence, you can name it in such a way that it is processed after the other files. For example, if you have a file named keyboard.xml and you want your new file to override it, you could name your new file something like z_custom_keymap.xml to ensure it is processed last1.

All that needs to be done is to add the fullscreentag to your gen.xml like

so like this

<?xml version="1.0" ?>
<keymap>
  <global>
    <keyboard>
      <key id="61537">RunScript(script.nimbus.helper, mode=play_trailer)</key>
    </keyboard>
  </global>
  <FullscreenVideo>
    <keyboard>
      <backspace>Stop</backspace>
    </keyboard>
  </FullscreenVideo>
</keymap>

so if someone wanted to change the behaviour you just modify your gen.xml

so like this

<?xml version="1.0" ?>
<keymap>
  <global>
    <keyboard>
      <key id="61537">RunScript(script.nimbus.helper, mode=play_trailer)</key>
    </keyboard>
  </global>
  <FullscreenVideo>
    <keyboard>
<!--      <backspace>Stop</backspace>  -->
    </keyboard>
  </FullscreenVideo>
</keymap>

or just delete it and since there is no conflict the behaviour from keyboard.xml will take over

now the other part is to change the name so it reads it last. something like z_gen.xml any letter above k would work.

you already have all the code for doing this now you can modify much more if you wanted to and don't ever have to mess with keyboard.xml

I tested this and it works

Awesome! Looking forward to checking it out. Does this mean you forked the skin and are working on your own version?

lol. I can't code. I have an idea and I'm sure someone can make an addon of it (it's pretty novel and will add so much functionality to everyone). it's very extensive of what it would be able to do. it has some quirks but still worth it. I still think you would like it and hopefully I'll try to convince you to add a small part of it. it would benefit you. anyway I don't even know how to fork anything. and trust me I can't code.

ivarbrandt commented 2 weeks ago

I found a way , it will also give you much more control

I'm good thanks.

I have an idea and I'm sure someone can make an addon of it (it's pretty novel and will add so much functionality to everyone).

Sick dude. Let me know when its out.

and trust me I can't code.

Whether you think you can or you can't, either way you are right.

hcgiub001 commented 2 weeks ago

Sick dude. Let me know when its out.

yeah I'm doing it manually to show how it could work, I'll make a video of it when I'm finished so you can see if you like it.

:)

hcgiub001 commented 2 weeks ago

for completeness I had a vote

image

https://www.reddit.com/r/Addons4Kodi/comments/1flqka4/do_you_prefer_the_video_to_close_when_pressing/

also regarding the feature I'm developing. I'm using Microsoft co-pilot to painstakingly add little bits at a time, as it gets bigger it's harder to control the behaviour. I also found another awesome way to add something else into it, so I'm taking my time building it. I'll be using scripts and manually have to track what I'm doing, an addon that can do all that would be perfect. so maybe in a week I'll report on it :) I've nothing left to add to this issue, thanks for hearing me out

also image

this could be cool? to be able to chose from 3 behaviours, fullscreen, stop, pause you don't add any new keymaps, only alter the one you have on each change then reload keymap.

anyway peace