Hi
I created an empty Presentation with a VideoFrame and PlayMode to Auto.
First problem: the video shows “No Image” frame
Second problem: the autoplay is not working !
My code:
Presentation pres = new Presentation();
pres.Slides.RemoveAt(0);
//Add the main slide
ISlide sld = pres.Slides.AddEmptySlide(pres.LayoutSlides[0]);
// Embedd vide inside presentation
IVideo vid = pres.Videos.AddVideo(new FileStream(v.FullName, FileMode.Open), LoadingStreamBehavior.ReadStreamAndRelease);
// Add Video Frame
IVideoFrame vf = sld.Shapes.AddVideoFrame(0, 0, pres.SlideSize.Size.Width, pres.SlideSize.Size.Height, vid);
// Set video to Video Frame
vf.EmbeddedVideo = vid;
// Set video settings
//vf.Volume = AudioVolumeMode.Loud; //keep original
vf.PlayMode = VideoPlayModePreset.Auto;
vf.PlayLoopMode = true;
vf.RewindVideo = true;
vf.FullScreenMode = true;
vf.Rotation = 0;
vf.HideAtShowing = false; //hide when cannot play
//set slide sequence
ISequence sequence = sld.Timeline.MainSequence;
//clear effects
sld.Timeline.MainSequence.Clear();
// Adds Fade animation effect to shape
sld.Timeline.MainSequence.AddEffect(vf, EffectType.MediaPlay, EffectSubtype.None, EffectTriggerType.WithPrevious);
//clear interactive sequences
ISequenceCollection interactiveSequences = sld.Timeline.InteractiveSequences;
Debug.WriteLine(interactiveSequences);
interactiveSequences.Clear();
Normally, when you do this in PowerPoint with a classic video insertion and same animations, this is working.
Have an idea please ?
Thanks,
Regards