Socket
Socket
Sign inDemoInstall

bonc-htmlplayer

Package Overview
Dependencies
2
Maintainers
5
Versions
69
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.13 to 5.0.14

0

dist/h265Page/decodeWorkerPage.js

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ // 主线程

@@ -0,0 +0,0 @@ export function appendByteArray(buffer1, buffer2)

@@ -0,0 +0,0 @@ function Texture(gl) {

@@ -0,0 +0,0 @@ var webSocketUtil ;

4

package.json
{
"name": "bonc-htmlplayer",
"version": "5.0.13",
"version": "5.0.14",
"description": "东方国信的html播放器内核",

@@ -28,2 +28,2 @@ "main": "./dist/BoncH5Player.js",

}
}
}

@@ -0,0 +0,0 @@

@@ -62,4 +62,4 @@ import Event from "../../util/event";

} catch(e){}
this.rangeList.push([this.rangeStart, this.rangeEnd]);
// 张勇 为了处理白矿浏览器崩溃问题内存增产问题
// this.rangeList.push([this.rangeStart, this.rangeEnd]);
// console.log([this.rangeStart,this.rangeEnd],arguments[2].currentTime)

@@ -66,0 +66,0 @@ // console.log(this.rangeList.length)

@@ -0,0 +0,0 @@ import { MP4 } from "../../util/mp4-generator.js";

@@ -0,0 +0,0 @@ import { ExpGolomb } from '../../util/exp-golomb.js';

@@ -27,3 +27,3 @@ import { extractNALubonc } from "./utils";

debug: true,
mode:'audio'
mode: 'audio'
};

@@ -63,3 +63,3 @@ this.options = defaults;

this.recoder = new localRecorder(app);
this.messageData=true;
this.messageData = true;
// console.log('new H264Mp4Player')

@@ -127,3 +127,4 @@ }

}
this.currentRange = this.bufferControllers["video"].rangeList.pop();
//张勇 为了处理白矿浏览器崩溃问题内存增产问题
// this.currentRange = this.bufferControllers["video"].rangeList.pop();
this.timeend = this.app.node.buffered.end(0);

@@ -172,3 +173,3 @@ this.app.node.currentTime = this.app.node.buffered.end(0);

}
addSourceBuffer(type,Isbuffer) {
addSourceBuffer(type, Isbuffer) {

@@ -188,3 +189,3 @@ // console.log('添加buffer:',this.mediaSource.readyState,Isbuffer)

sb = this.mediaSource.addSourceBuffer(
`${type}/mp4; codecs="${track.mp4track.codec?track.mp4track.codec:'avc1.42E01E'}"`
`${type}/mp4; codecs="${track.mp4track.codec ? track.mp4track.codec : 'avc1.42E01E'}"`
);

@@ -211,3 +212,3 @@ // sb = this.mediaSource.addSourceBuffer(

onBufferError(data) {
console.log("onBufferError错误信息:",data)
console.log("onBufferError错误信息:", data)
if (data.name == "QuotaExceeded") {

@@ -221,5 +222,5 @@ this.bufferControllers[data.type].initCleanup(this.app.node.currentTime);

) {
this.mediaSource.removeSourceBuffer(this.sourceBuffers[data.type]);
this.mediaSource.removeSourceBuffer(this.sourceBuffers[data.type]);
// 重新把buffer填上
var sb = this.addSourceBuffer(data.type,false);
var sb = this.addSourceBuffer(data.type, false);
this.bufferControllers[data.type] = new BufferController(

@@ -246,3 +247,3 @@ sb,

URL.revokeObjectURL(this.mseUrl);
this.app.dispatch("errorRestart",data);
this.app.dispatch("errorRestart", data);
}

@@ -294,4 +295,4 @@

this.mediaSource = new MediaSource();
this.mseUrl=URL.createObjectURL(this.mediaSource);
this.app.node.src =this.mseUrl;
this.mseUrl = URL.createObjectURL(this.mediaSource);
this.app.node.src = this.mseUrl;
// console.log("this.app.node.src:", this.app.node.src);

@@ -340,3 +341,3 @@ this.mediaSource.addEventListener("sourceopen", this.onMSEOpen.bind(this));

this.spsnal = nal;
// console.log('找到sps=',nalType);
// console.log('找到sps=',nalType);
return;

@@ -463,4 +464,5 @@ } else if (nalType == 8) {

clearBuffer() {
// console.log(this.app.node.id,'视频开始播放了')
if (!this.clearBufferValidate) {

@@ -474,3 +476,3 @@ // console.log(this.app.node.buffered.end(0) - this.app.node.currentTime);

//video.buffer:用户的音视频缓冲范围,使用 end(0) 来获取已经缓冲的第一个时间段的结束时间。
//video.currentTime 表示当前视频播放的时间位置。
//video.currentTime 表示当前视频播放的时间位置。
//bufferLength:可以得到当前视频已经缓冲了多少部分的时间

@@ -490,4 +492,5 @@ let bufferLength =

this.app.node.play();
this.clearCanvas()
})
.catch(() => {});
.catch(() => { });
}

@@ -497,3 +500,3 @@ // this.app.node.play();

} else if (bufferLength > 1) {
console.log("视频缓存超过1s:bufferLength:",bufferLength);
console.log("视频缓存超过1s:bufferLength:", bufferLength);
this.app.node.currentTime = this.app.node.buffered.end(0);

@@ -505,4 +508,5 @@ let playPromise = this.app.node.play();

this.app.node.play();
this.clearCanvas()
})
.catch(() => {});
.catch(() => { });
}

