- 小程序类型如果不符合live-player 组件的权限要求,有没有替代办法?
[图片] 小程序类型是体育类型,进行直播也是体育类型的直播,但是组件不支持这种类型,请问各位大佬有没有替代办法 ,视频流需要通过连接 WiFi 拿到,WiFi 全程无外网
02-28 - 微信小程序中是否可以直接使用ffmpeg?
有个需求是RTMP协议的视频流,我希望转换为RTMP协议(小程序组件只能使用RTMP协议),请问各位大佬使用ffmpeg 是否可以在小程序里面直接进行协议转换
02-27 - 微信小程序连接无外网Wi-Fi,安卓手机为什么一直报错 12003?
简单复现代码 系统 Android11,微信版本 8.0.42 ios系统可以正常连接 Wi-Fi,但是安卓无法连接 会提示 12003 connectToWifi(selectedWifi: string) { const that = this; // 显示加载中 // iOS 系统的连接处理 if (isIos) { wx.showModal({ title: '请输入Wi-Fi密码', editable: true, // 允许编辑输入 confirmColor: '#d43030', success: function (modalRes) { if (modalRes.confirm) { const password = modalRes.content; // 用户输入的密码 // 启动 Wi-Fi 连接 wx.connectWifi({ forceNewApi: true, SSID: selectedWifi, password: password, success: () => { // 定时器,等待连接结果 let timer = setTimeout(() => { wx.showToast({ title: '连接超时', icon: 'none', duration: 3000 }); that.setData({ isConnected: false }); wx.hideLoading(); }, 3000); // 监听 Wi-Fi 连接成功事件 wx.onWifiConnected((res) => { console.log('监听连接的 Wi-Fi 112行', res); // 清除定时器 clearTimeout(timer); // 检查连接的 Wi-Fi 是否是目标 Wi-Fi if (res.wifi.SSID === selectedWifi) { that.setData({ isConnected: true // 连接成功后显示 web-view }); wx.showToast({ title: '连接成功', icon: 'success' }); wx.hideLoading(); } else { wx.showToast({ title: '连接失败,未连接到目标Wi-Fi', icon: 'none', duration: 3000 }); wx.hideLoading(); } }); }, fail: (err) => { console.error('Wi-Fi连接失败', err); wx.showToast({ title: 'Wi-Fi连接失败', icon: 'none', duration: 3000 }); wx.hideLoading(); // 隐藏加载动画 console.log('Wi-Fi连接失败,隐藏loading'); } }); } } }); } else { // Android 系统的连接处理 wx.showModal({ title: '请输入Wi-Fi密码', editable: true, // 允许编辑输入 confirmColor: '#d43030', success: function (modalRes) { if (modalRes.confirm) { const password = modalRes.content; // 用户输入的密码 wx.showLoading({ title: '正在连接...', mask: true, // 使背景不被点击 }); wx.connectWifi({ SSID: selectedWifi, forceNewApi: true, password: password, success: () => { that.setData({ isConnected: true }); wx.showToast({ title: '连接成功', icon: 'success', duration: 3000 }); wx.hideLoading(); }, fail: (err) => { console.error('Wi-Fi连接失败', err); wx.showToast({ title: 'Wi-Fi连接失败', icon: 'none', duration: 3000 }); wx.hideLoading(); } }); } }, }); } },
01-06