{"id":4830,"date":"2021-12-09T19:07:49","date_gmt":"2021-12-09T11:07:49","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4830"},"modified":"2025-02-23T12:51:25","modified_gmt":"2025-02-23T04:51:25","slug":"get-devices","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/cordova-toolkit\/get-devices\/","title":{"rendered":"Get Media Devices: Cordova\/Ionic SDK &#8211; Video API"},"content":{"rendered":"\n<ul><li><a href=\"#get-devices\">Get list of Audio Devices<\/a><\/li><li><a href=\"#get-selected-devices\">Get selected Audio Device by User<\/a><\/li><\/ul>\n\n\n\n<a name=\"get-devices\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Get a list of Audio Devices<\/h2>\n\n\n\n<p>You will need to specify Audio\/Video Device ID (Microphone &amp; Camera Device ID) or use the default Microphone Device ID of your Mobility Device to initiate a Stream. The Portal provides API support to get a list of Audio Devices available with your Device running the Client End Point application along with their device IDs. <\/p>\n\n\n\n<p>The <code>getDevices()<\/code> method is used to return a List containing all the audio devices connected to your Device. You can build UI Element with the List to choose a Device to use for Stream. <\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>getDevices( successCallback, errorCallback )<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>@param {CallableFunction} successCallback<\/code><\/li><li><code>@param {CallableFunction} errorCallback<\/code><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">window.EnxRtc.getDevices(function (data) {\nconsole.log(JSON.stringify(data.data));\n}, function (err) {\nconsole.log('JSON.stringify(err));\n});<\/pre>\n\n\n\n<a name=\"get-selected-devices\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Get the Selected Audio Device<\/h2>\n\n\n\n<p><code>window.EnxRtc.getSelectedDevice()<\/code> method is used to get the currently selected or in-use Audio Device for the Stream. <\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>getSelectedDevice( successCallback, errorCallback )<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>@param {CallableFunction} successCallback<\/code><\/li><li><code>@param {CallableFunction} errorCallback<\/code><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">window.EnxRtc.getSelectedDevice(function (data) {\nconsole.log(JSON.stringify(data.data));\n}, function (err) {\nconsole.log('JSON.stringify(err));\n});<\/pre>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<p>\u2190 <a href=\"..\/how-to-use\/\">How to use Cordova\/Ionic SDK<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-center\"><a href=\"..\/\">Index<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-right\"><a href=\"..\/room-connection\/\">Room Connection<\/a> \u2192<a href=\"\/developer\/how-to-use\/\"><\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get list of Audio Devices Get selected Audio Device by User Get a list of Audio Devices You will need to specify Audio\/Video Device ID (Microphone &amp; Camera Device ID) or use the default Microphone Device ID of your Mobility Device to initiate a Stream. The Portal provides API support to get a list of Audio Devices available with your Device running the Client End Point application along with their&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3719,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ub_ctt_via":""},"featured_image_src":null,"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"featured":false,"featured-large":false},"uagb_author_info":{"display_name":"vcxdevwpadmin","author_link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/author\/vcxdevwpadmin\/"},"uagb_comment_info":0,"uagb_excerpt":"Get list of Audio Devices Get selected Audio Device by User Get a list of Audio Devices You will need to specify Audio\/Video Device ID (Microphone &amp; Camera Device ID) or use the default Microphone Device ID of your Mobility Device to initiate a Stream. The Portal provides API support to get a list of&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4830"}],"collection":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/comments?post=4830"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4830\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3719"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}