Home > APIs > AppServer API > Examples > Summit API Features > Flying Mix Effects
Flying Mix Effects
Flying Mix Effects
On a Summit Client you have the ability to create on-the-fly mix effects between foreground and background channel context changes. Available on-the-fly transition are:
- video dissolve between contexts
- video fade-thru-matte color between contexts
- audio cross-fade between contexts
- audio fade-thru-silence between contexts
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 FlyingMixEffects.cs.
Below is a code snippet showing how to configure a dissolve between contexts. Also refer to the Context Changes page for more information about contexts and triggers:
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) }; string channel = "C1"; // create a controller, player, and preview bool isNewController = false; ISimpleController controller = iappServer.CreateController( appName, channel, out isNewController); ISimplePlayerRecorder player = (ISimplePlayerRecorder) controller; ITwoHeadPlayerRecorder preview = (ITwoHeadPlayerRecorder) controller; // load player, cue to start and start playing it player.Load("edl/cmf//local/V:/default/Clip_1"); player.CueStart(); player.Play(); // load another clip on the background preview context preview.LoadPreview("edl/cmf//local/V:/default/Clip_2"); // preview.ActivateMode = "replace"; // when context switching occurs, inactive context is ejected preview.ActivateMode = "swap"; // when context switching occurs, clip remains on inactive context // EXAMPLE 1: immediate dissolve // wait a few seconds... just so we can see the // transition from foreground to background context Thread.Sleep(3000); // cue the preview context and start it playing in the // background. Note: that the "manual" context change // performsthe cueing & starts playing, but it does not // switch the context from foreground to background preview.BeginPreviewContextChange (); preview.CueStart(); preview.Play(); preview.CommitContextChange("manual"); // setup a video dissolve & audio crossfade for 2 seconds Object[] transParams = new Object[4]; transParams[0] = 120; // fields of transition transParams[1] = (int) VideoTransition.Dissolve; // video dissolve transParams[2] = (int) AudioTransition.CrossFade; // audio crossfade transParams[3] = (int) MatteColor.Black; // black matte // now switch the context and do the transition. // note that the "transition" context changes performs // the "commit" so no CommitContextChange is needed // afterwards. preview.BeginPreviewContextChange(); preview.ScheduleContextChange ("transition", transParams ); // wait some time just to see the transition and the background clip Thread.Sleep(3000);