我也是一样的问题,设置成contain是可以全部显示的,设置成object-fit="fillCrop"则上下内容缺失
我现在遇到的问题是live-player不能播放完整如标题,我现在遇到的问题是live-player不能播放完,和原画面相比live-player播放的是原画面的中间一部分; videoHeight:360 videoWidth:640 宽640高360的视频可能只播放了中间height 100 width 178的样子;代码如下 object-fit=contain也一样 <live-player id="player-{{uid}}" wx-if="{{playUrls!==''}}" src="{{playUrl}}" mode="RTC" class="player" bindstatechange="playerStateChange" object-fit="fillCrop" autoplay="true" bindnetstatus="netstatus" />
2019-01-02类似这样 [图片] [图片]
ios暂停直播全屏后槪现红屏ios暂停直播全屏后槪现红屏
2018-11-14请问你推流的音频转成aac就有声音了吗,我设置成aac或者g711的音频都没有声音
live-player只有画面没有声音- 当前 Bug 的表现(可附上截图) 使用live-player播放rtmp流时,没有声音 - 预期表现 视频与声音一起出来 - 复现路径 - 提供一个最简复现 Demo wechatide://minicode/PJNk7umh7524 问题补充: 推流端是flash,好像flash的音频解码不了。。。使用其他端推流是有声音的
2018-11-12请问你推流的音频是什么格式的呢,我设置成aac或者g711的音频都没有声音
live-player 播放纯视频的rtmp卡顿live-player播放没有音频的rtmp, 出现卡顿现象, 有音频则不卡顿,帮忙解决一下。
2018-11-12我也遇到这个问题,是因为onhide的时候页面view先跳转到其他页面,逻辑层执行代码的时候获取不到拉留对象,请问你现在解决了吗
live-player页面隐藏后仍然继续播放【急】live-player中在onHide中操作直播实例不生效 <view class="page-body"> <view class="page-section tc"> <live-player id="player" src="{{liveSrc}}" mode="live" bindstatechange="statechange" binderror="error" background-mute/> <view class="btn-area"> <button bindtap="bindPlay" class="page-body-button" type="primary">播放</button> <button bindtap="bindPause" class="page-body-button" type="primary">暂停</button> <button bindtap="bindStop" class="page-body-button" type="primary">停止</button> <button bindtap="bindResume" class="page-body-button" type="primary">恢复</button> <button bindtap="bindMute" class="page-body-button" type="primary">静音</button> <button bindtap="setSrc" class="page-body-button" type="primary">src</button> </view> </view> </view> /* eslint-disable */ const app = getApp() Page({ data: { liveSrc: "", state: 0, // 当前视频状态,0暂停,1播放,-1无视频或播放失败,用于控制页面上元素的展示 fullScreen: false, mute: false, init: true // 是否是第一次播放,用于控制只进行一次play() }, onLoad: function () { this.setData({ // liveSrc:"http://tx.corp-flv.huya.com/huyalive/35754395-35754395-153563957213265920-3155517294-10057-A-1523883632-63059.flv?wsSecret=551b73f934a29fcc48ec24010c6a3a81&wsTime=5ad601ce" liveSrc:"rtmp://live.hkstv.hk.lxdns.com/live/hks" }) }, onReady(res) { this.ctx = wx.createLivePlayerContext('player') }, /* 直播相关 start */ // 静音按钮 tapMute() { this.bindMute(); }, // 监听状态改变 statechange(e) { if (e.detail.code == '-2301') { console.log('loading fail'); this.setData({ state: -1 }); } console.log('live-player code:', e.detail.code) }, // 错误处理 error(e) { console.error('live-player error:', e.detail.errMsg); this.setData({ state: -1 }); }, bindPlay() { this.ctx.play({ success: res => { this.setData({ // state:1 - this.data.state // 1 state: 1 }); console.log('play success') }, fail: res => { console.log('play fail'); this.setData({ state: -1 }); } }) }, bindPause() { this.ctx.pause({ success: res => { this.setData({ // state:1 - this.data.state // 0 state: 0 }); console.log('pause success') }, fail: res => { console.log('pause fail') this.setData({ state: -1 }); } }) }, bindStop() { this.ctx.stop({ success: res => { this.setData({ // state:1 - this.data.state // 0 state: 0, init: true }); console.log('stop success') }, fail: res => { console.log('stop fail') this.setData({ state: -1 }); } }) }, bindResume() { this.ctx.resume({ success: res => { this.setData({ // state:1 - this.data.state // 1 state: 1 }); console.log('resume success') }, fail: res => { console.log('resume fail') this.setData({ state: -1 }); } }) }, bindMute() { this.ctx.mute({ success: res => { this.setData({ mute: !this.data.mute }); console.log('mute success') }, fail: res => { console.log('mute fail') this.setData({ state: -1 }); } }) }, bindFullScreen() { this.ctx.exitFullScreen({ success: res => { console.log('exitFullScreen success') }, fail: res => { console.log('exitFullScreen fail') this.setData({ state: -1 }); } }) }, bindExitFullScreen() { this.ctx.requestFullScreen({ direction: 90, success: res => { console.log('requestFullScreen success') }, fail: res => { console.log('requestFullScreen fail') this.setData({ state: -1 }); } }) }, setSrc(){ this.setData({ liveSrc: "" }); console.log(this.data.liveSrc); this.ctx = null; }, onShow(){ console.log("show~~~~~~"); // setTimeout(() => { // this.bindPlay(); // }, 1000); }, onHide(){ console.log("hide~~~~~~"); this.setData({ liveSrc: "" }); this.bindStop(); } /* 直播相关 end */ })
2018-09-10