临时群,声音

This commit is contained in:
fengge 2026-07-06 12:45:28 +08:00
parent cc73549ebd
commit e9147b1527
2 changed files with 63 additions and 0 deletions

View File

@ -238,6 +238,7 @@
<button class="btn ptt-btn ptt-action-btn" style="background: #0ea5e9;" onclick="pttGetCurrentGroup()">当前群组</button>
<button class="btn ptt-btn ptt-action-btn btn-orange" onclick="pttForceRelease()" disabled>强制释放</button>
<button class="btn ptt-btn ptt-action-btn" style="background: #000; color: #fca5a5;" onclick="pttSimulateConflict()" disabled>模拟冲突</button>
<button class="btn ptt-btn ptt-action-btn" style="background: #10b981;" onclick="queryTempGroupId()">查询临时群 GID</button>
</div>
<div id="ptt-result" class="log-container" style="background: #0f172a; margin-top: 10px; height: 120px;">
@ -1143,6 +1144,24 @@
showPttResult("已发送 AT 指令: " + cmd);
}
}
// 注册临时群锁定回调
window.startPullGroupLock = function(gid) {
showPttResult("收到临时群锁定回调 startPullGroupLock, GID: " + gid);
};
window.endPullGroupLock = function() {
showPttResult("收到临时群解锁回调 endPullGroupLock");
};
function queryTempGroupId() {
if (window.android && window.android.getTempGroupId) {
var gid = window.android.getTempGroupId();
showPttResult("当前在临时群的 GID: " + (gid || "无"));
} else {
showPttResult("接口 getTempGroupId 不可用");
}
}
</script>
</body>
</html>

View File

@ -106,6 +106,50 @@
android:textSize="22sp"
android:textStyle="bold" />
<!-- 视频拉动信息区域 (默认隐藏,只有成功获取到数据才展示) -->
<LinearLayout
android:id="@+id/ll_pull_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:layout_marginTop="8dp"
android:visibility="gone">
<TextView
android:id="@+id/tv_pull_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_pull_source_unit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:textColor="#CCFFFFFF"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_pull_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:textColor="#99FFFFFF"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_pull_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:textColor="#FFD700"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 分隔线 -->
<View
android:layout_width="60dp"