Commit af14cecb by qlintonger xeno

添加内容+6

parent c897b3ae
export const WebRTCNetworkQualityLevelCN = [
'未知', '很好', '好', '较好', '一般', '较差', '很差'
]
\ No newline at end of file
import {ref} from "vue" import {computed, ref} from "vue"
import {WebRTCNetworkQualityLevelCN} from "AnyR/constants/webrtcRelated.js";
export const webrtcStates = ref({ export const webrtcStates = ref({
cameraDeviceSet: [], cameraDeviceSet: [],
networkQuality: {}, networkQuality: {
up: 0, down: 0
},
currentUsingCameraName: "", currentUsingCameraName: "",
isCameraAttached: false, isCameraAttached: false,
isMicroAttached: false, isMicroAttached: false,
}) })
export const NetworkQualityLevel = computed(function () {
const min = Math.min(webrtcStates.value.networkQuality.down, webrtcStates.value.networkQuality.down);
return {
level: min, label: WebRTCNetworkQualityLevelCN[min]
};
})
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<a-col :span="12"> <a-col :span="12">
<div class="flex items-center p-1.5 leading-7"> <div class="flex items-center p-1.5 leading-7">
<global-icon icon="wifi" :size="16"></global-icon> <global-icon icon="wifi" :size="16"></global-icon>
<span class="text-xs ml-1 text-theme-text2">网络状态良好</span> <span class="text-xs ml-1 text-theme-text2">网络状态{{NetworkQualityLevel.label}}</span>
</div> </div>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
...@@ -59,6 +59,7 @@ import VideoItem from './videoItem.vue' ...@@ -59,6 +59,7 @@ import VideoItem from './videoItem.vue'
import ChatDetails from './chatDetails.vue' import ChatDetails from './chatDetails.vue'
import {webrtcStates} from "AnyR/states/webrtcStates"; import {webrtcStates} from "AnyR/states/webrtcStates";
import {chatChannelState} from "AnyR/states/chatChannelStates"; import {chatChannelState} from "AnyR/states/chatChannelStates";
import {NetworkQualityLevel} from "AnyR/states/webrtcStates";
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.chat-list { .chat-list {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment