Closed fzw2408 closed 3 years ago
嗯好的。谢谢。有没有兴趣一起来维护
其他
1.浏览器内存好像没有释放。时间久了会提示out of memory
- 编译decode_wasm的emsdk 版本1.38.45 .希望这个在decode_wasm编译wiki里注明一下, 其他太新的版本编译可以通过,使用的时候有问题,加载不了。
嗯好的。谢谢。有没有兴趣一起来维护
1.浏览器内存好像没有释放。时间久了会提示out of memory
- 编译decode_wasm的emsdk 版本1.38.45 .希望这个在decode_wasm编译wiki里注明一下, 其他太新的版本编译可以通过,使用的时候有问题,加载不了。
好的,我更新下readme里面的版本信息。 内存的问题可以把播放器页面的console关掉再试一下。
作者你好。我尝试通过发送PlayerChangeSrc 信号驱动:switchPlaylist / changeSrc 但是没有效果。 我的想法是:我播放一个流的时候想不重新new的情况下,直接服用旧的实列切换到另外一个流进行观看。 文档中有介绍一点,看的不是很清楚。。。 Example Example of rateList.
// let options = { rateList:[ {"url":"http://localhost/20190902/01/a5/029f8fad8868a7116f20d8ae5b075996.m3u8","id":51,"name":"720P","value":"720"}, {"url":"http://localhost/20190902/f0/db/ee545466ced38973a9d60fe7f24ed409.m3u8","id":51,"name":"高清","value":"600"}, {"url":"http://localhost/20190902/78/6c/5a5a99476f4f792e2e7a701ba1f6d5ad.m3u8","id":264,"name":"极速","value":"jisu"}, {"url":"http://localhost/20190902/54/05/7e714a321d9e7d92c937582b2e439833.m3u8","id":265,"name":"流畅","value":"300"}] }
changeSrc(url, callback) 这个有没有相应的demo啊?
直接通过player实例对象调用这个方法就可以player.changeSrc('http://localhost:9011/gitwork/goldplay/h265player/data/video1/playlist.m3u8')
player.changeSrc('http://localhost:9011/gitwork/goldplay/h265player/data/video1/playlist.m3u8') 流加载进来是黑屏,【Aurl=264 切换 Burl = 265】 hls流正常下载。 用了一个比较愚蠢的方法: changeSrc (url, callback) { this.pause() this.events.emit(Events.ControlBarPauseLoading, this) this.events.emit(Events.PlayerChangeSrc, this) this.changing = true this.seeking = false this.imagePlayer.firstRender = false this.readyStatus = { dataProcessor: false, firstData: false, audioPlayer: false } this.currentTime = this.startTime this.imagePlayer.clear() this.reset(true) this.autoPlay = true this.switchPlaylist(url, callback) setTimeout(() => { this.pause() this.play() }, 5000);
}
player.changeSrc('http://localhost:9011/gitwork/goldplay/h265player/data/video1/playlist.m3u8') 流加载进来是黑屏,【Aurl=264 切换 Burl = 265】 hls流正常下载。 用了一个比较愚蠢的方法: changeSrc (url, callback) { this.pause() this.events.emit(Events.ControlBarPauseLoading, this) this.events.emit(Events.PlayerChangeSrc, this) this.changing = true this.seeking = false this.imagePlayer.firstRender = false this.readyStatus = { dataProcessor: false, firstData: false, audioPlayer: false } this.currentTime = this.startTime this.imagePlayer.clear() this.reset(true) this.autoPlay = true this.switchPlaylist(url, callback) setTimeout(() => { this.pause() this.play() }, 5000);
}
这个加个了定时器是吗?好吧。。。
/**
@description Change the source of the video to play*/
changeSrc (url, callback) {
this.pause()
this.events.emit(Events.ControlBarPauseLoading, this)
this.events.emit(Events.PlayerChangeSrc, this)
this.changing = true
this.seeking = false
this.imagePlayer.firstRender = false
this.readyStatus = { dataProcessor: false, firstData: false, audioPlayer: false }
this.currentTime = this.startTime
this.imagePlayer.clear()
this.reset(true)
this.autoPlay = true
this.options.sourceURL = url
this.switchPlaylist(url, callback)
**setTimeout(() => { this.logger.info('pause-changeSrc') this.status = 'pause' this.action.pause() this.paused = true this.events.emit(Events.PlayerPause, this)
this.logger.info('start play-changeSrc') this.status = 'playing' this.paused = false this.action.play(0) this.events.emit(Events.PlayerPlay, this) }, 1000);**
}
1.浏览器内存好像没有释放。时间久了会提示out of memory