height: 250px;
background: #FFAAAA;
}
+
+ #video {
+ position: absolute;
+ left:620px;
+ top: 260px;
+ width: 300px;
+ height: 175px;
+ background: #FFAAAA;
+ }
</style>
</head>
<body>
<div id="qunit-fixture"> </div>
<span id="player_1">This is a container for the player, auto-sized for testing purposes.</span>
+ <div >
+ <video id='video'
+ controls
+ width= '250px'
+ poster="../../test/poster.png">
+
+ <source id='mp4'
+ src="../../test/trailer.mp4"
+ type='video/mp4; codecs="avc1, mp4a"'>
+
+ <source id='ogv'
+ src="../../test/trailer.ogv"
+ type='video/ogg; codecs="theora, vorbis"'>
+
+ <p>Your user agent does not support the HTML5 Video element.</p>
+
+ </video>
+ </div>
</body>
</html>
player.pause();
});
-
player.play();
});
test( "Extension and Method Overriding", function () {
- var expects = 4,
+ var expects = 5,
count = 0,
player = Popcorn.baseplayer(),
playerForPopcorn = Popcorn.baseplayer(),
+ player2 = Popcorn("#video"),
popcorn;
function plus() {
popcorn = Popcorn( playerForPopcorn )
.exec( 2, function() {
+ ok( Math.abs(player2.currentTime() - playerForPopcorn.currentTime) < 0.2, "Time update is within a reasonable range" );
+ plus();
ok( true, "Exec triggereed from popcorn after 2 seconds" );
plus();
});
player.load();
+ player2.play();
player.play();
// Each player will define its own criteria for when readyState should be changed