{"id":4428,"date":"2021-11-22T18:27:43","date_gmt":"2021-11-22T10:27:43","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4428"},"modified":"2025-04-05T02:44:03","modified_gmt":"2025-04-04T18:44:03","slug":"stream-information","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/ios-toolkit\/stream-information\/","title":{"rendered":"Stream Information: iOS SDK &#8211; Video API"},"content":{"rendered":"\n<p>The following methods provide <a rel=\"noreferrer noopener\" href=\"\/developer\/video-api\/client-api\/web-toolkit\/enxstream\/\" target=\"_blank\">Stream-related information<\/a> such as the Stream type, media tracks, state, etc.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4>Table of Contents<\/h4>\n\n\n\n<ul><li><a href=\"#get-stream-id\">Get Stream ID<\/a><\/li><li><a href=\"#track-availability\">Verify availability of Media Tracks in Stream<\/a><\/li><li><a href=\"#know-local-remote-stream\">Know if Stream is Local or Remote<\/a><\/li><li><a href=\"#get-local-stream-id\">Get Local Stream ID<\/a><\/li><li><a href=\"#get-stream-by-stream-id\">Get Stream by Stream ID<\/a><\/li><li><a href=\"#get-remote-streams\">Get list of Remote Streams<\/a><\/li><\/ul>\n\n\n\n<a name=\"get-stream-id\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Stream ID<\/h3>\n\n\n\n<p>The Stream ID of a given Stream can be obtained from its property <code>streamId<\/code>. The Stream ID is used to identify every Stream, be it a local or a remote stream, a canvas stream, or a screen-share stream.<\/p>\n\n\n\n<p><strong>Class<\/strong>:&nbsp;<code>EnxStream<\/code><\/p>\n\n\n\n<p><strong>Property<\/strong>:&nbsp;<code>streamId<\/code><\/p>\n\n\n\n<a name=\"track-availability\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Verify availability of Media Tracks in Stream<\/h3>\n\n\n\n<p><code>EnxStream<\/code> class provides the following methods to check the presence of a particular media track in the Stream.<\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxStream<\/code><\/p>\n\n\n\n<p><strong>Methods<\/strong>:<\/p>\n\n\n\n<ul><li>To check if Stream has an Audio Track: <ul><li><code>- (BOOL)hasAudio<\/code>  &#8211; No Parameter required.<\/li><\/ul><\/li><li>To check if Stream has a Video Track:<ul><li><code>- (BOOL)hasVideo<\/code>  &#8211; No Parameter required. <\/li><\/ul><\/li><li>To check if Stream has a Data Track:<ul><li><code>- (BOOL)hasData<\/code>  &#8211; No Parameter required.<\/li><\/ul><\/li><\/ul>\n\n\n\n<p><strong>Returns:<\/strong> Boolean<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">if ([stream hasVideo] ) {\n     \/\/ The Stream has a Video Track in it\n}\n\n\/\/ Other methods are also used in the similar manner.<\/pre>\n\n\n\n<a name=\"know-local-remote-stream\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Know if Stream is Local or Remote<\/h3>\n\n\n\n<p>The Stream&#8217;s property <code>isLocal<\/code> is used to know if the given Stream is a Local or a Remote Stream.<\/p>\n\n\n\n<p><strong>Class<\/strong>: EnxStream<\/p>\n\n\n\n<p><strong>Property<\/strong>: <code>isLocal <\/code>&#8211; BOOL<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">if (stream.isLocal) {\n     \/\/ It's a Local Stream\n }\n else {\n     \/\/ It's a  Remote Stream\n }<\/pre>\n\n\n\n<a name=\"get-local-stream-id\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Local Stream ID<\/h3>\n\n\n\n<p>The <code>publishStreamId<\/code> property provides the ID of your Local Stream published in the Room.<\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Property<\/strong>: NSString <code>publishStreamId<\/code> <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">NSString* publishStreamID = room.publishStreamId; <\/pre>\n\n\n\n<a name=\"get-stream-by-stream-id\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Stream by Stream ID<\/h3>\n\n\n\n<p>The <code>streamsByStreamId<\/code> property provides the<a href=\"\/developer\/video-api\/client-api\/appendix\/#stream-options\" target=\"_blank\" rel=\"noreferrer noopener\"> Stream information<\/a> for the given Stream ID.<\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Property:<\/strong> NSDictionary <code>streamsByStreamId<\/code> <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">NSDictionary* streamsDict = room.streamsByStreamId; \/\/ Get Dictionary\n\nEnxStream* stream =  streamsDict[@\"StreamID\"];  \/\/ Get specific Stream Object<\/pre>\n\n\n\n<a name=\"get-remote-streams\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get list of Remote Streams<\/h3>\n\n\n\n<p>The <code>remoteStreams<\/code> property provides the list of Remote Streams available in the Room.<\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Property<\/strong>: NSArray <code>remoteStreams<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">NSArray* remoteStreams = room.remoteStreams;<\/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=\"..\/play-stream\/\">Play Stream<\/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-information\/\">Know Your Room<\/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>The following methods provide Stream-related information such as the Stream type, media tracks, state, etc. Table of Contents Get Stream ID Verify availability of Media Tracks in Stream Know if Stream is Local or Remote Get Local Stream ID Get Stream by Stream ID Get list of Remote Streams Get Stream ID The Stream ID of a given Stream can be obtained from its property streamId. The Stream ID is&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3732,"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":"The following methods provide Stream-related information such as the Stream type, media tracks, state, etc. Table of Contents Get Stream ID Verify availability of Media Tracks in Stream Know if Stream is Local or Remote Get Local Stream ID Get Stream by Stream ID Get list of Remote Streams Get Stream ID The Stream ID&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4428"}],"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=4428"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4428\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3732"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}