     open func hasPlugin(_ pluginClass: AnyClass) -> Bool {
         return plugins.filter({$0.isKind(of: pluginClass)}).count > 0
     }
-
+    
     fileprivate func bindEventListeners() {
         guard let playback = playback else {
             return
         }
-
+        
         for (event, callback) in eventBindings() {
             listenTo(playback, eventName: event.rawValue, callback: callback)
         }
     }
-
+    
     fileprivate func eventBindings() -> [Event : EventCallback] {
         return [
             .didComplete          : { [weak self] (info: EventUserInfo) in self?.trigger(.ended)} as EventCallback,

        
        let playbackFactory = PlaybackFactory(loader: loader, options: playbackOptions)
        
        playback?.removeFromSuperview()
        playback = playbackFactory.createPlayback()
        renderPlayback()
        trigger(ContainerEvent.sourceChanged)
    }
    
    open override func render() {
        plugins.forEach(renderPlugin)
        renderPlayback()
    }

    fileprivate func renderPlayback() {
        guard let playback = playback else {
            return
        }

        addSubviewMatchingConstraints(playback)
        playback.render()
        sendSubview(toBack: playback)

            trigger(eventToTrigger)
        }
    }
    
    open internal(set) var playback: Playback?
    
    public init(loader: Loader = Loader(), options: Options = [:]) {
        Logger.logDebug("loading with \(options)", scope: "\(type(of: self))")
        self.options = options
