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

tech