Cleanup APIs to be called in web video SDK

Hi,

I am using web video SDK UMD files in the Vuejs application. I am calling the below APIs for cleanup while going to another page in the application.
//At the startup creating the instance of auduotrack, mediaStream and client.

   //Cleanup
    await this.audioTrack.stop();
    await this.mediaStream.stopAudio();
    await this.mediaStream.stopVideo();
    client.leave();
    if(typeof WebVideoSDK !== 'undefined'){
        WebVideoSDK.default.destroyClient();
    }

Please let me know If I am calling the API in the proper sequence? Is there any other API to be called during cleanup?

Which Web Video SDK version?
1.5.5

Device (please complete the following information):

  • Device: Desktop
    Processor: AMD Ryzen 5 2600 six-core processor
  • OS: Windows 10 Pro
  • Browser: [e.g. Chrome]
  • Browser Version : 108.0.5359.99 (Official Build) (64-bit)

Thanks
Krishnan

Hey @kvr

Thanks for your feedback.

That’s correct with your code.

Actually, WebVideoSDK.default.destroyClient() is enough for the cleanup.

Thanks
Vic