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

Fire playing on buffer full only when we are not pending a pause. #90

Merged
merged 3 commits into from
May 23, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 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 @@ -512,17 +516,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