Repository Details
Shared by
HelloGitHub Rating
0 ratings
让流式播放变得简单
Past 7 days Received -2 stars ✨
Use arrow keys to explore dates, Home and End for the first and last date, Escape to dismiss.| Date | Star | Daily change |
|---|---|---|
| 周二 | 2,506 | — |
| 周三 | 2,506 | 0 |
| 周四 | 2,506 | 0 |
| 周五 | 2,505 | -1 |
| 周六 | 2,505 | 0 |
| 周日 | 2,505 | 0 |
| 周一 | 2,504 | -1 |
2.5k
Stars
Yes
Chinese
TypeScript
Language
No
Active
25
Contributors
35
Issues
Yes
Organization
None
Latest
227
Forks
MIT
License
让流式播放变得简单。无论你视频格式是 `mp4` 还是 `hls`,Griffith 都能使用媒体源拓展(MSE)来实现分段加载等功能,提供在线视频播放。示例代码:
```javascript
// yarn add griffith
import Player from 'griffith'
const sources = {
hd: {
play_url: 'https://zhstatic.zhihu.com/cfe/griffith/zhihu2018_hd.mp4',
},
sd: {
play_url: 'https://zhstatic.zhihu.com/cfe/griffith/zhihu2018_sd.mp4',
},
}
render(<Player sources={sources} />)
```
Included in:
Vol.36
Comments
Rating:
No comments yet