@besovideo/webrtc-player 0.10.43 → 0.10.45

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.
@@ -2,7 +2,7 @@ import {
2
2
  __async,
3
3
  init_define_processenv,
4
4
  init_jsx_shim
5
- } from "./chunk-7BKM3LDB.js";
5
+ } from "./chunk-WOAUOISE.js";
6
6
 
7
7
  // src/lib/bvmedia/index.ts
8
8
  init_define_processenv();
@@ -1028,7 +1028,21 @@ var BVMedia = class {
1028
1028
  this.webcodecPlayer.decodeAudio(packet.data, packet.pts);
1029
1029
  }
1030
1030
  }
1031
+ // Recording subscribes independently of playback volume and onaudioData.
1032
+ setDecodedAudioCallback(callback) {
1033
+ this.onDecodedAudioCallback = callback;
1034
+ return Promise.resolve();
1035
+ }
1031
1036
  _OnAudioData(frame) {
1037
+ var _a;
1038
+ (_a = this.onDecodedAudioCallback) == null ? void 0 : _a.call(this, {
1039
+ pts: frame.pts / 1e3,
1040
+ // decoded PCM uses milliseconds; recording uses seconds
1041
+ data: frame.data,
1042
+ channels: this.audioInfo.channels,
1043
+ sampleRate: this.audioInfo.sampleRate,
1044
+ format: this.audioInfo.encoding
1045
+ });
1032
1046
  if (this.audioPlayer) {
1033
1047
  let numberOfFrames = frame.len / this.audioInfo.channels / this.audioPlayer.getNumofSamples(this.audioInfo.encoding);
1034
1048
  let ar = new Uint8Array(frame.data);
@@ -119,7 +119,7 @@ var __async = (__this, __arguments, generator) => {
119
119
  var define_processenv_default;
120
120
  var init_define_processenv = __esm({
121
121
  "<define:processenv>"() {
122
- define_processenv_default = { NODE_ENV: "production", SH_LIB_NAME: "@besovideo/webrtc-player", SH_LIB_VERSION: "0.10.43", PROJECT_NAMESPACE: "bvplayer", SH_LIB_BUILD_TIME: "2026-09-04 14:49:37" };
122
+ define_processenv_default = { NODE_ENV: "production", SH_LIB_NAME: "@besovideo/webrtc-player", SH_LIB_VERSION: "0.10.45", PROJECT_NAMESPACE: "bvplayer", SH_LIB_BUILD_TIME: "2026-09-11 17:37:05" };
123
123
  }
124
124
  });
125
125