Unable to Get Embedded Audio File in hyperlinkClick

Please browse the following documents.
动作音效测试.pptx.zip (35.9 KB)
snapshot1.jpg (246.7 KB)
snapshot2.jpg (245.2 KB)
snapshot3.png (119.0 KB)
You can click the button to play a sound. But we cannot get embedded audio from the Hyperlink api. Could you give us some guidance?

@oscarstar,
Thank you for contacting support.

Unfortunately, I was not able to extract the sound file directly from the shape. You can get the sound file as shown below:

Presentation presentation = new Presentation("动作音效测试.pptx");
IAudio firstAudio = presentation.getAudios().get_Item(0);

Is this way suitable for you?

I can’t play a sound in the hyperlink click event in this way. Can you consider adding an interface to get audio files in the Hyperlink class? Because we don’t know the relationship between them.

@oscarstar,
I’ve added a ticket with ID SLIDESJAVA-38898 to our issue tracking system. Our development team will consider implementing such a feature. You will be notified when the issue is resolved.

Thank you for your attention and look forward to your good news.

@oscarstar,
I’ve requested information from our development team for you. We will let you know soon.

@oscarstar,
The issue has been planned to fix in Aspose.Slides 22.11. Thank you for your patience.

The issues you have found earlier (filed as SLIDESJAVA-38898) have been fixed in Aspose.Slides for Java 22.11 (JAR).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.

@oscarstar,
With Aspose.Slides for Java 22.11, you can use the following code snippet:

Presentation presentation = new Presentation("ActionSoundTest.pptx");
IHyperlink link = presentation.getSlides().get_Item(0).getShapes().get_Item(0).getHyperlinkClick();
if (link != null) {
    IAudio linkAudio = link.getSound();
    Files.write(Paths.get("audio.wav"), linkAudio.getBinaryData());
}

Fantastic, I’m already using it.

@oscarstar,
Thank you for your feedback.