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
setSrc(src) { if (this.flvPlayer) { // Is this necessary to change source? this.flvPlayer.detachMediaElement(); this.flvPlayer.destroy(); }
const mediaDataSource = this.options_.mediaDataSource; const config = this.options_.config; mediaDataSource.type = mediaDataSource.type === undefined ? 'flv' : mediaDataSource.type; mediaDataSource.url = src; this.flvPlayer = window.flvjs.createPlayer(mediaDataSource, config); this.bindEvent(); this.flvPlayer.attachMediaElement(this.el_); this.flvPlayer.load();
}
/**
The text was updated successfully, but these errors were encountered:
No branches or pull requests
setSrc(src) {
if (this.flvPlayer) {
// Is this necessary to change source?
this.flvPlayer.detachMediaElement();
this.flvPlayer.destroy();
}
}
/**
*/
bindEvent() {
const player = videojs.getPlayer(this.options().playerId);
if (!this.flvPlayer || !player) return;
// 【flvjs播放器事件侦听】
for (const type in window.flvjs.Events) {
this.flvPlayer.on(window.flvjs.Events[type], function () {
player.trigger({
type: window.flvjs.Events[type],
data: arguments
});
});
}
}
}
The text was updated successfully, but these errors were encountered: