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

Not Supported on iOS Safari #30

Open
harrymelka opened this issue Nov 16, 2020 · 11 comments
Open

Not Supported on iOS Safari #30

harrymelka opened this issue Nov 16, 2020 · 11 comments

Comments

@harrymelka
Copy link

Hello,

I already put it in the #21 issues but nobody could give me an answer so I made a new issue.

I tried multiple things with mic-recorder lib in my React project but I have an issue with the safari browser on iOS (same on ios chrome). When I click on the record button with

startRecording = () => {
    // Start recording. Browser will request permission to use your microphone.
    window.AudioContext = window.AudioContext || window.webkitAudioContext;
  if (window.AudioContext) {
    window.audioContext = new window.AudioContext();
  }
    this.setState({
      isRecording: true,
    });
    recorder
      .start()
      .then(() => {
        // something else
      })
      .catch(e => {
        console.error(e);
      });
  };

When trying the example from https://jsfiddle.net/8u5fbpx6/1/ it works on ios.

Because I am not using it exactly like the example in my REACT code, it doesn't display the popup that should ask me if I want to accept that safari is going to use the microphone.

If someone have any idea with that

Thank you

@buzinas
Copy link
Contributor

buzinas commented Nov 16, 2020

Please share your code in a Github repo or use Code Sandbox for showing an example. I can't reproduce your issue.

@harrymelka
Copy link
Author

Hey,

So I made a code sandbox with it, a bit different from what I have in my code with all the reducers, actions and everything.

https://codesandbox.io/s/mistermlk-54guf?file=/src/App.js

Weird stuff happen... it's working on codesanbox but still not on mine 😭

You can find the real file on OriginalPostButton.js

It's really weird.

Thank you.

@harrymelka
Copy link
Author

Hey again,

I recreated another project, with the issue. You will see that it's not working with ios safari but it works with mac safari.
test-voice.zip

Thank you again

@tyherox
Copy link

tyherox commented Nov 29, 2020

Can confirm this problem

It's strange because the js-fiddle demo above works on my iPhone as well but does not work on my project. Will investigate and come back if I find anything :)

@tyherox
Copy link

tyherox commented Nov 29, 2020

Hey guys, it's a pretty quick fix and it's not the libraries fault.

Basically, Safari requires your url to be https to use the microphone. I fixed the problem by using ngrok to tunnel and used the given https url to test the functionality.

Hope this helps!

@harrymelka
Copy link
Author

Thank you @tyherox. I will try this with my AWS config

@guptamanish07
Copy link

Hey guys, it's a pretty quick fix and it's not the libraries fault.

Basically, Safari requires your url to be https to use the microphone. I fixed the problem by using ngrok to tunnel and used the given https url to test the functionality.

Hope this helps!

Hi @therox the link mention is not working can you please share again. Thank you

@guptamanish07
Copy link

guptamanish07 commented Oct 10, 2021

This issue is still exit for ios device , please can someone share the what configuration is required

@tyherox
Copy link

tyherox commented Oct 11, 2021

Use this to use your localhost through a tunnel.

Should be pretty simple and straightforward but let me know if you need help!

@guptamanish07
Copy link

Use this to use your localhost through a tunnel.

Should be pretty simple and straightforward but let me know if you need help!

Do you have any sample project with ngrok , which solve ios ?

@vinikatyal
Copy link

Anyone has a sample example for ios safari?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants