Hello everyone.
I had uploaded a WAV audio to my App’s Audio Media. Then I added an Audio control and a Button control to my App, I set the Audio’s Media property to the file name that I added, and set its AutoStart property to if(Button.Pressed, true, false).
Unfortunately, this formula gives me an error.
Solved! Go to Solution.
Hi @bitvrbit ,
Do you want to play the Sound when you press the button?
Based on the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of the "Start/Stop" button to following:
UpdateContext({IsStart: !IsStart})
Set the Start property of the Audio control to following:
IsStart
set the OnEnd property of the Audio control to following:
Reset(Audio1);UpdateContext({IsStart: false})
Please consider take a try with above solution, check if the issue is solved.
Best regards,
Hi @bitvrbit ,
Do you want to play the Sound when you press the button?
Based on the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of the "Start/Stop" button to following:
UpdateContext({IsStart: !IsStart})
Set the Start property of the Audio control to following:
IsStart
set the OnEnd property of the Audio control to following:
Reset(Audio1);UpdateContext({IsStart: false})
Please consider take a try with above solution, check if the issue is solved.
Best regards,
Hello v-Xida-msft
Thanks for your help, I discovered the reason why the formula did not work. Instead of the virgo the semicolon must be inserted. Or noticed this problem in various old posts that mentioned formulas of various kinds. 🙂
If(Button7.Pressed; true; false).
User | Count |
---|---|
9 | |
7 | |
7 | |
5 | |
2 |
User | Count |
---|---|
20 | |
20 | |
18 | |
13 | |
4 |