             return false
         }
         return true
+    }
+
+    fileprivate func playerItemFailedToPlay(_ notification : Notification) {
+        let error = notification.userInfo?[AVPlayerItemFailedToPlayToEndTimeErrorKey] as? Error
     }
     
     fileprivate func scheduleNotification() {

        // Add observers for metadata and item status, respectively.
        playerItem?.addObserver(self, forKeyPath: observedValue, options: NSKeyValueObservingOptions.new, context: nil)
        playerItem?.addObserver(self, forKeyPath: #keyPath(AVPlayerItem.status), options: [.old, .new], context: nil)

        // Update metadata.
        update()

                // Player item is not yet ready.
            }
        }

        if keyPath == #keyPath(AVPlayerItem.isPlaybackLikelyToKeepUp) {
            // Preloaded enough that it should play smoothly.
            // If going to play at this point, check not curently .paused status
        }

        if keyPath == #keyPath(AVPlayerItem.isPlaybackBufferEmpty) {
            // Playback likely to stall or end.
        }
    }
    
    deinit {
