{"id":4574,"date":"2021-11-29T19:14:16","date_gmt":"2021-11-29T11:14:16","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4574"},"modified":"2022-04-08T18:37:20","modified_gmt":"2022-04-08T10:37:20","slug":"take-image-snapshot","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/react-native-toolkit\/take-image-snapshot\/","title":{"rendered":"Take Image Snapshot of Video Stream: React Native SDK &#8211; Video API"},"content":{"rendered":"\n<p>To take snapshot of a video stream in your application use the<code>&nbsp;Enx.captureScreenShot()<\/code> method. The image from the video stream will be captured as raw bitmap and returned as base64 string data in the callback.<\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>Enx.captureScreenShot(streamId)<\/code><\/p>\n\n\n\n<p><strong>Parameter<\/strong>: <code>streamId<\/code> &#8211; String. ID of Stream from which Snapshot to be taken<\/p>\n\n\n\n<p><strong>Callback<\/strong>: <code>capturedView <\/code>&#8211; Receives base64 encoded String for the capatured raw bitmap<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Enx.captureScreenShot(localStreamId);\n\ncapturedView:&nbsp;event&nbsp;=&gt;&nbsp;{\n\tthis.setState({\n\t\tbase64Icon:&nbsp;event\n\t});\n}\n\n\/\/ To show captured snapshot\n&lt;Image \n\tstyle={{&nbsp;width:&nbsp;50,&nbsp;height:&nbsp;50&nbsp;}}\n\tsource={{&nbsp;uri:&nbsp;`data:image\/png;b ase64,${this.state.base64Icon}`}}\n\/&gt; <\/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=\"..\/handle-application-switch\/\">Handle Application Switch<\/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=\"..\/share-log\/\"><\/a><a href=\"..\/share-log\/\">Share Log to audit<\/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>To take snapshot of a video stream in your application use the&nbsp;Enx.captureScreenShot() method. The image from the video stream will be captured as raw bitmap and returned as base64 string data in the callback. Method: Enx.captureScreenShot(streamId) Parameter: streamId &#8211; String. ID of Stream from which Snapshot to be taken Callback: capturedView &#8211; Receives base64 encoded String for the capatured raw bitmap Enx.captureScreenShot(localStreamId); capturedView:&nbsp;event&nbsp;=&gt;&nbsp;{ this.setState({ base64Icon:&nbsp;event }); } \/\/ To show&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":"To take snapshot of a video stream in your application use the&nbsp;Enx.captureScreenShot() method. The image from the video stream will be captured as raw bitmap and returned as base64 string data in the callback. Method: Enx.captureScreenShot(streamId) Parameter: streamId &#8211; String. ID of Stream from which Snapshot to be taken Callback: capturedView &#8211; Receives base64 encoded&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4574"}],"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=4574"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4574\/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=4574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}