fix showing error alert on audio resync

This commit is contained in:
Nuwan 2023-07-20 03:31:37 +05:30
parent 483eb20c88
commit e03389909e
1 changed files with 11 additions and 4 deletions

View File

@ -278,11 +278,18 @@ ConfigureTracksActions = @ConfigureTracksActions
onAudioResync: `async function() {
logger.debug("audio resyncing");
const response = await context.jamClient.SessionAudioResync();
if (response != null) {
return this.app.notify({
try{
const response = await context.jamClient.SessionAudioResync();
if(!response.process_status === 'Success') {
this.app.notify({
"title": "Error",
"text": 'Error in audio resyncing',
"icon_url": "/assets/content/icon_alert_big.png"});
}
}catch(e){
this.app.notify({
"title": "Error",
"text": response,
"text": e.message,
"icon_url": "/assets/content/icon_alert_big.png"});
}
}`