STMURLAsset is a subclass of
AVURLAsset that can cache data downloaded by
Just use it like
let url = URL(string: "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")! let asset = STMURLAsset(url: url) asset.preloadAsynchronously() let playerItem = AVPlayerItem(asset: asset) let player = AVPlayer(playerItem: playerItem) let playerView = PlayerView() playerView.playerLayer.player = player
Add the following line to your Podfile:
STMURLAsset is available under the MIT license. See the LICENSE file for more info.
|Last commit: 5 weeks ago|