Alpha [Prerelease][Wip] extrabuttons - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151) +---- Thread: Alpha [Prerelease][Wip] extrabuttons (/showthread.php?tid=355845) |
[Prerelease][Wip] extrabuttons - Takezo36 - 2020-07-13 Hi, i wanted to share some things i'm developing to get some feedback and maybe some ideas and of course some testing. THIS IS ALL FOR KODI 19 ONLY. PYTHON 3 IS MANDATORY FOR THIS TO WORK. So basically i wanted to have some buttons on the player like in the youtube tv app. Basically having a few plugin specific functions on screen. Well i ended up writing a bit of a framework to do this and support a few common things in video plugins. Chat, comments, channel of the current video, vote video, show related videos. Now i got my first instances kind of working for youtube. This all needs skin integration so if you want to test this you'd need to use my dev skin from here https://github.com/Takezo36/kodistuff/raw/master/skin.estuary-suggestionmd.zip Now what do you get here in a few screenshots. ( Buttons for going to the channel, show related videos, upvote, downvote and comments. For live you'll get chat ... Now what doesn't work. You can't reply to comments at the moment... got to figure that out. Related Videos doesn't play... don't know have tried a lot of things which didn't work. What are known limitations: There is a delay when you first open the VideoOSD till the buttons appear. They are being preloaded as soon as the video starts. So in the best case you get the buttons within a second. If you do directly open the osd you might got to wait a few seconds till the buttons appear. There is some socket communication going on internally. All on port 7777. No configurable at the moment. What does work. You get comments and replies when you click on them. You get the chat on a live stream. You can reply. Go to the channel in the youtube plugin. Show related videos (even though you can't play at the moment) Upvote and Downvote (showing current ones) What's next... - well i'll try to fix the current doesn't work. - I want to get a emoji font included that the chat isn't full of [] - I started to look into twitch. looks doable but i had some problems with the plugin need to retry at some point. - Have a button popup which can be called via a hotkey. So no need for the skin extension How does all of this work and what can it do and what not. So what i'm doing is to get the current containerpath to identify what plugin is running and what does it play using regex. This works perfect in the youtube and twitch case because they have the video id in their path and from there on i can rely on that wonderful youtube api implementation from the youtube plugin guys. or do http calls or whatever needs to be done. In that case it works fine. For instance the Joyn plugin has nothing on its path which allows me to identify the video and do something. So i'll not be able to get something running on there So there are some plugins which are perfect for integration on my side but some are just not doable. Youtube quota youtube quota As you most likely know there is the youtube api quota. So getting video infos cost 1-3 points, getting comments like 5 (don't know exactly now), chat should be free according to youtubes api doc (stackoverflow likes to differ). Now i try to load things as few times as possible (well once) and only when needed. However during my dev time which had a lot of repeated usage i did run out of quota a few times. Even though after some optimization it didn't happen again. You should be fine but i can't guarantee anything here. If you run out of quota because of extrabuttons i fear i can't help it. Youtube 'live' chat Youtubes chat api is a get with a build in delay before asking for the next set of chat comments. So there is a delay of like up to 5 seconds. Nothing which can be done here. Download links https://github.com/Takezo36/kodistuff/raw/master/plugin.program.extrabuttons.zip https://github.com/Takezo36/kodistuff/raw/master/skin.estuary-suggestionmd.zip Source https://github.com/Takezo36/kodistuff/ |