parent
80cddf0fd8
commit
5952632816
|
@ -72,14 +72,17 @@ export default class HLS extends Component {
|
||||||
|
|
||||||
onSeeked = () => {
|
onSeeked = () => {
|
||||||
if (!this.props.playing) {
|
if (!this.props.playing) {
|
||||||
if (this.shouldInitVideoTime) {
|
|
||||||
this.videoElement.currentTime = this.props.startTime;
|
|
||||||
this.shouldInitVideoTime = false;
|
|
||||||
}
|
|
||||||
this.props.onLoadEnd();
|
this.props.onLoadEnd();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onLoadedData = () => {
|
||||||
|
if (this.shouldInitVideoTime) {
|
||||||
|
this.videoElement.currentTime = this.props.startTime;
|
||||||
|
this.shouldInitVideoTime = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
loadSource(source = this.props.source) {
|
loadSource(source = this.props.source) {
|
||||||
if (this.videoElement) {
|
if (this.videoElement) {
|
||||||
this.player.loadSource(source);
|
this.player.loadSource(source);
|
||||||
|
@ -112,6 +115,7 @@ export default class HLS extends Component {
|
||||||
onPlaying={this.props.onLoadEnd}
|
onPlaying={this.props.onLoadEnd}
|
||||||
onSeeking={this.onSeeking}
|
onSeeking={this.onSeeking}
|
||||||
onSeeked={this.onSeeked}
|
onSeeked={this.onSeeked}
|
||||||
|
onLoadedData={this.onLoadedData}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue