Set inserted audio to start automatically

Is it possible to set audio that is inserted into a slide to start automatically after the slide transitions.

The current example inserts an image and attaches start to a click on that image.

I can’t see any properties exposed on the audio object or the slide to automatically start playing.

Hi,

Unfortunately no, this is currently not supported.
The feature requires support for timing and animation, which are supported only through preservation at this moment.

Note that we do have an internal support ticket for timing and animation, and I have added your report to it as well to increase its priority.
But I’m afraid this is not in our current roadmap so it won’t be available this year.

Regards,
Mario

`Thanks Mario.

I appreciate that you responded, so that at least my expectations are tempered.

Hi Mario- Is there a way that you can update an audio file from an existing PPTX file. I have the same issue where I need the audio to play automatically. What I wanted to do is have an existing audio file already set to play automatically in the PPTX template. Then replace the .wav file in the existing template with a new audio file with the intent of preserving the Play automatically setting. Is that possible?

Hi Jeff,

Yes, I believe that could work.

Can you please try using something like this:

var presentation = PresentationDocument.Load("input.pptx");
var slide = presentation.Slides[0];

var picture = slide.Content.Drawings.OfType<Picture>().First(p => p.Media != null && p.Media.MediaType == MediaType.Audio);
var audio = picture.Media as AudioContent;

using (var stream = File.OpenRead("input.mp3"))
    audio.SetContent("audio/mp3", stream);

presentation.Save("output.pptx");

I hope this helps.

Regards,
Mario