Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
待完成的事:
直播视频链接有效期 1小时,但是如果没有遇到故障就能一直使用。在遇到报错时(视频无法播放),只要不是视频格式不支持,就每隔2s重复获取直播间信息,直到直播间信息刷新(获取到新的链接或者确认直播间已经关闭)。
23/11/10 注意到一个现象,当修改了获取直播链接的格式,比如默认获取的链接是flv,改为只获取hls。获取到的m3u8链接会报错404,同一个链接再播放两次或者重新获取一次链接就能正常使用。可能是B站会对非默认格式做限流,使用的人多了之后才会启用。
所以使用默认获取的链接即可。
23/11/13 前面的现象消失了
顺便,将直播弹幕的用户id从 int 改为 int64。新用户都是长id了,int 存不下。