We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
设置为autoplay为true,为正常的 `import React, { Component } from 'react'; import Player from 'griffith';
class LiveM3u8 extends Component { state = {};
testEvent = e => { console.log(e, 'testEvent'); }
render()
{
const { id, title, cover, src } = this.props; const sources = { auto: { format: src.indexOf('m3u8') > -1 ? 'm3u8' : 'mp4', play_url: src, }, }; const props = { id, title, standalone: true, cover, initialObjectFit: 'cover', sources, shouldObserveResize: true, disablePictureInPicture: true, autoplay: (src.indexOf('m3u8') > -1), hiddenPlayButton: false, hiddenTimeline: false, hiddenTime: false, onEvent: this.testEvent, }; return ( <Player {...props} /> )
} }
export default LiveM3u8; `
The text was updated successfully, but these errors were encountered:
考,我也是这个毛病,请问怎么解决的?
Sorry, something went wrong.
Safari 能播放但额外存在 loading 提示卡住的问题
Chrome 无 autoplay 加载:
autoStartLoad: true
hls.startLoad()
NOTE: 与 hls 版本无关(升级到 1.x 仍然存在 )
No branches or pull requests
视频是m3u8格式的,一定要自动播放才能正常显示视频,如果是设置autoplay为false,点击播放按钮,播放容器是黑屏的
设置为autoplay为true,为正常的
`import React, { Component } from 'react';
import Player from 'griffith';
class LiveM3u8 extends Component {
state = {};
testEvent = e => {
console.log(e, 'testEvent');
}
render()
}
}
export default LiveM3u8;
`
The text was updated successfully, but these errors were encountered: