Menu

Adding Media Player

Shoaib

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


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.