AVPlayer的网络超时时间为15秒,可以通过avPlayer.on监听错误事件并做业务处理。如:this.avPlayer.on('error', (error: Error) => { console.info("进入error") this.isLoading = false; this.homeTabModel.linkCheck = $r('app.string.link_check'); this.homeTabModel.loadColor = $r('app.color.index_tab_selected_font_color'); if (this.avPlayer !== null) { this.avPlayer.release(); } this.failureCallback(error); })设置超时时长这个业务可以自己主动结束。error状态只在系统故障的时候,或者ip地址不正确的时候才会返回。
AVPlayer的网络超时时间为15秒,可以通过avPlayer.on监听错误事件并做业务处理。如:
设置超时时长这个业务可以自己主动结束。error状态只在系统故障的时候,或者ip地址不正确的时候才会返回。