Media playlist with commercial interruptions - WarmUpTill/SceneSwitcher GitHub Wiki
The goal of this guide is to show how to regularly schedule commercial while playing a media playlist but without interrupting the individual playlist items.
It is assumed that you have configured a VLC source, which contains the playlist, with settings similar to this one:
The important part is the "Pause if not visible, unpause when visible" so that the playback does not restart when switching away and back to the scene containing the VLC source.
Next two macros need to be created:
- The first macro is responsible for detecting when a transition to the next playlist item takes place and if the specified commercial time interval has passed already.
If both are the case a scene switch will take place.
The media condition with state "playing" and "time remaining shorter than 1 second" restriction will allow us to identify when the current playlist entry is about to end. - The second macro is only responsible for automatically switching back to the scene containing the VLC video source playing back the playlist.
The important part is the macro action to reset the timer of the macro described above.
These settings will allow to automatically switch to a "commercial" scene if at least 30 seconds have passed and when a playlist item just ended its playback.