LMMediaPlayer icon indicating copy to clipboard operation
LMMediaPlayer copied to clipboard

Player fails to replay file from a web URL

Open shumaisjs opened this issue 8 years ago • 2 comments

I have LMMediaPlayer added to a subview in my app.

The player only has one URL of a video file hosted on a webserver.

When I tap play, the player starts playing the file and eventually ends with a black screen. Now when I tap play again, one of the following things can happen:

  • It takes a little time and then starts replaying the video.
  • It briefly flashes the start of the video and goes back to black screen, the slider stays the end. If I tap play again, then the slider shows that the video is playing but the screen remains black.

There is no Audio in the video files so I can not comment on whether I am getting audio during these scenarios or not.

I have this behavior on iOS 9.02 and the latest iOS, I have not checked on older versions of iOS, I also get this message in Xcode whenever the file does not replay: unable to load asset current status: 3 error: (null)

shumaisjs avatar Feb 03 '16 05:02 shumaisjs

Thank you for your report and sorry to late reply.

It takes a little time and then starts replaying the video.

I think this issue is caused by AVPlayer from AVFoundation. LMMediaPlayer does not cache any data, so AVPlayer will get video data again and it takes little time.

It briefly flashes the start of the video and goes back to black screen, the slider stays the end. If I tap play again, then the slider shows that the video is playing but the screen remains black.

This issue may be caused by LMMediaPlayer. I'll check my code.

0x0c avatar Feb 16 '16 05:02 0x0c

Hi, any luck fixing this issue? Upon further investigation, I see following details on the error:

NSLocalizedDescription = "Cannot Complete Action"; NSLocalizedRecoverySuggestion = "Try again later."; NSURL = "url I am downloading from"; NSUnderlyingError = "Error Domain=NSOSStatusErrorDomain Code=-12178 "The operation couldn\U2019t be completed. (OSStatus error -12178.)"";

pathikb avatar Aug 01 '16 21:08 pathikb