audioplayers icon indicating copy to clipboard operation
audioplayers copied to clipboard

Click to play on the simulator of ios 10.3 will be directly stuck

Open hrongyong opened this issue 4 years ago • 5 comments

2020-05-26 16:28:39.028 Runner[2347:13156] iOS => call play, playerId 217b8817-5b8b-419b-a150-83213d8b5d7b 2020-05-26 16:28:39.030 Runner[2347:13156] play! 2020-05-26 16:28:39.032 Runner[2347:13156] isLocal: 0 0 2020-05-26 16:28:39.032 Runner[2347:13156] volume: 1.000000 1 2020-05-26 16:28:39.033 Runner[2347:13156] position: 0 (null) 2020-05-26 16:28:39.033 Runner[2347:13156] setUrl https://************/700157a99f2641feb5d4ce563eb9d34e?e=1590485309&token=QwB8w8h3rbGI2YZMFvFX0PRIK1jrzKrnImWyMWU2:WleIHGnACZv4HByx8-nPYJp_FVo= 2020-05-26 16:28:39.046 Runner[2347:13156] iOS => call seek, playerId 217b8817-5b8b-419b-a150-83213d8b5d7b 2020-05-26 16:28:39.052 Runner[2347:13156] seek 2020-05-26 16:28:39.053 Runner[2347:13156] Seeking to: 380000 milliseconds 2020-05-26 16:28:39.099 Runner[2347:13156] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'AVPlayerItem cannot service a seek request with a completion handler until its status is AVPlayerItemStatusReadyToPlay.' *** First throw call stack: ( 0 CoreFoundation 0x00000001050eab0b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010c09c141 objc_exception_throw + 48 2 AVFoundation 0x0000000104170855 -[AVPlayerItem seekToTime:toleranceBefore:toleranceAfter:completionHandler:] + 1557 3 AVFoundation 0x0000000104170237 -[AVPlayerItem seekToTime:completionHandler:] + 146 4 audioplayers 0x00000001093e8c8f -[AudioplayersPlugin seek:time:] + 367 5 audioplayers 0x00000001093e3f59 __46-[AudioplayersPlugin handleMethodCall:result:]_block_invoke_4 + 441 6 audioplayers 0x00000001093e2893 -[AudioplayersPlugin handleMethodCall:result:] + 4323 7 Flutter 0x0000000105e80b1f __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 104 8 Flutter 0x0000000105e0f762 _ZNK7flutter21PlatformMessageRouter21HandlePlatformMessageEN3fml6RefPtrINS_15PlatformMessageEEE + 166 9 Flutter 0x0000000105e138ba _ZN7flutter15PlatformViewIOS21HandlePlatformMessageEN3fml6RefPtrINS_15PlatformMessageEEE + 38 10 Flutter 0x0000000105e7a7fb _ZNSt3__110__function6__funcIZN7flutter5Shell29OnEngineHandlePlatformMessageEN3fml6RefPtrINS2_15PlatformMessageEEEE4$_32NS_9allocatorIS8_EEFvvEEclEv + 57 11 Flutter 0x0000000105e243a7 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 117 12 Flutter 0x0000000105e292f4 ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0 + 26 13 CoreFoundation 0x000000010507e454 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20 14 CoreFoundation 0x000000010507e0e3 __CFRunLoopDoTimer + 1011 15 CoreFoundation 0x000000010507dcaa __CFRunLoopDoTimers + 266 16 CoreFoundation 0x00000001050759ec __CFRunLoopRun + 1916 17 CoreFoundation 0x0000000105075016 CFRunLoopRunSpecific + 406 18 GraphicsServices 0x000000010e5a3a24 GSEventRunModal + 62 19 UIKit 0x0000000109b59134 UIApplicationMain + 159 20 Runner 0x0000000102e77bcb main + 75 21 libdyld.dylib 0x000000010dbd265d start + 1 22 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

hrongyong avatar Jun 03 '20 02:06 hrongyong

I want to ask what is the minimum version of ios supported by audioplayers?

hrongyong avatar Jun 03 '20 02:06 hrongyong

Same here. I have lots of crashes in production because of it

alectogeek avatar Jun 12 '20 17:06 alectogeek

Same problem on iPhone 7 10.3.1 Simulator. Cannot call seek. Really need this fixed or @hrongyongs question answered. Works fine on iPhone 11 Pro Max 13.3 Simulator.

iOS => call play, playerId test play! isLocal: 0 0 volume: 1.000000 1 position: 0 (null) setUrl https://www.myurl.com/my_mp3.mp3 iOS => call seek, playerId test seek Seeking to: 48874000 milliseconds *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'AVPlayerItem cannot service a seek request with a completion handler until its status is AVPlayerItemStatusReadyToPlay.'

Possible solution? I know nothing about IOS development or AVplayer. https://stackoverflow.com/questions/38332162/avplayer-seek-right-after-it-starts-to-play

jefflyne avatar Jul 27 '20 01:07 jefflyne

@luanpotter do we have a min version for iOS?

erickzanardo avatar Apr 13 '21 14:04 erickzanardo

@hrongyong @jefflyne Can you check, is this still a thing with 1.x.x? Thx :) I cannot test for ios, unfortunately. Also it would be nice to have an example repo, to reproduce...

Gustl22 avatar Sep 03 '22 10:09 Gustl22

Closing as stale.

Gustl22 avatar Nov 03 '22 08:11 Gustl22