Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Capture Audio is not working

(0) ShareShare
ReportReport
Posted on by 479

HI Guys,

 

Am using CaptureAudio feature of the PCF as below but its throwing an error - Required method not supported on device

any help is appreciated.

var self = this;

 var promise1 = new Promise<File>(function (resolve, reject) {
 setTimeout(function () {
 debugger;
 
 self._context.device.captureAudio()
 }, 300);
 });

 promise1.then(function (value) {
 debugger;
 console.log(value);
 // expected output: "foo"
 });

 

Regards,

Pavan Kumar Garlapati

  • JP-09110045-0 Profile Picture
    on at
    Re: Capture Audio is not working

    Hi Pavan,

     

    Device's captureAudio method currently isn't supported on browsers and will work on mobile only.  You can add the null check I mentioned earlier to make sure you don't hit any exceptions and limit your code to only run captureAudio on mobile.

     

    Joseph

  • PavanKumar Profile Picture
    479 on at
    Re: Capture Audio is not working

    Hi @jopursle  @ScottDurow ,

     

    No luck I have deployed it in Model driven app and still am getting same error ""Required method not supported on device"" Any help on this please?

     

    Regards, Pavan Kumar Garlapati

  • JP-09110045-0 Profile Picture
    on at
    Re: Capture Audio is not working

    Hi Pavan,

     

    The device.captureAudio call will the current device to see if there is support for it and if that check returns false, the method will return that error.  By default the tooling harness will return false for these checks, so when running in the harness this is an expected message.

     

    While you can't test captureAudio in the harness, you can specify in the manifest required="false" and manually check in the method is available by checking if captureAudio is null or not.

     

    If required="false" for captureAudio in the ControlManifest.xml file:

     

    self._context.device.captureAudio !== null ? self._context.device.captureAudio() : null;

     

     

  • ScottDurow Profile Picture
    1,039 on at
    Re: Capture Audio is not working

    Hi Pavan,

    Have you declared the required api in the control manifest?

     

     <feature-usage>
     <uses-feature name="Device.captureAudio" required="true" />

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 89 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 72 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

Overall leaderboard