Currently, the "Player" PlayerType only returns the name of the active or most recent media source (e.g., "YouTube").
In skins that aim to support multiple concurrent media sources, there is no easy way to detect every open/accessible platform at once to provide a "Source Switcher" UI.
Some users often have multiple tabs open (e.g., Spotify for music and Twitch for a stream) and want to switch control between them visually. (like me for example)
I have tried using complex IfMatch chains and heartbeat logic across multiple measures to "guess" what is open, but this is unreliable, heavy on resources, and fails if multiple browser tabs are open but only one is "active" in the eyes of the current Player type.
* Image example; Youtube Music + Youtube (but my skin only detects Youtube, not Youtube Music)
New PlayerType
It'd be cool if there was a new PlayerType called Players.
It's behavior would be like this:
- It should return a delimited string of all currently connected/open players.
for example;
If a user has YouTube, Spotify, and YouTube Music open, it would return:
YouTube|Spotify|YouTube Music
* example code:
[MeasurePlayers]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Players
RegExpSubstitute=1
; Example: Turn "YouTube|Spotify" into a vertical list or menu items
Substitute="\|":"#CRLF#"
* would return:
YouTube
Spotify
YouTube Music
This would allow the skins to control multi-media all at once
Currently, the "Player" PlayerType only returns the name of the active or most recent media source (e.g., "YouTube").
In skins that aim to support multiple concurrent media sources, there is no easy way to detect every open/accessible platform at once to provide a "Source Switcher" UI.
Some users often have multiple tabs open (e.g., Spotify for music and Twitch for a stream) and want to switch control between them visually. (like me for example)
I have tried using complex IfMatch chains and heartbeat logic across multiple measures to "guess" what is open, but this is unreliable, heavy on resources, and fails if multiple browser tabs are open but only one is "active" in the eyes of the current Player type.
* Image example; Youtube Music + Youtube (but my skin only detects Youtube, not Youtube Music)
New PlayerType
It'd be cool if there was a new PlayerType called Players.
It's behavior would be like this:
for example;
If a user has YouTube, Spotify, and YouTube Music open, it would return:
YouTube|Spotify|YouTube Music* example code:
* would return:
This would allow the skins to control multi-media all at once