From: Christopher De Cairos Date: Tue, 31 May 2011 21:22:57 +0000 (-0400) Subject: dried out code, removed baseplayerfrom tests, uses empty audio element instead. X-Git-Tag: v0.7^2~55^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=refs%2Fheads%2Ft481;p=popcorn-js.git dried out code, removed baseplayerfrom tests, uses empty audio element instead. --- diff --git a/popcorn.js b/popcorn.js index 4661b1e..5198e7c 100644 --- a/popcorn.js +++ b/popcorn.js @@ -851,8 +851,7 @@ } if ( !( "end" in options ) ) { - var duration = this.duration(); - options.end = duration ? duration : Number.MAX_VALUE; + options.end = this.duration() || Number.MAX_VALUE; } // If a _setup was declared, then call it before diff --git a/test/index.html b/test/index.html index 6fc9947..3dde4c0 100644 --- a/test/index.html +++ b/test/index.html @@ -15,7 +15,6 @@ - diff --git a/test/popcorn.unit.js b/test/popcorn.unit.js index e6a5fda..f36aedd 100644 --- a/test/popcorn.unit.js +++ b/test/popcorn.unit.js @@ -1514,7 +1514,7 @@ test("Defaulting Empty End Values", function() { } }); - var popped = Popcorn( Popcorn.baseplayer() ) + var popped = Popcorn( document.createElement( "audio" ) ) .play() .testdefault({ start: 0, // seconds @@ -1522,7 +1522,7 @@ test("Defaulting Empty End Values", function() { mediaid: "13607892" }); - var popped2 = Popcorn(document.createElement("video")) + var popped2 = Popcorn( document.createElement( "video" ) ) .play() .testdefault({ start: 0, // seconds