When do we need tracks? - Welcome page (only the video track) - Conference (depends if starting with audio / video muted is requested) When do we need to destroy the tracks? - When we are not in a conference and there is no welcome page In order to accommodate all the above use cases, a new component is introduced: BlankWelcomePage. Its purpose is to take the place of the welcome page when it is disabled. When this component is mounted local tracks are destroyed. Analogously, a video track is created when the (real) welcome page is created, and all the desired tracks are created then the Conference component is created. What are desired tracks? These are the tracks we'd like to use for the conference that is about to happen. By default both audio and video are desired. It's possible, however, the user requested to start the call with no video/audio, in which case it's muted in base/media and a track is not created. The first time the app starts (with the welcome page) it will request permission for video only, since there is no need for audio in the welcome page. Later, when a conference is joined permission for audio will be requested when an audio track is to be created. The audio track is not destroyed when the conference ends. Yours truly thinks this is not needed since it's a stopped track which is not using system resources. |
||
---|---|---|
.. | ||
Conference.native.js | ||
Conference.web.js | ||
index.js | ||
styles.js |