{"id":4589,"date":"2021-11-30T14:07:18","date_gmt":"2021-11-30T06:07:18","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4589"},"modified":"2025-02-21T14:01:00","modified_gmt":"2025-02-21T06:01:00","slug":"get-devices","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/react-native-toolkit\/get-devices\/","title":{"rendered":"Get Media Devices: React Native 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 an audio device (Microphone) or use the default microphone of your Client platform to initiate a stream. Portal provides API support to get a list of audio devices  (Microphone) available with your Client platform running the Client End Point application along with their Device names. <\/p>\n\n\n\n<p>The <code>Enx.getDevices()<\/code> method is used to return a list containing all the microphones available with your client platform. You can build UI Element with the List to choose a Microphone. <\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>Enx<\/code><\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>getDevices(Callback) <\/code><\/p>\n\n\n\n<p><strong>Callback<\/strong>:  Returns one or more of the following enumerated values:  SPEAKER_PHONE,&nbsp; WIRED_HEADSET, &nbsp;EARPIECE,&nbsp; BLUETOOTH,&nbsp; NONE<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Enx.getDevices(devices=&gt;&nbsp;{\n     \/\/ devices= Comma separated Device Names\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 Selected Audio Device by User<\/h2>\n\n\n\n<p><code>Enx.getSelectedDevice()<\/code> method is used to get the selected or used Audio Device for the Stream. <\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>getSelectedDevice(Callback) <\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> Enx.getSelectedDevice(device&nbsp;=&gt;&nbsp;{\n     \/\/ device = Current Device Name\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 React Native 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=\"..\/local-stream\/\">Create Local Stream<\/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 an audio device (Microphone) or use the default microphone of your Client platform to initiate a stream. Portal provides API support to get a list of audio devices (Microphone) available with your Client platform running the Client End Point application along with their Device names. The Enx.getDevices() method&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3747,"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 an audio device (Microphone) or use the default microphone of your Client platform to initiate a stream. Portal provides API support to get a list of audio devices (Microphone) available with your Client&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4589"}],"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=4589"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4589\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3747"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}