代码拉取完成,页面将自动刷新
//Player request.
const kPlayVideoReq = 0;
const kPauseVideoReq = 1;
const kStopVideoReq = 2;
//Player response.
const kPlayVideoRsp = 0;
const kAudioInfo = 1;
const kVideoInfo = 2;
const kAudioData = 3;
const kVideoData = 4;
//Downloader request.
const kGetFileInfoReq = 0;
const kDownloadFileReq = 1;
const kCloseDownloaderReq = 2;
//Downloader response.
const kGetFileInfoRsp = 0;
const kFileData = 1;
//Downloader Protocol.
const kProtoHttp = 0;
const kProtoWebsocket = 1;
//Decoder request.
const kInitDecoderReq = 0;
const kUninitDecoderReq = 1;
const kOpenDecoderReq = 2;
const kCloseDecoderReq = 3;
const kFeedDataReq = 4;
const kStartDecodingReq = 5;
const kPauseDecodingReq = 6;
const kSeekToReq = 7;
//Decoder response.
const kInitDecoderRsp = 0;
const kUninitDecoderRsp = 1;
const kOpenDecoderRsp = 2;
const kCloseDecoderRsp = 3;
const kVideoFrame = 4;
const kAudioFrame = 5;
const kStartDecodingRsp = 6;
const kPauseDecodingRsp = 7;
const kDecodeFinishedEvt = 8;
const kRequestDataEvt = 9;
const kSeekToRsp = 10;
function Logger(module) {
this.module = module;
}
Logger.prototype.log = function (line) {
console.log("[" + this.currentTimeStr() + "][" + this.module + "]" + line);
}
Logger.prototype.logError = function (line) {
console.log("[" + this.currentTimeStr() + "][" + this.module + "][ER] " + line);
}
Logger.prototype.logInfo = function (line) {
console.log("[" + this.currentTimeStr() + "][" + this.module + "][IF] " + line);
}
Logger.prototype.logDebug = function (line) {
console.log("[" + this.currentTimeStr() + "][" + this.module + "][DT] " + line);
}
Logger.prototype.currentTimeStr = function () {
var now = new Date(Date.now());
var year = now.getFullYear();
var month = now.getMonth() + 1;
var day = now.getDate();
var hour = now.getHours();
var min = now.getMinutes();
var sec = now.getSeconds();
var ms = now.getMilliseconds();
return year + "-" + month + "-" + day + " " + hour + ":" + min + ":" + sec + ":" + ms;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。