I try to insert an item(news) into the current playlist after the current playing item(music). I coundn’t find a direct way to access this item like CurrentPlaylistItem or such. So i decided to check the players for an item in the state ps_playing, but the index of the Players are 0 and 2, so i can’t use a for-slope. This is more a matter of programming knowledge, cause i haven’t used pascal since about 20 years ago, I need to check if the CurrentPlaybackControl.GetPlayer actually returned a Player object or not.
Another thing I try to figure out is, if there is another way for CurrentPlaybackControl.AutomationJump, because this fades over to the given item, well i want the fading of the music, but i’d like to have the news start after the music is over and not a fading between these two items. Currently I use a container including 4 sec of silence and the news jingle.
Regarding the first question, check CurrentPlaybackControl.GetNextIndex, it will return the index of the item which is to be broadcasted after the current item. This is where you have to insert the news jingle.
There is no way to wait for the end of a fade, the next item will start instantly. If the news jingle is inserted by a script, you could insert another silence item just before it:
var
pi: IPlaylistItem;
begin
...
[insert news jingle]
...
pi := IPlayListItem(Factory.CreateSilencePlaylistItem);
pi.SetDuration(40000000); // 4 seconds
CurrentPlaylist.Insert(CurrentPlaybackControl.GetNextIndex, pi);
end.
PS: You are welcome to come to the German forum area and ask in German if it’s more convenient for you
is my english that bad ? :P, I needed a quick answer on that, cause we start working with automated mAirlist on July 1st and I thought the international forum would be fastest way.
Actually, the German forum is a little more active at the moment. But I’m fine with answering in either German or English, so you’re welcome to use whatever language you prefer.
Vi kunne også snakke på dansk, men jeg tror det kan du ikke så godt
Ok one last quick question before i’m done with the script … after the last news container i append the next playlist for the next hour, but it is a live moderated hour after 2 hours automation, i need to figure out how to add a command to stop automation after the news. I 'm also looking for a solution, but would be grateful for any quick hint, thanks