Skip to content

Commit

Permalink
Merge pull request #1058 from AkamaiDASH/development
Browse files Browse the repository at this point in the history
Fix for #984
  • Loading branch information
Dan Sparacio authored and Dan Sparacio committed Jan 26, 2016
2 parents 63fbf8d + 3c84076 commit 02082b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/streaming/controllers/PlaybackController.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,10 @@ function PlaybackController() {
}

function onPlaybackSeeking() {
let seekTime = getTime();
log('Seeking to: ' + seekTime);
startUpdatingWallclockTime();
eventBus.trigger(Events.PLAYBACK_SEEKING, {seekTime: getTime()});
eventBus.trigger(Events.PLAYBACK_SEEKING, {seekTime: seekTime});
}

function onPlaybackSeeked() {
Expand Down
11 changes: 5 additions & 6 deletions src/streaming/controllers/ScheduleController.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function ScheduleController(config) {

function onGetRequiredFragmentCount(result) {
fragmentsToLoad = result.value;
if (fragmentsToLoad > 0 && !bufferController.getIsAppendingInProgress() && !isFragmentLoading) {
if (fragmentsToLoad > 0 && !isFragmentLoading && (manifestExt.getIsTextTrack(type) || !bufferController.getIsAppendingInProgress())) {
isFragmentLoading = true;
abrController.getPlaybackQuality(streamProcessor, getNextFragment(onGetNextFragment));
} else {
Expand Down Expand Up @@ -358,19 +358,18 @@ function ScheduleController(config) {
}

function onPlaybackSeeking(e) {

if (!initialPlayback) {
isFragmentLoading = false;
}

var metrics = metricsModel.getMetricsFor('stream');
var manifestUpdateInfo = metricsExt.getCurrentManifestUpdate(metrics);
let metrics = metricsModel.getMetricsFor('stream');
let manifestUpdateInfo = metricsExt.getCurrentManifestUpdate(metrics);

seekTarget = e.seekTime;
log('seek: ' + seekTarget);
addPlaylistMetrics(PlayList.SEEK_START_REASON);

metricsModel.updateManifestUpdateInfo(manifestUpdateInfo, {latency: currentRepresentationInfo.DVRWindow.end - playbackController.getTime()});
let latency = currentRepresentationInfo.DVRWindow ? currentRepresentationInfo.DVRWindow.end - playbackController.getTime() : NaN;
metricsModel.updateManifestUpdateInfo(manifestUpdateInfo, {latency: latency});

if (isDynamic) { // need to validate again for dynamic after first seek
validate();
Expand Down

0 comments on commit 02082b5

Please sign in to comment.