问题描述:
PPT里无法读取声音信息的裁剪数据
开发环境:Java8 Win10系统
工具包版本Aspose.Slide 19.11
使用文件见附件音频.zip (667.8 KB)
问题描述:
PPT里无法读取声音信息的裁剪数据
开发环境:Java8 Win10系统
工具包版本Aspose.Slide 19.11
使用文件见附件音频.zip (667.8 KB)
读取音频的部分代码
//1.获取幻灯片信息(音频)
AudioShape audioShape = new AudioShape();
IAudioFrame audioFrame = (AudioFrame) shape;
IAudio audio = audioFrame.getEmbeddedAudio();
IPPImage image = audioFrame.getPictureFormat().getPicture().getImage();
//2.1保存音频文件
String sourceName="";
if(audioFrame.getEmbedded()) {
sourceName = MediaUtil.write(audio.getStream(), audio.getContentType());
}
//2.2保存音频文件的图标
String sourceNameCover = MediaUtil.write(image.getBinaryData(),image.getContentType());
//3.设置音频属性
audioShape.setEmbedded(audioFrame.getEmbedded());
audioShape.setHideAtShowing(audioFrame.getHideAtShowing());
audioShape.setPlayLoopMode(audioFrame.getPlayLoopMode());
audioShape.setPlayMode(audioFrame.getPlayMode());
audioShape.setVolume(audioFrame.getVolume());
audioShape.setSrc(sourceName);
audioShape.setCoverSrc(sourceNameCover);
我在API中没有查找到读取音频裁剪信息数据的API!而在PPT中是有该属性的