-
Notifications
You must be signed in to change notification settings - Fork 5
Adding Audio Frame to Slide
shoaibkhan-aspose edited this page Jul 21, 2014
·
4 revisions
//Instantiate Presentation class that represents the PPTX
Presentation pres = new Presentation();
//Get the first slide
ISlide sld = pres.getSlides().get_Item(0);
//Load the wav sound file to stram
FileInputStream fstr = new FileInputStream(new File("C:\\logon.wav"));
//Add Audio Frame
IAudioFrame af = sld.getShapes().addAudioFrameEmbedded(50, 150, 100, 100, fstr);
//Set Play Mode and Volume of the Audio
af.setPlayMode(AudioPlayModePreset.Auto);
af.setVolume(AudioVolumeMode.Loud);
//Write the PPTX file to disk
pres.save("data/AsposeAudio.pptx", SaveFormat.Pptx);
Download Source Code
For further releases and updates, please follow these new repositories:
- Aspose.Words Java for Apache POI
- Aspose.Cells Java for Apache POI
- Aspose.Slides Java for Apache POI
- Aspose.Email Java for Apache POI
- For documentation, please visit Aspose Docs.
- Raise your queries and suggest more examples via Aspose Forums or via new social coding sites.