Execute actions when player starts playing media? Something like Player.OnPlay
#1
Question 
Hey,

is there a way to check from within a Skin when the player starts playing a media file (video file, music file). Something like a Player.OnPlay action which can execute some actions from within the skin.

Thanks again!
⬅️⬅️ Feel free to leave a 👍 on useful posts  |  A Confluence ZEITGEIST (A modern reimagination of Confluence)  |  axbmcuser REPO (Download Link)  |  Kodi 17.7 DSPlayer x64 BETTERGUI (2020 build)
Reply
#2
Player.HasMedia ? Wink

http://kodi.wiki/view/List_of_boolean_conditions
Quote:Player.HasMedia Returns true if the player has an audio or video file.

Simply create a custom window, which only is visible if this bool is set to true, and add actions to <onload>
Code:
<?xml version="1.0" encoding="UTF-8"?>
<window id="1110" type="dialog">    
    <visible>Player.HasMedia</visible>
        <onload>.....</onload>
    <controls>
        ....
        </controls>
</windows>
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#3
I already experiented with HasMedia, but did not think of a custom window. Great idea. I'll try it out. Thanks.
⬅️⬅️ Feel free to leave a 👍 on useful posts  |  A Confluence ZEITGEIST (A modern reimagination of Confluence)  |  axbmcuser REPO (Download Link)  |  Kodi 17.7 DSPlayer x64 BETTERGUI (2020 build)
Reply

Logout Mark Read Team Forum Stats Members Help
Execute actions when player starts playing media? Something like Player.OnPlay1