YasKuraishi / YKMediaPlayerKit

Painlessly and natively play YouTube, Vimeo, and .MP4, .MOV, .MPV, .3GP videos and fetch thumbnails on your iOS devices.
MIT License
348 stars 54 forks source link

Does this library work on iPads? #10

Open pawelkata opened 9 years ago

pawelkata commented 9 years ago

I successfully integrated this library into the iPhone part of my universal project, but same code gives me trouble when run on an iPad, e.g. after this debug log:

Warning: Attempt to present <MPMoviePlayerViewController: 0x7b77e180>  on <UINavigationController: 0x7b76e290> which is already presenting <UINavigationController: 0x81614b60>

my app crashes, whereas this doesn't occur on the iPhone, and the video (a regular mp4 on my own server) plays well.

Here's my implementation:

NSURL *videoURL = [NSURL URLWithString:lesson.location];
YKDirectVideo *directVideo = [[YKDirectVideo alloc] initWithContent:videoURL];
[directVideo play:YKQualityHigh];

Also, demo project has troubles on iPads, e.g. video doesn't show at all in the simulator, producing console logs:

<Error>: CGImageCreate: invalid image size: 0 x 0.

Can you help?