Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for disabling TTS Autoplay #169

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

rithviknishad
Copy link
Member

@rithviknishad rithviknishad commented Jan 11, 2024

Copy link

vercel bot commented Jan 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ayushma-fe ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2024 4:21pm

src/utils/misc.ts Outdated Show resolved Hide resolved
@skks1212
Copy link
Member

@rithviknishad
Build failing

<html>
<body>
<!--StartFragment-->
ReferenceError: navigator is not defined
--
20:29:03.978 | at a (/vercel/path0/build/server/chunks/293.js:1:12801)
20:29:03.978 | at v (/vercel/path0/build/server/chunks/293.js:1:5186)
20:29:03.978 | at nP (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:45321)
20:29:03.978 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61978)
20:29:03.978 | at nj (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64628)
20:29:03.978 | at nP (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:56390)
20:29:03.978 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61978)
20:29:03.978 | at nj (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64628)
20:29:03.978 | at nO (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64035)
20:29:03.978 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:62224)
20:29:03.979 |  
20:29:03.979 | Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
20:29:03.979 | ReferenceError: navigator is not defined
20:29:03.979 | at a (/vercel/path0/build/server/chunks/293.js:1:12801)
20:29:03.979 | at v (/vercel/path0/build/server/chunks/293.js:1:5186)
20:29:03.979 | at nP (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:45321)
20:29:03.979 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61978)
20:29:03.979 | at nj (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64628)
20:29:03.979 | at nP (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:56390)
20:29:03.979 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61978)
20:29:03.979 | at nj (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64628)
20:29:03.979 | at nO (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64035)
20:29:03.979 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:62224)
20:29:03.979 | ReferenceError: navigator is not defined
20:29:03.979 | at a (/vercel/path0/build/server/chunks/293.js:1:12801)
20:29:03.979 | at v (/vercel/path0/build/server/chunks/293.js:1:5186)
20:29:03.979 | at nP (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:45321)
20:29:03.979 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61978)
20:29:03.980 | at nj (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64628)
20:29:03.980 | at nP (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:56390)
20:29:03.980 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61978)
20:29:03.980 | at nj (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64628)
20:29:03.980 | at nO (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64035)
20:29:03.980 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:62224)
20:29:03.980 |  
20:29:03.980 | Error occurred prerendering page "/profile". Read more: https://nextjs.org/docs/messages/prerender-error
20:29:03.980 | ReferenceError: navigator is not defined
20:29:03.980 | at a (/vercel/path0/build/server/chunks/293.js:1:12801)
20:29:03.980 | at v (/vercel/path0/build/server/chunks/293.js:1:5186)
20:29:03.980 | at nP (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:45321)
20:29:03.980 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61978)
20:29:03.980 | at nj (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64628)
20:29:03.980 | at nP (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:56390)
20:29:03.980 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61978)
20:29:03.980 | at nj (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64628)
20:29:03.980 | at nO (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64035)
20:29:03.980 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:62224)

<!--EndFragment-->
</body>
</html>

@skks1212
Copy link
Member

<html>
<body>
<!--StartFragment-->
ReferenceError: navigator is not defined
--
21:20:18.959 | at a (/vercel/path0/build/server/chunks/293.js:1:12801)
21:20:18.959 | at v (/vercel/path0/build/server/chunks/293.js:1:5186)
21:20:18.960 | at nP (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:45321)
21:20:18.960 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61978)
21:20:18.960 | at nj (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64628)
21:20:18.960 | at nP (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:56390)
21:20:18.965 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61978)
21:20:18.966 | at nj (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64628)
21:20:18.966 | at nO (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64035)
21:20:18.966 | at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:62224)

<!--EndFragment-->
</body>
</html>

@rithviknishad is navigator being called server side? 🤔

@rithviknishad
Copy link
Member Author

I think so. I've no clue why it's being called in SSR even after it being wrapped inside a useEffect

@rithviknishad
Copy link
Member Author

weirdly, local builds are not reporting this

@rithviknishad
Copy link
Member Author

@skks1212 @Ashesh3 fixed :)

@skks1212 skks1212 merged commit bc63a9f into master Jan 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect Autoplay Audio Restriction on iPhones and Display Play Button
3 participants