@@ -601,3 +605,3 @@ // this.app.node.play();

);
//console.log('type-cleanMaxLimit:',type,cleanMaxLimit)
//console.log('type-cleanMaxLimit:',type,cleanMaxLimit)
this.bufferControllers[type].initCleanup(cleanMaxLimit);

@@ -607,4 +611,15 @@ }

}
}
clearCanvas() {
const canvasElement = document.getElementById(this.app.configs.canvasOver);
if (canvasElement) {
var ctx = canvasElement.getContext("2d");
// 清除视频上叠加canvas绘制的内容
canvasElement.style.display = "none";
ctx.clearRect(0, 0, canvasElement.width, canvasElement.height);
}
}
// 倒放的时候清理过多的buffer

@@ -631,3 +646,3 @@ clearBufferReverse() {

getVideoFrames(nalus, duration) {
let nalu,

@@ -642,3 +657,3 @@ units = [],

naluObj = new NALU(nalu);
naluObj.type()!=1?console.log('帧类型='+naluObj.type()):"";
naluObj.type() != 1 ? console.log('帧类型=' + naluObj.type()) : "";
units.push(naluObj);

@@ -645,0 +660,0 @@ // NALU.IDR 5关键帧 NALU.NDR 1非关键帧

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ // import { MP4 } from '../util/mp4-generator';

@@ -0,0 +0,0 @@ // 主线程

@@ -0,0 +0,0 @@ export function appendByteArray(buffer1, buffer2)

@@ -0,0 +0,0 @@ function Texture(gl) {

@@ -0,0 +0,0 @@ var webSocketUtil ;

@@ -0,0 +0,0 @@ // import './libffmpeg_264_265.js';

@@ -208,3 +208,3 @@ /*

let currentIndex = canvasIdIndex.split("_")[1];
Module._uninit_decoder(currentIndex);
console.log("h265主动销毁窗口:", currentIndex);

@@ -225,2 +225,3 @@ // console.log('webglPlayer:',webglPlayer,currentIndex,webglPlayer[currentIndex])

// });
Module._uninit_decoder(currentIndex);
}catch (err) {

@@ -227,0 +228,0 @@ console.log('err:',err)

@@ -0,0 +0,0 @@ function Texture(gl) {

@@ -0,0 +0,0 @@ import Event from "./util/event";

@@ -0,0 +0,0 @@ export default class ByteArray

@@ -0,0 +0,0 @@ export default class Event {

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ export class NALU {

@@ -0,0 +0,0 @@ //这里存储的 指令模板

@@ -0,0 +0,0 @@ var DetectStart_Id = 0x0000; //检测开始 检测开始0

@@ -0,0 +0,0 @@ import ByteArray from "./ByteArray";

@@ -0,0 +0,0 @@ import {xmlPlayControl,xmlPlayRecord} from './orderList';

@@ -260,2 +260,2 @@ export function appendByteArray(buffer1, buffer2)

export const version="5.0.13"
export const version="5.0.14"

@@ -0,0 +0,0 @@ //对于传进来的configs中的各个值进行校验

@@ -0,0 +0,0 @@ export default class webMdownload {

@@ -0,0 +0,0 @@ import {

@@ -0,0 +0,0 @@ const path = require("path");

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc