diff --git a/app/services/platforms/youtube.ts b/app/services/platforms/youtube.ts index 7d93fde63c54..0947a4ff8e55 100644 --- a/app/services/platforms/youtube.ts +++ b/app/services/platforms/youtube.ts @@ -550,16 +550,24 @@ export class YoutubeService } if (this.streamingService.views.isDualOutputMode && ytSettings.display === 'both') { - // Prevent rate limit errors by delaying the dual stream setup by 1 second - await new Promise(resolve => { - setTimeout(async () => { - await this.setupDualStream(goLiveSettings); - resolve(); - }, 1000); - }); + try { + // Prevent rate limit errors by delaying the dual stream setup by 1 second + await new Promise(resolve => { + setTimeout(async () => { + await this.setupDualStream(goLiveSettings); + resolve(); + }, 1000); + }); + } catch (e: unknown) { + console.error('Error setting up YouTube dual stream', e); + + // Catch error to prevent blocking the horizontal stream starting if there is an issue + // setting up the vertical stream + this.postError('Error setting up YouTube dual stream. Vertical stream not started.'); + } } - // Updating the thumbnail in the stream settings happends when creating the broadcast. + // Updating the thumbnail in the stream settings happens when creating the broadcast. // This is because the user can still go live even if the thumbnail upload fails, // and we want to avoid setting an invalid thumbnail in state. if (ytSettings.thumbnail && ytSettings.thumbnail !== 'default') {