{"id":4240,"date":"2021-11-12T17:50:34","date_gmt":"2021-11-12T09:50:34","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4240"},"modified":"2022-04-08T14:09:04","modified_gmt":"2022-04-08T06:09:04","slug":"live-media-statistics","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/android-toolkit\/live-media-statistics\/","title":{"rendered":"Live Media Statistics: Android SDK &#8211; Video API"},"content":{"rendered":"\n<p>The <code>EnxRoom.enableStats()<\/code> method allows you to receive Statistics for all the Streams being received in the Room. The statistics help you analyze the streaming quality of all the Streams by providing information about the Streams such as:<\/p>\n\n\n\n<ul><li>Publishing Resolution<\/li><li>Bandwidth at Publisher&#8217;s end<\/li><li>Receiving Resolution<\/li><li>Receiving Bandwidth consumed<\/li><li>Available Bandwidth at Receiver&#8217;s end<\/li><\/ul>\n\n\n\n<p><strong>Class<\/strong>:&nbsp;<code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>public void enableStats(isEnabled,&nbsp;EnxStatsObserver)<\/code> <\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>isEnabled<\/code>&nbsp;\u2013 Boolean. Set to&nbsp;<em>true&nbsp;<\/em>to enable stats and&nbsp;<em>false&nbsp;<\/em>to disable them.<\/li><li><code>EnxStatsObserver <\/code>&#8211;  EnxStatsObserver instance.<\/li><\/ul>\n\n\n\n<p><strong>Callbacks:<\/strong><\/p>\n\n\n\n<ul><li><code>onAcknowledgeStats  <\/code>&#8211; Acknowledgment to the user when stream stats are enabled or disabled.<\/li><li><code>onReceivedStats <\/code>&#8211; Notification to the user when all streams stats is received.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">room.enableStats(true, this);\n\n@Override\npublic void onAcknowledgeStats(JSONObject jsonObject) {\n\n}\n\n@Override\npublic void onReceivedStats(JSONObject jsonObject) {\n\tLog.e(\"onReceivedStats\", jsonObject.toString());\n} <\/pre>\n\n\n\n<a name=\"init-stats\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Receive Stream Statistics for Individual Streams<\/h3>\n\n\n\n<p>The <code>EnxPlayerView.enablePlayerStats()<\/code> method allows you to individually receive statistics of Streams being played on the player. Please note, to receive individual stream stats, you also need to enable stats at room level using <code>EnxRoom.enableStats()<\/code> method.<\/p>\n\n\n\n<p><strong>Class<\/strong>:&nbsp;<code>EnxPlayerView<\/code><\/p>\n\n\n\n<p><strong>Method:<\/strong> <code>public void enablePlayerStats( isEnabled, EnxPlayerStatsObserver) <\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>isEnabled<\/code>&nbsp;\u2013 Boolean. Set to&nbsp;<em>true&nbsp;<\/em>to enable stats and&nbsp;<em>false&nbsp;<\/em>to disable.<\/li><li><code>EnxPlayerStatsObserver<\/code> &#8211;   EnxPlayerStatsObserver instance.<\/li><\/ul>\n\n\n\n<p><strong>Callback<\/strong>: <\/p>\n\n\n\n<p><code>onPlayerStats <\/code>&#8211;  Notification to the user when player&#8217;s stream stats is received. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">playerview.enablePlayerStats(true, this);\n\n@Override\npublic void onPlayerStats(JSONObject jsonObject) {\n\t\n}<\/pre>\n\n\n\n<p><strong>Error Codes \/ Exceptions:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Code<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>5075<\/td><td>Repeated Stream Stats Subscription request as a previous request is in process.<\/td><\/tr><tr><td>5076<\/td><td>Repeated Stream Stats Unsubscription request as a previous request is in process.<\/td><\/tr><tr><td>5077<\/td><td>Repeated Stream Stats request while Stream stats is already subscribed.<\/td><\/tr><tr><td>5078<\/td><td>Unsubscribing Stream Stats is not permitted without subscribing to it.<\/td><\/tr><tr><td>5079<\/td><td>Unable to unsubscribe to Stream Stats while Subscription request is in process.<\/td><\/tr><tr><td>5080<\/td><td>Stream Stats Unsubscription request is in process. <\/td><\/tr><\/tbody><\/table><\/figure>\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=\"..\/floor-access-control\/\">Lecture Mode<\/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=\"..\/talker-noise-notification\/\"><\/a><a href=\"..\/talker-noise-notification\/\">Get Talker Notification<\/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 EnxRoom.enableStats() method allows you to receive Statistics for all the Streams being received in the Room. The statistics help you analyze the streaming quality of all the Streams by providing information about the Streams such as: Publishing Resolution Bandwidth at Publisher&#8217;s end Receiving Resolution Receiving Bandwidth consumed Available Bandwidth at Receiver&#8217;s end Class:&nbsp;EnxRoom Method: public void enableStats(isEnabled,&nbsp;EnxStatsObserver) Parameters: isEnabled&nbsp;\u2013 Boolean. Set to&nbsp;true&nbsp;to enable stats and&nbsp;false&nbsp;to disable them. EnxStatsObserver &#8211;&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3740,"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 EnxRoom.enableStats() method allows you to receive Statistics for all the Streams being received in the Room. The statistics help you analyze the streaming quality of all the Streams by providing information about the Streams such as: Publishing Resolution Bandwidth at Publisher&#8217;s end Receiving Resolution Receiving Bandwidth consumed Available Bandwidth at Receiver&#8217;s end Class:&nbsp;EnxRoom Method:&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4240"}],"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=4240"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4240\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3740"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}