【发布时间】:2020-09-01 17:32:55
【问题描述】:
我遇到了https://www.npmjs.com/package/react-hls-player,其中提到了如何在 reactjs 中使用 hls 播放器
这是我编写的示例代码,但我不知道如何使用hlsConfig 对象。有人可以帮我如何以及在哪里使用 hlsConfig 对象吗?
import React from 'react';
import ReactHlsPlayer from 'react-hls-player'
export default class HLSPlayer extends React.Component {
render() {
return (
<ReactHlsPlayer
url='https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8'
autoplay={true}
controls={true}
width="1200"
height="auto"
/>
)
}
}
【问题讨论】:
标签: reactjs http-live-streaming hls.js