Canardoux / flutter_sound

Flutter plugin for sound. Audio recorder and player.
Mozilla Public License 2.0
878 stars 574 forks source link

[BUG] Hosted Flutter Web app does not return audio length: #1114

Open Kurczaak opened 4 weeks ago

Kurczaak commented 4 weeks ago

Flutter Sound Version :


Severity


Platforms you faced the error


Describe the bug The plugin works fine in debug mode. When I deploy my app to web I am unable to get the length of an audio file. That's what I see in the web console:

main.dart.js:3437 Uncaught Error: MissingPluginException(No implementation found for method openPlayer on channel xyz.canardoux.flutter_sound_player)
    at Object.d (main.dart.js:3437:19)
    at main.dart.js:67180:15
    at aEz.a (main.dart.js:4820:63)
    at aEz.$2 (main.dart.js:37513:14)
    at aDA.$1 (main.dart.js:37507:21)
    at a2d.Kx (main.dart.js:38591:32)
    at axR.$0 (main.dart.js:37893:11)
    at Object.wM (main.dart.js:4931:40)
    at aa.q3 (main.dart.js:37827:3)
    at axK.$0 (main.dart.js:37863:13)

To Reproduce Steps to reproduce the behavior: try to run this piece of code on a web-hosted app:

await _audioPlayer.openPlayer();
    final duration = await _audioPlayer.startPlayer(
      fromURI: url,
    );

Logs!!!!

Since it happend only on a deployed version my only log is:

main.dart.js:3437 Uncaught Error: MissingPluginException(No implementation found for method openPlayer on channel xyz.canardoux.flutter_sound_player)
    at Object.d (main.dart.js:3437:19)
    at main.dart.js:67180:15
    at aEz.a (main.dart.js:4820:63)
    at aEz.$2 (main.dart.js:37513:14)
    at aDA.$1 (main.dart.js:37507:21)
    at a2d.Kx (main.dart.js:38591:32)
    at axR.$0 (main.dart.js:37893:11)
    at Object.wM (main.dart.js:4931:40)
    at aa.q3 (main.dart.js:37827:3)
    at axK.$0 (main.dart.js:37863:13)

Larpoux commented 4 weeks ago

@Kurczaak , please look to (#921) and tell us if this solves your issue. Note : someone should add this to the doc