Error callback in amazon-ivs-web-broadcast

34 Views Asked by At

I am using amazon-ivs-web-broadcast.js(https://web-broadcast.live-video.net/1.6.0/amazon-ivs-web-broadcast.js) to record meetings, To handle error i added try and catch blocks to all give fucnction like IVSBroadcastClient?.create

Apart from this is there any callback which is triggered on error for the scenarios like broadcast stream failure

In other words is there any way to detect any failure in IVSBroadcastClient during streaming

async createBroadcast(resolution: string,channelType: string) {
        if(typeof window != "undefined" && window.IVSBroadcastClient){
            try {
                const streamConfig = this.getConfigFromResolution(resolution,channelType);
                this.broadcastClient = window.IVSBroadcastClient?.create({
                    streamConfig: streamConfig
                  })
                
                return this.broadcastClient;
              } catch (error) {
                this.errorMsg = IVSErrorMsg.error_creating_stream
              }
        }
    } 
0

There are 0 best solutions below