Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions app/services/platforms/youtube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>(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<void>(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') {
Expand Down
Loading