Posts

Post not yet marked as solved
1 Replies
1.4k Views
Our team have an app to play back m4a resources online using the avplayer. Recently, there are some users complaining the playback is keep failing and we have no idea the reason behind this.We checked the user log and the avplayer error log are as follow (for multiple failed instance):- avPlayer.currentItem.error = Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-16155), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x280e6ef10 {Error Domain=NSOSStatusErrorDomain Code=-16155 "(null)"}}- avPlayer.currentItem.error = Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (606068440), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x280e9f8d0 {Error Domain=NSOSStatusErrorDomain Code=606068440 "(null)"}}- avPlayer.currentItem.error = Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (1705376704), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x281ec60d0 {Error Domain=NSOSStatusErrorDomain Code=1705376704 "(null)"}}The normal flow for us to start playing: (Work as expected for majority of user)1. [[AVAudioSession sharedInstance] setActive:YES error:&activationError];2. call [avplayer play]3. the audio started to play successfullyFailed scenario: (For some users, this scenario keeps happening)1. The activation error returns Error Domain=NSOSStatusErrorDomain Code=2003329396 "(null)"2. We logged the [AVAudioSession sharedInstance].category becomes empty3. The mediaServicesWereReset notification is received4. the avplayer failed to play and the one of the above avplayer item error is observedWhen the user failed once, he cannot play any audio resources in our app and the scenario is keep repeating.We would like to know:1. Why would this occur on certain user devices? 2. How to prevent the problem occurs?3. Is there a way to recover from the lost mediaService? so that even if the error occurs once, the user can still play other resources in our app.We cannot produce the fail scenario by ourselves even we tried the Reset Media Services in developer menu, the behaviour is not exactly the same. Look forward to any help from the community and thanks.
Posted
by sschk.
Last updated
.
Post not yet marked as solved
0 Replies
890 Views
My app has a .m3u8 live stream and I would like to use avassetresourceloader to control the https connection as ssl pinning is required for my app. As the stream is protected with signed cookie function by aws, I cannot find the way to set the cookie to the avplayer at the shouldWaitForLoadingOfRequestedResource callback, and the request to the .ts file keep returns 401.Another problem is that when i tried a stream without cookie restriction, the playback is success on iOS 12 only. For iOS 11 or lower, the avplayer returns -12884 "CoreMediaErrorDomain" "Playlist File not received".Is there any way to solve this/other method to do ssl pinning with avplayer playing m3u8 livestream? Thank you
Posted
by sschk.
Last updated
.