Aspose.Slides - Adding Media Player

//Create empty presentation instance
Presentation newPptx = new Presentation();

//Adding the Media Player ActiveX control
newPptx.getSlides().get_Item(0).getControls().addControl(ControlType.WindowsMediaPlayer, 50, 50, 550, 300);

//Access the Media Player ActiveX control and set the video path
newPptx.getSlides().get_Item(0).getControls().get_Item(0).getProperties().set_Item("URL", "C:\\Wildlife.wmv");

//Save the Presentation
newPptx.save("data/AsposeMediaPlayer.pptx", SaveFormat.Pptx);		

Download Source Code

For More Examples, Please Visit Aspose Docs

Last edited Jul 21, 2014 at 3:27 PM by shoaibkhan, version 2