Home > APIs > AppServer API > Examples > Summit API Features > Playlist Mix Effects
Playlist Mix Effects
Playlist Mix Effects
On a Summit Client you have the ability to create a playlist with section and event mix effects transitions. Available playlist transition are:
- Events:
- video dissolve between events
- video fade-thru-matte color between events
- audio cross-fade between events
- audio fade-thru-silence between events
- Sections:
- video fade from matte color at start or end of section
- video fade to matte color at start or end of section
- audio fade up at start or end of section
- audio fade down at start or end of section
Note: the Summit must have an AppCenter Pro license for this feature to work.
Full sample code can be downloaded from the C# Script Samples page. Look for the sample named PlaylistMixEffects.cs.
Below is a code snippet showing how to create a playlist with section and event mix effects. Please see Playlists, Sections, and Events page and Create a Basic Playlist page for more information on playlists.
[C#] public enum MatteColor { Black = 0x108080, White = 0xEB8080, Yellow = 0xD68A10, Cyan = 0xBC1099, Green = 0xAC1A29, Magenta = 0x4EE5D6, Red = 0x3EF066, Blue = 0x2075F0 }; public enum VideoTransition { None = 0, // standard video cut Dissolve = 1, // dissolve between 2 video tracks (available with both flying and playlist mix effects) FadeFromMatte = 2, // fades from matte color to video (available with playlist section mix effects only) FadeToMatte = 3, // fades from video to matte color (available with playlist section mix effects only) FadeThruMatte = 4, // fades from video to matte color to video (available with both flying and playlist mix effects) }; public enum AudioTransition { None = 0, // standard audio cut CrossFade = 1, // cross-fades between to audio tracks (available with both flying and playlist mix effects) FadeUp = 2, // audio fade up (available with playlist section mix effects only) FadeDown = 3, // audio fade down (available with playlist section mix effects only) FadeThruSilence = 4, // fade from audio to silence to audio (available with both flying and playlist mix effects) }; // turn off the player's loop play mode player.LoopPlayMode = false; // enable playlist pauses player.SetChannelProperty("listpauses", "true"); // enable playlist repeats player.SetChannelProperty("listrepeats", "true"); // set current bin player.SetCurrentBin(volume, bin); // generate a unique name for the playlist string playlist = player.GenerateUniqueName("playlist", "_"); // create the new playlist (which also loads it) player.New(playlist); // get an event editor IEventEditor editor = (IEventEditor) player.GetEditor(); // start the playlist at 1 hour editor.SetStartingTimecode("01:00:00,00"); // create a new section at the end of the clip (i.e. "") string section1 = editor.InsertSection(""); // setup section so that it starts by fading up from matte color editor.SetSectionProperty(section1, "StartTrans", true); editor.SetSectionProperty(section1, "StartTransDur", 120); // duration in fields editor.SetSectionProperty(section1, "StartVidTrans", (int)VideoTransition.FadeFromMatte); // video fade from matte editor.SetSectionProperty(section1, "StartAudTrans", (int)AudioTransition.FadeUp); // audio fade up editor.SetSectionProperty(section1, "StartTransMatte", (int)MatteColor.Black); // black matte color // setup section so that it ends by fading down to matte color editor.SetSectionProperty(section1, "EndTrans", true); editor.SetSectionProperty(section1, "EndTransDur", 120); // duration in fields editor.SetSectionProperty(section1, "EndVidTrans", (int)VideoTransition.FadeToMatte); // video fade to matte editor.SetSectionProperty(section1, "EndAudTrans", (int)AudioTransition.FadeDown); // audio fade down editor.SetSectionProperty(section1, "EndTransMatte", (int)MatteColor.Black); // black matte color // insert Clip 1 into section 1 string edit1 = editor.InsertPlayEvent(uriClip1, section1, 0, ""); // insert Clip 2 into section 1 string edit2 = editor.InsertPlayEvent(uriClip2, section1, 0, ""); // setup edit1 so that it fades thru matte color editor.SetEventProperty(edit1, "Trans", true); editor.SetEventProperty(edit1, "TransDur", 120); // duration in fields editor.SetEventProperty(edit1, "VidTrans", (int)VideoTransition.FadeThruMatte); // fade thru matte editor.SetEventProperty(edit1, "AudTrans", (int)AudioTransition.CrossFade); // audio crossfade editor.SetEventProperty(edit1, "TransMatte", (int)MatteColor.Black); // matte color // cue playlist to the start player.CueStart(); // start playing player.Play();