 import UIKit
 import Foundation
 import AVFoundation
+import AVKit
 import CoreGraphics
 
 // MARK: - types

internal class PlayerView: UIView {

    // MARK: - properties
    
    override class var layerClass: AnyClass {
        get {
            return AVPlayerLayer.self
        }
    }

    var playerLayer: AVPlayerLayer {
        get {
            return self.layer as! AVPlayerLayer

                if let status = change?[NSKeyValueChangeKey.newKey] as? NSNumber {
                    switch status.intValue as AVPlayerStatus.RawValue {
                    case AVPlayerStatus.readyToPlay.rawValue:
                        self._playerView.player = self._avplayer
                        self._playerView.playerIsHidden = false
                    case AVPlayerStatus.failed.rawValue:
                        self.playbackState = PlaybackState.failed
                    default:
