Skip to content

Commit

Permalink
Merge pull request #13 from mazshakibaii/patch-1
Browse files Browse the repository at this point in the history
fix: iOS Safari crash fix
  • Loading branch information
lukeocodes committed Jul 11, 2024
2 parents fbf0bc4 + ef87b92 commit d450605
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ const App: () => JSX.Element = () => {
if (!connection) return;

const onData = (e: BlobEvent) => {
connection?.send(e.data);
// iOS SAFARI FIX:
// Prevent packetZero from being sent. If sent at size 0, the connection will close.
if (e.data.size > 0) {
connection?.send(e.data);
}
};

const onTranscript = (data: LiveTranscriptionEvent) => {
Expand Down

1 comment on commit d450605

@vercel
Copy link

@vercel vercel bot commented on d450605 Jul 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.