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
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.
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
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.
I am seeing the same issue. This app was working, but suddenly stopped firing the audio file.
Did anyone find a fix?
Hi David,
I have not found a fix yet. And no one has suggested one.
Thanks,
Freddie
I am working with Microsoft engineers directly to investigate this issue. If we determine a solution, I will come back and post it. {shrug}
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.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
207 | |
98 | |
60 | |
55 | |
52 |
User | Count |
---|---|
257 | |
160 | |
87 | |
79 | |
66 |