@besovideo/webrtc-player 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20504,7 +20504,7 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
20504
20504
  // smooth: 播放平滑度。[1,7],值越小越实时。
20505
20505
  // algokey: 加解密算法:密钥。格式:算法:base64(密钥)。例如: SM4:MTIzNDU2Nzg=
20506
20506
  constructor() {
20507
- console.log("================== bvrtc version: 1.0.1 2025/1/22 11:23:58 ==================");
20507
+ console.log("================== bvrtc version: 1.0.1 2025/1/24 11:39:12 ==================");
20508
20508
  this.hplayer = 0;
20509
20509
  this.canvas = null;
20510
20510
  this.dialogid = "";
@@ -21143,7 +21143,7 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
21143
21143
  iPushCount *= 2;
21144
21144
  }
21145
21145
  const perFramesCount = numberOfFrames / iPushCount;
21146
- const perBytes = perFramesCount * this.audioPlayer.getNumofSamples(this.audioInfo.encoding);
21146
+ const perBytes = perFramesCount * this.audioPlayer.getNumofSamples(this.audioInfo.encoding) * frame.numberOfChannels;
21147
21147
  for (let i3 = 0; i3 < iPushCount; i3++) {
21148
21148
  const dateTemp = new DataView(frame.data, i3 * perBytes, perBytes);
21149
21149
  let audioData = new AudioData({
@@ -21396,7 +21396,7 @@ ${event.candidate ? event.candidate.candidate : "(null)"}`
21396
21396
  iPushCount *= 2;
21397
21397
  }
21398
21398
  const perFramesCount = frame.numberOfFrames / iPushCount;
21399
- const perBytes = perFramesCount * this.audioPlayer.getNumofSamples(frame.format);
21399
+ const perBytes = perFramesCount * this.audioPlayer.getNumofSamples(frame.format) * frame.numberOfChannels;
21400
21400
  for (let i3 = 0; i3 < iPushCount; i3++) {
21401
21401
  const dateTemp = new DataView(ar.buffer, i3 * perBytes, perBytes);
21402
21402
  let audioData = new AudioData({
package/dist/main.es.js CHANGED
@@ -20488,7 +20488,7 @@ var BVMedia = class {
20488
20488
  // smooth: 播放平滑度。[1,7],值越小越实时。
20489
20489
  // algokey: 加解密算法:密钥。格式:算法:base64(密钥)。例如: SM4:MTIzNDU2Nzg=
20490
20490
  constructor() {
20491
- console.log("================== bvrtc version: 1.0.1 2025/1/22 11:23:58 ==================");
20491
+ console.log("================== bvrtc version: 1.0.1 2025/1/24 11:39:12 ==================");
20492
20492
  this.hplayer = 0;
20493
20493
  this.canvas = null;
20494
20494
  this.dialogid = "";
@@ -21127,7 +21127,7 @@ var BVMedia = class {
21127
21127
  iPushCount *= 2;
21128
21128
  }
21129
21129
  const perFramesCount = numberOfFrames / iPushCount;
21130
- const perBytes = perFramesCount * this.audioPlayer.getNumofSamples(this.audioInfo.encoding);
21130
+ const perBytes = perFramesCount * this.audioPlayer.getNumofSamples(this.audioInfo.encoding) * frame.numberOfChannels;
21131
21131
  for (let i3 = 0; i3 < iPushCount; i3++) {
21132
21132
  const dateTemp = new DataView(frame.data, i3 * perBytes, perBytes);
21133
21133
  let audioData = new AudioData({
@@ -21380,7 +21380,7 @@ BVWebcodecPlayer.prototype = {
21380
21380
  iPushCount *= 2;
21381
21381
  }
21382
21382
  const perFramesCount = frame.numberOfFrames / iPushCount;
21383
- const perBytes = perFramesCount * this.audioPlayer.getNumofSamples(frame.format);
21383
+ const perBytes = perFramesCount * this.audioPlayer.getNumofSamples(frame.format) * frame.numberOfChannels;
21384
21384
  for (let i3 = 0; i3 < iPushCount; i3++) {
21385
21385
  const dateTemp = new DataView(ar.buffer, i3 * perBytes, perBytes);
21386
21386
  let audioData = new AudioData({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@besovideo/webrtc-player",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "@besovideo/webrtc-player desc",
5
5
  "type": "module",
6
6
  "types": "./dist/types/main.d.ts",