cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Audio file not playing on first screen.

Hi all,

 

I have created an app and have an audio file which I want to play when the first app screen is visible. Currently the audio file plays for some users when they open the app and not for other users and I cannot work out why it only works for some users.

 

The audio file is set to play when varIntro: true. I have set the onvisible property of the first screen to: UpdateContext({varIntro: true}) so whenever the first screen is visible the audio file should be playing. When a user navigates away from a screen I have UpdateContext({varIntro: false}).

 

If I open the app in Edit mode the audio file plays immediately. If I open the app in play mode the audio file does not play unless I navigate away from screen 1 and navigate back to screen 1.

 

For the audio file I currently have the following settings:

Start = varIntro

AutoStart = true

Loop = false

 

Thanks,

 

Freddie

9 REPLIES 9
Anonymous
Not applicable

Sorry I should also say: I thought originally the file wasn't playing because it didn't have time to load. So I used a timer function and got the sound to play once the timer reached 10 seconds. This still didn't work for some users the first time they open the app.

v-siky-msft
Community Support
Community Support

Hi @Anonymous ,

 

I would suggest you change to use global variable instead of update context variable, and then put the code 'Set(varIntro, true)' to the App.OnStart property since you want the audio file play in the first screen.

 

Hope this helps.

Sik

Anonymous
Not applicable

Hi Sik,

 

I have tried using a global variable and it still is not working. As I mentioned, it works for some users and not for other users. Do you have any other suggestions?

 

Thanks,

 

Freddie

Hi @Anonymous ,

 

It's hard for me to reproduce this issue. I haven't manage to that.

I would suggest you submit a Support Ticket to Microsoft for further assistance.

Get Help + Support 
Sik

Anonymous
Not applicable

@Sik  no problem at all. Thanks for helping 🙂

DavidBowdish
Frequent Visitor

I am seeing the same issue. This app was working, but suddenly stopped firing the audio file. 


Did anyone find a fix?

Anonymous
Not applicable

Hi David,

 

I have not found a fix yet. And no one has suggested one. 

 

Thanks,

 

Freddie

DavidBowdish
Frequent Visitor

I am working with Microsoft engineers directly to investigate this issue. If we determine a solution, I will come back and post it. {shrug}

DavidBowdish
Frequent Visitor

This issue appears to be limited to Chrome and Chromium browsers like Edge.

The first round of investigations seem to point to a security feature that prevents the playing of an audio file until the user interacts with the app. So, if an OnStart(), or an OnVisible() called from the OnStart(), attempts to play an audio file before another control is acted upon, the audio file will not play.

This seems logical, but I am also having a similar issue with a Timer control. I will post if Microsoft comes up with a valid work-around or solution.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,977)