langhuihui / jessibuca

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

heartTimeout 设置没作用 #282

Closed dimsumc closed 1 year ago

dimsumc commented 1 year ago

测试使用这组设定 { container: $container, videoBuffer: 0.2, isFullResize: true, loadingText: '', useMSE: false, debug: true, showBandwidth: true, heartTimeout: 50, // 设置 50s heartTimeoutReplay: true, heartTimeoutReplayTimes: 5, operateBtns: { fullscreen: false, screenshot: false, play: false, audio: false, record: false, }, forceNoOffscreen: true, isNotMute: false, }
使用 chrome 开发工具限流 “Slow 3g", 时间用 stats 事件记录 11:05:45 收到第一个 stat 事件 11:05:58 收到最后一个 stat 事件 然后就直接 destroy 了

预期应该是 播放后中间没收到资料 50s 后才 destroy?

---- 完整log ---

Jessibuca: [decoderWorker] onmessage: init jessibuca.js:1 Jessibuca: [player events] load undefined jessibuca.js:1 Jessibuca: [player] has loaded jessibuca.js:1 Jessibuca: [player events] decoderWorkerInit undefined jessibuca.js:1 Jessibuca: [player events] loading true jessibuca.js:1 Jessibuca: [FetchStream] init jessibuca.js:1 Jessibuca: [common dumex] init Interval jessibuca.js:1 Jessibuca: [FlvDemux] init decoder.js:1 Jessibuca: [worker] init jessibuca.js:1 Jessibuca: [player events] kBps 0.68 jessibuca.js:1 Jessibuca: [decoderWorker] onmessage: videoCode 7 decoder.js:1 Jessibuca: [worker]: [h264 @ 0x61f090] Warning: not compiled with thread support, using thread emulation jessibuca.js:1 Jessibuca: [player events] kBps 48.82 jessibuca.js:1 Jessibuca: [player events] stats {buf: 0, fps: 0, abps: 0, vbps: 67, ts: 0}

StreamPlayer.tsx:61 11:05:45 jessibuca.js:1 Jessibuca: [player events] performance 0 jessibuca.js:1 Jessibuca: [player events] kBps 47.42 jessibuca.js:1 Jessibuca: [player events] stats {buf: 0, fps: 0, abps: 0, vbps: 0, ts: 0} StreamPlayer.tsx:61 11:05:46 jessibuca.js:1 Jessibuca: [player events] performance 0 jessibuca.js:1 Jessibuca: [player events] kBps 48.81 jessibuca.js:1 Jessibuca: [player events] kBps 48.84 jessibuca.js:1 Jessibuca: [player events] stats {buf: 0, fps: 0, abps: 0, vbps: 0, ts: 0} StreamPlayer.tsx:61 11:05:48 jessibuca.js:1 Jessibuca: [player events] performance 0 jessibuca.js:1 Jessibuca: [player events] kBps 48.81 jessibuca.js:1 Jessibuca: [player events] stats {buf: 0, fps: 0, abps: 0, vbps: 0, ts: 0} StreamPlayer.tsx:61 11:05:49 jessibuca.js:1 Jessibuca: [player events] performance 0 jessibuca.js:1 Jessibuca: [player events] kBps 47.38 jessibuca.js:1 Jessibuca: [decoderWorker] onmessage: initVideo width:1280,height:960 jessibuca.js:1 Jessibuca: [player events] videoInfo {width: 1280, height: 960, encType: 'H264(AVC)'} jessibuca.js:1 Jessibuca: [canvasVideo] resize jessibuca.js:1 Jessibuca: [player events] start undefined jessibuca.js:1 Jessibuca: [player events] loading false jessibuca.js:1 Jessibuca: [player events] playing true jessibuca.js:1 Jessibuca: [player events] volumechange 0 jessibuca.js:1 Jessibuca: [player events] play undefined jessibuca.js:1 Jessibuca: [player events] playToRenderTimes {playInitStart: 1666839941765, playStart: 1666839941765, streamStart: 1666839941765, streamResponse: 1666839943900, demuxStart: 1666839943928, …} jessibuca.js:1 Jessibuca: [player events] kBps 48.83 jessibuca.js:1 Jessibuca: [player events] stats {buf: 0, fps: 1, abps: 0, vbps: 309645, ts: 0} StreamPlayer.tsx:61 11:05:51 jessibuca.js:1 Jessibuca: [player events] performance 0 jessibuca.js:1 Jessibuca: [player events] kBps 48.83 jessibuca.js:1 Jessibuca: [player events] stats {buf: 0, fps: 0, abps: 0, vbps: 0, ts: 0} StreamPlayer.tsx:61 11:05:52 jessibuca.js:1 Jessibuca: [player events] performance 0 jessibuca.js:1 Jessibuca: [player events] kBps 48.87 jessibuca.js:1 Jessibuca: [player events] kBps 48.79 jessibuca.js:1 Jessibuca: [player events] stats {buf: 0, fps: 0, abps: 0, vbps: 0, ts: 0} StreamPlayer.tsx:61 11:05:54 jessibuca.js:1 Jessibuca: [player events] performance 0 jessibuca.js:1 Jessibuca: [player events] kBps 48.87 jessibuca.js:1 Jessibuca: [player events] stats {buf: 0, fps: 0, abps: 0, vbps: 0, ts: 0} StreamPlayer.tsx:61 11:05:55 jessibuca.js:1 Jessibuca: [player events] performance 0 jessibuca.js:1 Jessibuca: [player events] kBps 48.82 jessibuca.js:1 Jessibuca: [player events] stats {buf: 201, fps: 7, abps: 0, vbps: 332663, ts: 231} StreamPlayer.tsx:61 11:05:56 jessibuca.js:1 Jessibuca: [player events] performance 0 jessibuca.js:1 Jessibuca: [player events] kBps 48.79 jessibuca.js:1 Jessibuca: [player events] stats {buf: 201, fps: 25, abps: 0, vbps: 51719, ts: 1231} StreamPlayer.tsx:61 11:05:57 jessibuca.js:1 Jessibuca: [player events] performance 2 jessibuca.js:1 Jessibuca: [player events] kBps 48.83 jessibuca.js:1 Jessibuca: [player events] stats {buf: 202, fps: 18, abps: 0, vbps: 0, ts: 1951} StreamPlayer.tsx:61 11:05:58 jessibuca.js:1 Jessibuca: [player events] performance 1 jessibuca.js:1 Jessibuca: [decoderWorker] destroy jessibuca.js:1 Jessibuca: [CanvasVideoLoader] destroy decoder.js:1 Jessibuca: [worker]: close jessibuca.js:1 Jessibuca: [AudioContext] destroy jessibuca.js:1 Jessibuca: [FetchStream] destroy jessibuca.js:1 Jessibuca: [Recorder] destroy jessibuca.js:1 Jessibuca: [control] destroy jessibuca.js:1 Jessibuca: [CommonDemux] destroy jessibuca.js:1 Jessibuca: [FlvDemux] destroy jessibuca.js:1 Jessibuca: [Events] destroy jessibuca.js:1 Jessibuca: [player events] destroy undefined jessibuca.js:1 Jessibuca: [play] destroy end

bosscheng commented 1 year ago

好奇怪的destroy 。从现有日志里面看不出来是啥原因导致的destroy。方便再帮忙弄一个更详细的日志嘛、