Created
May 24, 2016 19:24
-
-
Save arpu/dcacb71d67667e0260d80f8b8cbf2913 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class PNScheduleControllerClassProvider { | |
constructor() { | |
const context = this.context; | |
const factory = this.factory; | |
const parent = this.parent; | |
} | |
validate() { | |
console.error('validate()') | |
if (isStopped || playbackController.isPaused() && !scheduleWhilePaused) return; | |
//log("validating", type); | |
let readyToLoad = bufferLevelRule.execute(streamProcessor); | |
if (readyToLoad && !isFragmentLoading && | |
(dashManifestModel.getIsTextTrack(type) || !bufferController.getIsAppendingInProgress())) { | |
isFragmentLoading = true; | |
const getNextFragment = function () { | |
let request = nextFragmentRequestRule.execute(streamProcessor); | |
if (request) { | |
console.error('executeRequest(request)') | |
//fragmentModel.executeRequest(request); // we load | |
} else { | |
isFragmentLoading = false; | |
startValidateTimer(1000); //we loop | |
} | |
}; | |
//Run ABR rules - let it callback to getNextFragment once it is done running. | |
abrController.getPlaybackQuality(streamProcessor, getNextFragment); | |
} else { | |
startValidateTimer(1000); //we loop | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment