{"id":4610,"date":"2021-11-30T20:00:15","date_gmt":"2021-11-30T12:00:15","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4610"},"modified":"2025-02-20T17:20:20","modified_gmt":"2025-02-20T09:20:20","slug":"subscribing-remote-streams","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/react-native-toolkit\/subscribing-remote-streams\/","title":{"rendered":"Subscribing Remote Streams: React Native SDK &#8211; Video API"},"content":{"rendered":"\n<p>You must subscribe to the streams individually to receive media streams of other participants connected to a Room. Unless you subscribe a stream, you will not receive anything.<\/p>\n\n\n\n<p>When a new stream is added to the Room a callback <code>streamAdded<\/code> is received with Stream Object. The receive the stream, you need to subscribe to it using <code>Enx.subscribe()<\/code> method. <\/p>\n\n\n\n<p><strong>Method<\/strong>:  <code>Enx.subscribe(remoteStreamID, Callback)<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>remoteStream<\/code>ID- The Remote Stream Object to subscribe<\/li><li><code>Callback<\/code> &#8211; Error in subscription<\/li><\/ul>\n\n\n\n<p><strong>Callback:<\/strong> <code>streamSubscribed<\/code> &#8211; You are notified that the Stream has been subscribed. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ You are notified about new Stream in Room\nstreamAdded:event=&gt;{\t\/\/ Subscribe Stream\n\tEnx.subscribe(event.streamId,error=&gt;{\n\t\t\n\t});\n}\n\nstreamSubscribed :event=&gt;{\n    \/\/ Stream is subscribed \n}<\/pre>\n\n\n\n<p><strong>Note!<\/strong>  Please do not subscribe to your local stream. The platform will not return your local audio and video stream. Details can be found in <a rel=\"noreferrer noopener\" href=\"..\/active-talkers\/\" target=\"_blank\">Active Talkers<\/a> section. However, as a\u00a0publisher you will receive your own Screen Share and Canvas Streaming.   <\/p>\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=\"..\/mute-audio-video-stream\/\">Mute Unmute Audio Video<\/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=\"..\/active-talkers\/\"><\/a><a href=\"..\/active-talkers\/#active-talkers\">Handle Active Talkers<\/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>You must subscribe to the streams individually to receive media streams of other participants connected to a Room. Unless you subscribe a stream, you will not receive anything. When a new stream is added to the Room a callback streamAdded is received with Stream Object. The receive the stream, you need to subscribe to it using Enx.subscribe() method. Method: Enx.subscribe(remoteStreamID, Callback) Parameters: remoteStreamID- The Remote Stream Object to subscribe Callback&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":"You must subscribe to the streams individually to receive media streams of other participants connected to a Room. Unless you subscribe a stream, you will not receive anything. When a new stream is added to the Room a callback streamAdded is received with Stream Object. The receive the stream, you need to subscribe to it&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4610"}],"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=4610"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4610\/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=4610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}