Open Fraa-124 opened 3 years ago
Please can anyone help. The app keeps crashing after allowing permission. I have been testing with Chrome browser on desktop - [WEB]
@Fraa-124 Any luck getting this to work
Are you sure to have included the following lines in the header of your index.html ?
<script src="https://cdn.jsdelivr.net/npm/tau_sound_core@8/js/flutter_sound/flutter_sound.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/tau_sound_core@8/js/flutter_sound/flutter_sound_player.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/tau_sound_core@8/js/flutter_sound/flutter_sound_recorder.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/howler@2/dist/howler.min.js"></script>
Your bug arrives when Javascript do not find the Flutter Sound code
I am currently working on Flutter Sound V9. I hope to improve Flutter Sound on web. I really want that Flutter Sound on Web to be as good as the iOS/Android version.
For example :
Yes, I have these added those.
Can you look to the Console tab of the Developer Tools on Chrome ?
Actually I get same error than you because :
Access to XMLHttpRequest at 'https://tau.canardoux.xyz/web_example/assets/extract/02-opus.webm' from origin
'http://localhost:52829' has been blocked by CORS policy:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
The CORS policy is very painful !!!
Could it be CORS? This issue happened with the recorder. I am not trying to play the audio or anything like that.
No. If I understand correctly, CORS is a protection when we want to access an asset in another domain.
The recorder is supposed to record to a memory temporary URL. So, your problem is not CORS.
Actually, it seems that I have myself problems with the demo examples. I will post you something when I will have understood what is happening.
Thanks @Larpoux Please let me know if you find anything
I need the log that you get in the Console tab of your Developer Tools of Chrome.
OK @koyinusa , The demo example works fine on my machine, now. IT is black magic.
Please send the Chrome logs that you get in the Console tab.
This issue is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days.
Flutter Sound Version : master branch
flutter pub deps | grep flutter_sound
|-- flutter_sound 8.1.4 | |-- flutter_sound_platform_interface 8.1.4 | |-- flutter_sound_web 8.1.4 | | |-- flutter_sound_platform_interface...Severity
Crash
Platforms you faced the error
Flutter web, chrome on MacOS
Describe the bug When I go to 'Simple recorder' to test the mic, an error araise, and when I click 'Record', a popup is shown asking for permissions to use the mic, when I click Allow, the chrome instance closes
To Reproduce Steps to reproduce the behavior:
App crash
Logs!!!!
flutter_sound_player_web.dart:218 Uncaught (in promise) TypeError: dart.global.newPlayerInstance is not a function at flutter_sound_player_web.FlutterSoundPlayerWeb.new.openPlayer (flutter_sound_player_web.dart:218) at openPlayer.next ()
at runBody (async_patch.dart:84)
at Object._async [as async] (async_patch.dart:123)
at flutter_sound_player_web.FlutterSoundPlayerWeb.new.openPlayer (flutter_sound_player_web.dart:205)
at flutter_sound_player.FlutterSoundPlayer.new._openAudioSession (flutter_sound_player.dart:664)
at _openAudioSession.next ()
at async_patch.dart:45
at _RootZone.runUnary (zone.dart:1613)
at _FutureListener.thenAwait.handleValue (future_impl.dart:155)
at handleValueCallback (future_impl.dart:707)
at Function._propagateToListeners (future_impl.dart:736)
at async._AsyncCallbackEntry.new.callback (future_impl.dart:406)
at Object._microtaskLoop (schedule_microtask.dart:40)
at _startMicrotaskLoop (schedule_microtask.dart:49)
at async_patch.dart:166