更新记录
1.0.0(2025-08-30)
平台兼容性
uni-app(4.66)
Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
√ |
√ |
- |
- |
- |
- |
- |
12 |
× |
微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
快应用-华为 |
快应用-联盟 |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
uni-app x(4.66)
Chrome |
Safari |
Android |
iOS |
鸿蒙 |
微信小程序 |
- |
- |
- |
12 |
× |
- |
温馨提示 如何调用插件
import {
push,
stop
} from "@/uni_modules/yuange-recordpush"
开始录屏推流
let ret = push(
1280, //分辨率宽度
720, //分辨率高度
"rtmp://192.168.31.12:1935/live/livestream" //rtmp推流地址
);
console.log(ret);
停止推流
let ret = stop();
console.log(ret);
iOS开发后台配置App Groups,内容填写如下(申请证书前要配置好)
group.yuange.pushlive
配置ios-extension.json,内容填写如下,并申请两个iOS证书文件(注意包名要一致),放在指定目录(nativeResources/ios),参考预览图
{
"Recoder.appex": {
"identifier": "com.yuange.uniapp.pushlive.recorder",
"profile": "ios-pushliveRecorder.mobileprovision"
},
"RecoderSetupUI.appex": {
"identifier": "com.yuange.uniapp.pushlive.recorderui",
"profile": "ios-pushliveRecorderui.mobileprovision"
}
}
Demo示例
<template>
<button @click="push_" class="button">开始录屏推流</button>
<button @click="stop_" class="button">停止推流</button>
</template>
<script>
import {
push,
stop
} from "@/uni_modules/yuange-recordpush"
export default {
data() {
return {
msg: ""
}
},
onLoad() {
},
methods: {
push_() {
let ret = push(
"1280",
"720",
"rtmp://192.168.31.12:1935/live/livestream");
console.log(ret);
},
stop_() {
let ret = stop();
console.log(ret);
}
}
}
</script>
<style>
.title {
font-size: 36rpx;
color: black;
}
.button {
background-color: dodgerblue;
color: white;
}
</style>
操作注意事项