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

Set hasEnded false on a seek, remove another seek after end request #172

Merged
merged 1 commit into from
Jul 30, 2015
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
2 changes: 1 addition & 1 deletion src/com/videojs/providers/HTTPVideoProvider.as
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ package com.videojs.providers{
// if the asset is already loading
if (_hasEnded) {
_hasEnded = false;
_ns.seek(0);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what makes it that if you seek immediately after ending, you actually start at 0 instead of where you seeked?
Though, changing this seems like it might break replay functionality when you hit play after the video has ended.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looping continues to work fine.

I'm not sure when this code is actually being used, as it doesn't seem to be interfering with anything, but since we've decided to let the player (not the tech) decide when/whether to reset, this should still go.

_pausePending = false;
_ns.resume();
Expand Down Expand Up @@ -599,6 +598,7 @@ package com.videojs.providers{
case "NetStream.Seek.Notify":
_playbackStarted = true;
_isSeeking = false;
_hasEnded = false;
_model.broadcastEvent(new VideoPlaybackEvent(VideoPlaybackEvent.ON_STREAM_SEEK_COMPLETE, {info:e.info}));
_model.broadcastEventExternally(ExternalEventName.ON_SEEK_COMPLETE);
_model.broadcastEventExternally(ExternalEventName.ON_BUFFER_EMPTY);
Expand Down