public void InsertSlateTest() { var account = App.Config.GetDefaultAccount(); var context = account.GetContext(); var controller = new ChannelsController(); var channels = context.Channels.ToList(); var channel = channels.FirstOrDefault(c => c.State == ChannelState.Running && c.EncodingType != ChannelEncodingType.None); if (channel != null) { var settings = new Models.SlateSettings { Duration = 30 }; var operation = controller.Slate(account.AccountName, channel.Id.NimbusIdToRawGuid(), settings); } }
public void InsertAdTest() { var account = App.Config.GetDefaultAccount(); var context = account.GetContext(); var controller = new ChannelsController(); var channels = context.Channels.ToList(); var channel = channels.FirstOrDefault(c => c.State == ChannelState.Running && c.EncodingType != ChannelEncodingType.None); if (channel != null) { var settings = new Models.SlateSettings { Duration = 30, ShowSlate = true, CueId = (int)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds }; var operation = controller.AdMarker(account.AccountName, channel.Id.NimbusIdToRawGuid(), settings); } }