                     context("and has position higher or equal than minDvrSize") {
                         
                         it("triggers detectDVR with enabled true") {
-                            let plugin = buildPlugin(position: getMinDvrSize(), playbackType: .live)
+                            let plugin = buildPlugin(duration: getMinDvrSize(), playbackType: .live)
                             var didHaveDvr = false
+                            var expectedDuration: Double?
                             plugin.core?.activePlayback?.on(InternalEvent.detectDVR.rawValue) { (userInfo: EventUserInfo) in
                                 didHaveDvr = (userInfo?["dvrEnabled"] as? Bool) ?? false
+                                expectedDuration = userInfo?["duration"] as? Double
                             }
                             
                             plugin.core?.trigger(InternalEvent.didChangeActiveContainer.rawValue)
                             
                             expect(didHaveDvr).toEventually(beTrue())
+                            expect(expectedDuration).toEventually(equal(getMinDvrSize()))
                         }
                     }
                     
                     context("and has position less than minDvrSize") {
                         
                         it("triggers detectDVR with enabled false") {
-                            let plugin = buildPlugin(position: getMinDvrSize() - 10, playbackType: .live)
+                            let duration = getMinDvrSize() - 10
+                            let plugin = buildPlugin(duration: duration, playbackType: .live)
                             var didHaveDvr = true
+                            var expectedDuration: Double?
                             plugin.core?.activePlayback?.on(InternalEvent.detectDVR.rawValue) { (userInfo: EventUserInfo) in
                                 didHaveDvr = (userInfo?["dvrEnabled"] as? Bool) ?? false
+                                expectedDuration = userInfo?["duration"] as? Double
                             }
                             
                             plugin.core?.trigger(InternalEvent.didChangeActiveContainer.rawValue)
                             
                             expect(didHaveDvr).toEventually(beFalse())
+                            expect(expectedDuration).toEventually(equal(duration))
                         }
                     }
                 }

                    
                    context("and has position higher or equal than minDvrSize") {
                        it("triggers detectDVR with enabled true") {
                            let dvrPlugin = buildPlugin(position: getMinDvrSize(), playbackType: .live)
                            var didHaveDvr = false
                            dvrPlugin.core?.activePlayback?.on(InternalEvent.detectDVR.rawValue) { (userInfo: EventUserInfo) in
                                didHaveDvr = (userInfo?["dvrEnabled"] as? Bool) ?? false
                            }
                            
                            dvrPlugin.core?.activePlayback?.trigger(Event.bufferUpdate.rawValue)
                            
                            expect(didHaveDvr).toEventually(beTrue())
                        }
                    }
                    
                    context("and has position less than minDvrSize") {
                        it("triggers detectDVR with enabled false") {
                            let plugin = buildPlugin(position: getMinDvrSize() - 10, playbackType: .live)
                            var didHaveDvr = true
                            plugin.core?.activePlayback?.on(InternalEvent.detectDVR.rawValue) { (userInfo: EventUserInfo) in
                                didHaveDvr = (userInfo?["dvrEnabled"] as? Bool) ?? false
                            }
                            
                            plugin.core?.activePlayback?.trigger(Event.bufferUpdate.rawValue)
                            
                            expect(didHaveDvr).toEventually(beFalse())
                        }
                    }
                }

                return DVRPlugin().minDvrSize
            }
            
            func buildPlugin(duration seconds: Double, playbackType: PlaybackType) -> DVRPlugin {
                core = Core()
                container = Container()
                core.activeContainer = container
