question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG]:Record audio is not working in web.

See original GitHub issue

Flutter Sound Version :

flutter_sound: ^8.1.9

Severity

  • NoSuchMethodError: tried to call a non-function, such as null: ‘dart.global.newRecorderInstance’

Platforms you faced the error

  • Flutter Web

Describe the bug when I call openAudioSession then i get this error.

openAudioSession(
        focus: AudioFocus.requestFocusAndDuckOthers,
        category: SessionCategory.record,
      )

To Reproduce Steps to reproduce the behavior:

StreamController<Food> recordingDataController = StreamController<Food>();

 await recorder.openAudioSession(
        focus: AudioFocus.requestFocusAndDuckOthers,
        category: SessionCategory.record,
      );
      await recorder.startRecorder(
        codec: Codec.pcm16,
        numChannels: 1,
        sampleRate: 48000,
        toStream: recordingDataController.sink,
      );

Logs!!!

FS:—> openAudioSession —> openAudioSession Resetting flutter_sound Recorder Plugin —> resetPlugin <— resetPlugin NoSuchMethodError: tried to call a non-function, such as null: ‘dart.global.newRecorderInstance’


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:38 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Larpouxcommented, Jul 15, 2021

Did you include the javascript files into your xxx.html file ?

Look to this or this

1reaction
TonyTNguyencommented, Aug 1, 2021

For those with error dart.global.newPlayerInstance or dart.global.newRecorderInstance is not a function, after you include 4 extra lines in header of index.html, you need to do a hard reload web page (Chrome: F12, right click on refresh button). That is what happened to me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

If you can't record audio on a Mac using macOS Mojave or later
Quit the app you're using to record audio. · Choose Apple menu > System Settings, then click Privacy & Security. · Click Microphone....
Read more >
8 Common problems when recording audio and how to fix them
Recording audio for your videos may not be as simple as it sounds. Find out what the most common problems are and how...
Read more >
How to Fix Microphone Not Recording Voice in Windows 10
In this video I am going to show How to Fix a Microphone Not Working on Windows 10 or 5 Solutions to Fix...
Read more >
BigBlueButton - Audio/Video Issues - Canvas
If enable recordings was not checked when creating a conference you can click the gear icon to the right of the conference and...
Read more >
Audio/video recording issues - VoiceThread
Any microphone or camera should work in VoiceThread, but there are some things that might result in audio or video recording difficulties.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found