更新记录
v2.0(2025-09-25)
1、无需打洞无需配置 stun 服务,真正做到无网运行 私有部署
2、简单的配置,即可实现复杂的功能,通过底层RTC传输做到毫秒级延时
3、更新支持uniapp原生代码插件生成h5,无缝连接做到h5代码可带视频+声音播放
4、更新开始播放控制
5、更新暂停播放控制
6、更新声音/静音控制
7、更新音量大小控制
8、更新自动横/竖屏控制
9、支持更换加载Logo
平台兼容性
其他
webrtc 原生态插件快直播超低延时<=200毫秒 集成标签仅需几行代码即可
主要功能介绍 根据域名授权使用
1、无需打洞无需配置 stun 服务,真正做到无网运行 私有部署
2、简单的配置,即可实现复杂的功能,通过底层RTC传输做到毫秒级延时
3、更新支持uniapp原生代码插件生成h5,无缝连接做到h5代码可带视频+声音播放
4、更新开始播放控制
5、更新暂停播放控制
6、更新声音/静音控制
7、更新音量大小控制
8、更新自动横/竖屏控制
9、支持更换加载Logo
uniapp代码集成方式
主要代码对接方式
插件代码在ibl-rtc目录下demo.vue是使用案例
<template>
<view class="content">
<ibl-rtc
ref="player"
webrtcUrl="https://www.xxxxx.com"
posterImage="/static/logo.png"
@status="onStatusChange"
style="height: 400px;"
/>
<button @click="startPlay">开始播放</button>
<button @click="stopPlay">停止播放</button>
<button @click="pauseSound">打开声音
</button><button @click="pauseMute">关闭声音</button>
<button @click="pauseVolume">设置音量0.5</button>
</view>
</template>
<script>
import iblRtc from "@/pages/components/ibl-rtc/ibl-rtc.vue";
export default {
components: { iblRtc },
methods: {
startPlay() {
this.$refs.player.start();
},
stopPlay() {
this.$refs.player.stop();
},
//设置音量
pauseVolume(){
this.$refs.player.pauseVolume(0.5);
},
//关闭声音
pauseMute() {
this.$refs.player.volMute();
},
//打开声音
pauseSound() {
this.$refs.player.volSound();
},
onStatusChange(msg) {
console.log("播放器状态:", msg);
uni.showToast({
title: msg,
icon: "none",
});
},
},
onHide: function() {
console.log("onHide...");
},
onUnload: function() {
this.$refs.player.stop();
console.log("onUnload...");
},
created: function(){
console.log("created...");
},
mounted: function(){
this.startPlay();
},
beforeDestroy:function(){
console.log("beforeDestroy...");
},
destroyed: function(){
console.log("destroyed...");
}
};
</script>
平台兼容 uni-app 支持接入方式如下
Vue2 |
Vue3 |
Nvue |
H5 |
web |
√ |
√ |
√ |
√ |
√ |
运行支持环境 APP(ios、android、鸿蒙,PC)
Chrome |
Safari |
IE |
Web |
微信 |
Firefox |
√ |
√ |
√ |
√ |
√ |
√ |