Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New live video url api #228

Merged
merged 8 commits into from
Nov 10, 2023
Merged

New live video url api #228

merged 8 commits into from
Nov 10, 2023

Conversation

xfangfang
Copy link
Owner

@xfangfang xfangfang commented Nov 9, 2023

待完成的事:

  • 我还没测试,但是貌似新的接口获取的视频链接是有时效性的(一个小时?)所以需要定时刷新链接
  • 完善未开播等错误的判断

直播视频链接有效期 1小时,但是如果没有遇到故障就能一直使用。在遇到报错时(视频无法播放),只要不是视频格式不支持,就每隔2s重复获取直播间信息,直到直播间信息刷新(获取到新的链接或者确认直播间已经关闭)。


23/11/10 注意到一个现象,当修改了获取直播链接的格式,比如默认获取的链接是flv,改为只获取hls。获取到的m3u8链接会报错404,同一个链接再播放两次或者重新获取一次链接就能正常使用。可能是B站会对非默认格式做限流,使用的人多了之后才会启用。
所以使用默认获取的链接即可。

23/11/13 前面的现象消失了


顺便,将直播弹幕的用户id从 int 改为 int64。新用户都是长id了,int 存不下。

@xfangfang xfangfang mentioned this pull request Nov 9, 2023
@xfangfang xfangfang merged commit 1dccd6d into dev Nov 10, 2023
14 checks passed
@xfangfang xfangfang deleted the new_live_api branch November 10, 2023 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant