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

Commit

Permalink
Only broadcast playing when the buffer is full.
Browse files Browse the repository at this point in the history
  • Loading branch information
bclwhitaker committed May 15, 2014
1 parent 17001f8 commit 86c8b93
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/com/videojs/providers/HTTPVideoProvider.as
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,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 @@ -301,7 +303,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 @@ -514,13 +518,13 @@ package com.videojs.providers{
case "NetStream.Buffer.Full":
_model.broadcastEventExternally(ExternalEventName.ON_BUFFER_FULL);
_model.broadcastEventExternally(ExternalEventName.ON_CAN_PLAY);
_pausedSeekValue = -1;
_isPlaying = true;
if(_pausePending){
_pausePending = false;
_ns.pause();
_isPaused = true;
} else if (_isBuffering) {
_pausedSeekValue = -1;
_isPlaying = true;
_model.broadcastEventExternally(ExternalEventName.ON_START);
}
_isBuffering = false;
Expand Down

0 comments on commit 86c8b93

Please sign in to comment.