Closed Gustl22 closed 11 months ago
Is it ok to merge? I added quite a lot commits since your review @spydon :)
If the AudioPlayer is in a stopped state, the seek function will never complete, and the TimeoutException will fire 30 seconds later. ([ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: TimeoutException after 0:00:30.000000: Future not completed)
Any code after the seek will not be executed. From the perspective of a user of the library, the application will hang 30 seconds before registering an unhandled exception.
Sample code:
var player = AudioPlayer();
await player.setSource(DeviceFileSource(SomeAudioFile));
await player.resume();
sleep(Duration(seconds:1));
await player.stop();
print('-SEEK-');
await player.seek(Duration(seconds:15)); // --- HANGS FOR DURATION OF TIMEOUT HERE
print('-SEEK FINISH-');
Description
Wait for seek to finish by listening to the
AudioEventType.seekComplete
event.Checklist
fix:
,feat:
,refactor:
,docs:
,chore:
,test:
,ci:
etc).///
, where necessary.Related Issues