This is a migrated thread and some comments may be shown as answers.

Customizing the UI for Audio Capture

1 Answer 176 Views
Apache Cordova
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jason
Top achievements
Rank 1
Jason asked on 28 May 2015, 12:08 PM
We're building an app that captures audio/video as part of a training exercise. We want to customize the UI used to capture the audio (orientation, etc.), but we can't find any information on doing so. Can anyone point us in the right direction?

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 02 Jun 2015, 08:24 AM
Hello Jason,

You can use the Media core plugin to record audio. Use its ​startRecord​ and ​stopRecord​ methods to make a recording. You can tie them to any UI you create for your application. Here is a small sample of how you can trigger and stop a recording using the plugin:

var src = "myrecording.wav";
var mediaRec = new Media(src,
    // success callback
    function () {
        console.log("recordAudio():Audio Success");
    },
 
    // error callback
    function (err) {
        console.log("recordAudio():Audio Error: " + err.code);
    }
);
 
// Record audio
mediaRec.startRecord();
 
// Stop recording after 2 seconds
setTimeout(function () {
    mediaRec.stopRecord();
}, 2000);



Regards,
Tsvetina
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
Apache Cordova
Asked by
Jason
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or