mpmovieplayercontroller
An AVPlayerItem cannot be associated with more than one instance of AVPlayer in iOS 8.4
The solution is: Don’t use MPMoviePlayerController, sorry. Refactor to use AVPlayerViewController instead. This is a more modern API; the one you are using has been deprecated so it is not shocking that it has a strange mysterious crash on a newer version of iOS.
Playing a video file from a server in Swift
UPDATE 2019, Swift 4: MPMovieControlStyle’ was deprecated in iOS 9.0: Use AVPlayerViewController in AVKit. So, following the advice, let’s change it. Original answer from 2016 is below. import UIKit import AVKit import AVFoundation class ViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) let url = URL(string: “https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4”)! playVideo(url: url) } func playVideo(url: URL) … Read more
How to receive NSNotifications from UIWebView embedded YouTube video playback
There are no documented notifications sent by the UIWebView embedded movie player. In fact, the closed implementation used within the UIWebView does differ from the public MPMoviePlayerController in many aspects (e.g. DRM). The most important classes used for playing video content within that UIWebView are called MPAVController and UIMoviePlayerController. The latter one makes the player … Read more
AVPlayer and MPMoviePlayerController differences [closed]
NOTE as of iOS9, Apple has deprecated the MPMoviePlayerController: The MPMoviePlayerController class is formally deprecated in iOS 9. (The MPMoviePlayerViewController class is also formally deprecated.) To play video content in iOS 9 and later, instead use the AVPictureInPictureController or AVPlayerViewController class from the AVKit framework, or the WKWebView class from WebKit. Copied from the MPMoviePlayerController … Read more
Play YouTube videos with MPMoviePlayerController instead of UIWebView
The only way to have a youtube video play inside your own app is to create a UIWebView with the embed tag from Youtube for the movie you want to play as the UIWebView’s content. UIWebView will detect that the embedded object is a Youtube link, and the web view’s content will be the youtube … Read more