mobileplayer-ios
mobileplayer-ios copied to clipboard
'MPMoviePlayerViewController is no longer available. Use AVPlayerViewController in AVKit.'
I'm using Xcode 11 and build to device iPhone X (iOS 13). The log is: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'MPMoviePlayerViewController is no longer available. Use AVPlayerViewController in AVKit.' *** First throw call stack: ( 0 CoreFoundation 0x00007fff23b98bde __exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff503b5b20 objc_exception_throw + 48 2 CoreFoundation 0x00007fff23b98a1c +[NSException raise:format:] + 188 3 MediaPlayer 0x00007fff276f18d5 -[MPMoviePlayerViewController initWithContentURL:] + 94
same problem here crash
@mouness2020 @PhuocLinh any ideas for a fix?
Since I had to use this Framework I migrated it to use a custom view with AVPlayerLayer as the backing layer. Instead of subclassing MPMoviePlayerViewController, it now subclasses a standard UIViewController and works as expected.
Until there is an official revision, you can give it a look here
@PhuocLinh @mouness2020 @nwkeeley
Thats great thank you very much @ferhatabd
Hey @ferhatabd I'm using your version, maybe it's just me but creating the MobilePlayerViewController doesn't allow me anymore to use contentURL as a parameter, is there any fixes to that?
Hi @SerxhioGugo,
Since the MPMoviePlayerViewController is not there anymore, its initializer is unavailable too.
That's why what I did was to init thew MobileViewController with the convenience init, and then set all the config parameters with the setConfig method instead. Here is how I'm using it.
can you share how you use it again? Thanks
can you share how you use it again? Thanks
Hi @KwesiCobbina The sample ViewController is here I updated the link, I hope it helps.
Thanks
On Sat, 15 Aug 2020 at 6:57 AM, Ferhat Abdullahoglu < [email protected]> wrote:
can you share how you use it again? Thanks
Hi @KwesiCobbina https://github.com/KwesiCobbina
The sample ViewController is here https://github.com/ferhatabd/MobilePlayer/blob/bd3c197db56ad85c3c57706e9a551b3f3396f299/Sources/MobilePlayer/Example/ExampleVC.swift
I updated the link, I hope it helps.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sahin/mobileplayer-ios/issues/207#issuecomment-674359487, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANBUELQZQZK52GYKEKSTJWDSAYWXFANCNFSM4I5LSPNA .
It helped a lot. But the controls don’t show any more. It that intentional?
On Sat, 15 Aug 2020 at 6:59 AM, Kewsi Cobbina [email protected] wrote:
Thanks
On Sat, 15 Aug 2020 at 6:57 AM, Ferhat Abdullahoglu < [email protected]> wrote:
can you share how you use it again? Thanks
Hi @KwesiCobbina https://github.com/KwesiCobbina
The sample ViewController is here https://github.com/ferhatabd/MobilePlayer/blob/bd3c197db56ad85c3c57706e9a551b3f3396f299/Sources/MobilePlayer/Example/ExampleVC.swift
I updated the link, I hope it helps.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sahin/mobileplayer-ios/issues/207#issuecomment-674359487, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANBUELQZQZK52GYKEKSTJWDSAYWXFANCNFSM4I5LSPNA .