bartonhammond / bartonhammond/voiceClient
Prevent navigation while audio is playing or stop the audio first
- Dominant language
- Dart
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
To reproduce - click into story and start the audio. While the audio is playing, hit the back button.
```
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Bad state: Cannot add new events after calling close
#0 _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:251:24)
#1 AudioPlayer._doHandlePlatformCall
package:audioplayers/audioplayers.dart:575
#2 AudioPlayer.platformCallHandler
package:audioplayers/audioplayers.dart:538
#3 MethodChannel._handleAsMethodCall
package:flutter/…/services/platform_channel.dart:409
#4 MethodChannel.setMethodCallHandler.
package:flutter/…/services/platform_channel.dart:377
#5 _DefaultBinaryMessenger.handlePlatformMessage
package:flutter/…/services/binding.dart:199
#6 _invoke3. (dart:ui/hooks.dart:290:15)
#7 _rootRun (dart:async/zone.dart:1184:13)
#8 _CustomZone.run (dart:async/zone.dart:1077:19)
#9 _CustomZone.runGuarded (dart:async/zone.dart:979:7)
#10 _invoke3 (dart:ui/hooks.dart:289:10)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the story-audio and back-button sequence, then trace the navigation and audio lifecycle around the audioplayers.dart stack frames shown in the report. Done means backing out while audio plays no longer raises the closed-stream exception, with either navigation prevented or audio stopped first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100