Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Commit

Permalink
Merge pull request #90 from bclwhitaker/bugfix/bufferPlaying
Browse files Browse the repository at this point in the history
Fire playing on buffer full only when we are not pending a pause.
  • Loading branch information
dmlap committed May 23, 2014
2 parents 31d78a8 + 86c8b93 commit 8a98910
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/com/videojs/providers/HTTPVideoProvider.as
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ package com.videojs.providers{
_ns.resume();
_isPaused = false;
_model.broadcastEventExternally(ExternalEventName.ON_RESUME);
_model.broadcastEventExternally(ExternalEventName.ON_START);
if (!_isBuffering) {
_model.broadcastEventExternally(ExternalEventName.ON_START);
}
_model.broadcastEvent(new VideoPlaybackEvent(VideoPlaybackEvent.ON_STREAM_START, {}));
}
}
Expand All @@ -306,7 +308,9 @@ package com.videojs.providers{
_ns.resume();
_isPaused = false;
_model.broadcastEventExternally(ExternalEventName.ON_RESUME);
_model.broadcastEventExternally(ExternalEventName.ON_START);
if (!_isBuffering) {
_model.broadcastEventExternally(ExternalEventName.ON_START);
}
}
}

Expand Down Expand Up @@ -520,17 +524,18 @@ package com.videojs.providers{
break;

case "NetStream.Buffer.Full":
_pausedSeekValue = -1;
_isBuffering = false;
_isPlaying = true;
_model.broadcastEventExternally(ExternalEventName.ON_BUFFER_FULL);
_model.broadcastEventExternally(ExternalEventName.ON_CAN_PLAY);
_model.broadcastEventExternally(ExternalEventName.ON_START);
_pausedSeekValue = -1;
_isPlaying = true;
if(_pausePending){
_pausePending = false;
_ns.pause();
_isPaused = true;
} else if (_isBuffering) {
_model.broadcastEventExternally(ExternalEventName.ON_START);
}
_isBuffering = false;
break;

case "NetStream.Buffer.Empty":
Expand Down

0 comments on commit 8a98910

Please sign in to comment.