ddurham2 commented on issue #324: URL: https://github.com/apache/cordova-plugin-media/issues/324#issuecomment-1355944569
v6.1.0 I too am getting no playback on iOS when streaming from the network a live stream. This stream I don't believe gives a content length and that may be part of the problem given what the [docs say](https://developer.apple.com/documentation/avfoundation/avplayer/1643482-automaticallywaitstominimizestal), but I'm not positive. For now, I'm having to patch the code thusly: ``` --- node_modules/cordova-plugin-media/src/ios/CDVSound.m.orig 2022-12-16 19:32:41.000000000 -0600 +++ node_modules/cordova-plugin-media/src/ios/CDVSound.m 2022-12-16 19:32:28.000000000 -0600 @@ -272,11 +272,7 @@ // Pass the AVPlayerItem to a new player avPlayer = [[AVPlayer alloc] initWithPlayerItem:playerItem]; - // Avoid excessive buffering so streaming media can play instantly on iOS - // Removes preplay delay on ios 10+, makes consistent with ios9 behaviour - if ([NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10,0,0}]) { - avPlayer.automaticallyWaitsToMinimizeStalling = NO; - } + avPlayer.automaticallyWaitsToMinimizeStalling = YES; } self.currMediaId = mediaId; ``` ... basically reverting [this change](https://github.com/apache/cordova-plugin-media/pull/149/files). Also, it doesn't wait 8-10 seconds in my case.. My guess is that the original complaint was hitting a source that was throttled to just the needed bandwidth, but didn't allow an initial burst of bandwidth to get the process started and buffers filled up. I'm thinking it needs to be an option, or more careful thought needs to be given to that change. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
