Skip to content

feat: use auto quality#147

Merged
xiaoyuhen merged 1 commit intozhihu:masterfrom
kitayoshi:dev/hls
Dec 23, 2020
Merged

feat: use auto quality#147
xiaoyuhen merged 1 commit intozhihu:masterfrom
kitayoshi:dev/hls

Conversation

@kitayoshi
Copy link
Collaborator

@kitayoshi kitayoshi commented Dec 23, 2020

Description

增加 useAutoQuality 属性,默认为 false

只有在 useAutoQuality 启用并且 source 没有提供 auto quality 时,hls 视频才会尝试本地手动生成 auto 质量(而且这个实现看起来有 BUG)

How Has This Been Tested?

修改了 example 的 hls 页面

  • macOS 下 Safari 与 Chrome 均能正常播放 hls 视频(高清或者迪庆)
  • macOS 下 Safari 与 Chrome 可以正常切换清晰度并维持播放状态(继续播放或继续暂停)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@codecov-io
Copy link

Codecov Report

Merging #147 (edc6cbd) into master (3f67ab4) will decrease coverage by 0.51%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #147      +/-   ##
==========================================
- Coverage   49.63%   49.12%   -0.52%     
==========================================
  Files         126      126              
  Lines        1801     1820      +19     
==========================================
  Hits          894      894              
- Misses        907      926      +19     
Impacted Files Coverage Δ
packages/griffith-hls/src/Video.js 0.00% <0.00%> (ø)
packages/griffith-mp4/src/player.js 0.00% <ø> (ø)
packages/griffith/src/components/Player/Player.js 0.00% <0.00%> (ø)
.../src/components/PlayerContainer/PlayerContainer.js 0.00% <ø> (ø)
...kages/griffith/src/components/Video/NormalVideo.js 0.00% <0.00%> (ø)
...th/src/contexts/VideoSource/VideoSourceProvider.js 0.00% <0.00%> (ø)
...griffith/src/contexts/VideoSource/parsePlaylist.js 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79a8cff...edc6cbd. Read the comment docs.

@xiaoyuhen xiaoyuhen merged commit 6798882 into zhihu:master Dec 23, 2020
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.

3 participants