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
问题描述: 项目遇到一个需求,需要在直播流断流以后重新拉流,在本地拉了一个摄像头的流,然后插拔网线模拟断流的效果,但是 mpegts.ErrorTypes 这个 api 并没有输出任何信息,请问是调用方法出错了吗? 以下是代码,请教以下:
The text was updated successfully, but these errors were encountered:
Hey, did you find any solution?
Sorry, something went wrong.
No branches or pull requests
问题描述:
<script> import mpegts from 'mpegts.js'; export default { data() { return { flvPlayer: null, tag: '', timer: null, isPlay: false, // 屏幕录制 mainVideo: null, mediaRecorder: null, videoData: [], isRecording: false, }; }, methods: { /** * 创建 mpegts 实例 */ initFlv(videoUrl) { const ele = this.$refs.container console.log(mpegts.isSupported()); console.log(mpegts.getFeatureList()); if (ele && mpegts.isSupported()) { this.flvPlayer = mpegts.createPlayer({ type: 'flv', isLive: true, hasAudio: false, cors: true, url: videoUrl, }, { enableWorker: false, enableStashBuffer: true, stashInitialSize: 384, lazyLoad: false, lazyLoadMaxDuration: 0.2, deferLoadAfterSourceOpen: false, liveBufferLatencyChasing: true, liveBufferLatencyMaxLatency: 1.5, liveBufferLatencyMinRemain: 0.3 }); this.flvPlayer.attachMediaElement(ele); this.flvPlayer.load() this.flvPlayer.play() this.flvPlayer.on(mpegts.Events.STATISTICS_INFO, (statisticsInfo) => { console.log(statisticsInfo.speed, 'speed'); }); this.flvPlayer.on(mpegts.Events.ERROR, (e) => { console.log(e, 'ERROR'); }); this.flvPlayer.on(mpegts.ErrorTypes.NETWORK_ERROR, (message) => { console.log(message, 'ERROR'); console.log('NETWORK_ERROR'); }); } },项目遇到一个需求,需要在直播流断流以后重新拉流,在本地拉了一个摄像头的流,然后插拔网线模拟断流的效果,但是 mpegts.ErrorTypes 这个 api 并没有输出任何信息,请问是调用方法出错了吗?
以下是代码,请教以下:
The text was updated successfully, but these errors were encountered: