T1244 #299

Open
wants to merge 4 commits into
from

Conversation

Projects
None yet
3 participants
@ScottDowne
Contributor

ScottDowne commented Feb 27, 2013

No description provided.

@@ -260,6 +263,12 @@
// XXX: cued doesn't seem to fire reliably, bug in youtube api?
break;
}
+
+ if (event.data !== YT.PlayerState.BUFFERING && playerState === YT.PlayerState.BUFFERING) {

This comment has been minimized.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

This comment has been minimized.

@mjschranz

mjschranz Feb 27, 2013

Contributor

I'd also consider breaking this onto two lines.

  if ( event.data !== YT.PlayerState.BUFFERING &&
       playerState === YT.PlayerState.BUFFERING ) {
    .....
  }
@mjschranz

mjschranz Feb 27, 2013

Contributor

I'd also consider breaking this onto two lines.

  if ( event.data !== YT.PlayerState.BUFFERING &&
       playerState === YT.PlayerState.BUFFERING ) {
    .....
  }
@@ -195,6 +194,10 @@
// fake ready event
firstPlay = false;
+ addMediaReadyCallback( function() {

This comment has been minimized.

@mjschranz

mjschranz Feb 27, 2013

Contributor

addMediaReadyCallback(function() {

@mjschranz

mjschranz Feb 27, 2013

Contributor

addMediaReadyCallback(function() {

+
+ onProgress();
+
+ if (fraction >= 1) {

This comment has been minimized.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

+ get: function () {
+ var timeRanges = {
+ start: function( index ) {
+ if (index === 0) {

This comment has been minimized.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

+ },
+ end: function( index ) {
+ var duration;
+ if (index === 0) {

This comment has been minimized.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

+ var duration;
+ if (index === 0) {
+ duration = getDuration();
+ if (!duration) {

This comment has been minimized.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

+ buffered = video.buffered;
+
+ video.addEventListener( "progress", function onProgress() {
+ var end = buffered.end(0);

This comment has been minimized.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

+
+ video.addEventListener( "progress", function onProgress() {
+ var end = buffered.end(0);
+ equal( buffered.start(0), 0, "video.buffered range start is always 0" );

This comment has been minimized.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing

+ video.src = testData.videoSrc + "&autoplay=1&loop=1";
+ ok( buffered && typeof buffered === "object", "video.buffered exists" );
+ equal( buffered.length, 1, "video.buffered.length === 1" );
+ equal( buffered.start(0), 0, "video.buffered range start is always 0" );

This comment has been minimized.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

+ ok( buffered && typeof buffered === "object", "video.buffered exists" );
+ equal( buffered.length, 1, "video.buffered.length === 1" );
+ equal( buffered.start(0), 0, "video.buffered range start is always 0" );
+ equal( buffered.end(0), 0, "video.buffered range end is 0" );

This comment has been minimized.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

+ equal( buffered.start(0), 0, "video.buffered range start is always 0" );
+ equal( buffered.end(0), 0, "video.buffered range end is 0" );
+ try {
+ buffered.start(1);

This comment has been minimized.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

+ try {
+ buffered.start(1);
+ ok( false, "selecting a time range > 0 should throw an error" );
+ } catch (e) {

This comment has been minimized.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

@mjschranz

mjschranz Feb 27, 2013

Contributor

Spacing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment