{"id":4394,"date":"2021-11-18T17:50:14","date_gmt":"2021-11-18T09:50:14","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4394"},"modified":"2022-04-11T15:30:18","modified_gmt":"2022-04-11T07:30:18","slug":"handle-application-switch","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/ios-toolkit\/handle-application-switch\/","title":{"rendered":"Handle Application Switch: iOS SDK &#8211; Video API"},"content":{"rendered":"\n<p>The following methods are used to switch the RTC application to the background and vice versa. The methods allow you to configure whether to continue streaming or pause after the switch.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Moving Application to Background<\/h3>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method:<\/strong><\/p>\n\n\n\n<p><code>- (void)stopVideoTracksOnApplicationBackground:(BOOL)flag<\/code> <\/p>\n\n\n\n<p><strong>Parameter:<\/strong><\/p>\n\n\n\n<p><code>flag<\/code> &#8211; BOOL. Set to <em>true<\/em> to stop publishing Local Video Stream on moving the application to the background.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> \/\/ To stop Video Track when application goes to Background \n[room stopVideoTracksOnApplicationBackground:true];   <\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Moving Application to Foreground<\/h3>\n\n\n\n<p><strong>Class:<\/strong> EnxRoom<\/p>\n\n\n\n<p><strong>Method:<\/strong><\/p>\n\n\n\n<p><code>- (void)startVideoTracksOnApplicationForeground:(BOOL)flag;<\/code><\/p>\n\n\n\n<p><strong>Parameter:<\/strong><\/p>\n\n\n\n<p><code>flag<\/code> &#8211; BOOL. Set to <em>true<\/em> to start publishing Local Video Stream on moving the application to the foreground.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ To resume Video Track when application comes back to Foreground\n[room startVideoTracksOnApplicationForeground:true];<\/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=\"..\/audio-only-mode\/\"><\/a><a href=\"..\/audio-only-mode\/\">Change to Audio Only Call<\/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>The following methods are used to switch the RTC application to the background and vice versa. The methods allow you to configure whether to continue streaming or pause after the switch. Moving Application to Background Class: EnxRoom Method: &#8211; (void)stopVideoTracksOnApplicationBackground:(BOOL)flag Parameter: flag &#8211; BOOL. Set to true to stop publishing Local Video Stream on moving the application to the background. \/\/ To stop Video Track when application goes to Background&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 are used to switch the RTC application to the background and vice versa. The methods allow you to configure whether to continue streaming or pause after the switch. Moving Application to Background Class: EnxRoom Method: - (void)stopVideoTracksOnApplicationBackground:(BOOL)flag Parameter: flag &#8211; BOOL. Set to true to stop publishing Local Video Stream on moving&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4394"}],"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=4394"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4394\/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=4394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}