         playerItem = AVPlayerItem(asset: urlAsset!)
         player     = AVPlayer(playerItem: playerItem!)
         player!.addObserver(self, forKeyPath: "rate", options: NSKeyValueObservingOptions.new, context: nil)
-        
-        
-        
         playerLayer?.removeFromSuperlayer()
         playerLayer = AVPlayerLayer(player: player)
         playerLayer!.videoGravity = videoGravity
-        
         layer.addSublayer(playerLayer!)
-        
         setNeedsLayout()
         layoutIfNeeded()
     }

                    if let timeInterVarl    = self.availableDuration() {
                        let duration        = item.duration
                        let totalDuration   = CMTimeGetSeconds(duration)
                        delegate?.bmPlayer(player: self, loadedTimeDidChange: timeInterVarl, totalDuration: totalDuration)
                    }
                    
                case "playbackBufferEmpty":

    fileprivate var state = BMPlayerState.notSetURL {
        didSet {
            if state != oldValue {
              weak var _self = self
              delegate?.bmPlayer(player: _self, playerStateDidChange: state)
            }
        }
    }
