langhuihui / jessibuca

Jessibuca是一款开源的纯H5直播流播放器
https://jessibuca.com
GNU General Public License v3.0
2.04k stars 395 forks source link

jessibuca.d.ts stats事件注释是否存在错误? #348

Closed seamory closed 10 months ago

seamory commented 11 months ago
on(event: 'stats', callback: (stats: {
    /** 当前缓冲区时长,单位毫秒 */
    buf: number;
    /** 当前视频帧率 */
    fps: number;
    /** 当前音频码率,单位bit */
    abps: number;
    /** 当前视频码率,单位bit */
    vbps: number;
    /** 当前视频帧pts,单位毫秒 */
    ts: number;
}) => void): void;

上面的单位为bit,但是检索源代码关键字“stats”发现在多个updateStats的位置,都是使用的byteLength(Uint32Arrary)获得的长度,这个值返回的应该是个byte单位,而不是bit单位。

Snipaste_2023-08-11_16-12-01 Snipaste_2023-08-11_16-12-10

bosscheng commented 10 months ago

感谢纠正,已经修改了文案了。