2 Commits 83e91119a9 ... d67973361e

Author SHA1 Message Date
  kindring d67973361e feat: 265支持检查 1 week ago
  kindring 4ee666ada8 feat: 国际化文本调整 1 week ago

+ 1 - 0
src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java

@@ -39,6 +39,7 @@ public class VManageBootstrap extends SpringBootServletInitializer {
 	public static void main(String[] args) {
 		logger.info("start");
 		VManageBootstrap.args = args;
+		logger.info("启动参数: {}", args);
 		VManageBootstrap.context = SpringApplication.run(VManageBootstrap.class, args);
 		GitUtil gitUtil1 = SpringBeanFactory.getBean("gitUtil");
 		logger.info("--------------------------------------------------");

+ 2 - 2
web_src/src/assets/i18/lang/en-us.js

@@ -154,8 +154,8 @@ export default {
         rePush: "Re-push Stream",
         asyncSuccess: "async success",
         getPushListFail: "Failed to get push list",
-        channelList: "Channel List",
-        channelCount: "Channel Count",
+        channelList: "List",
+        channelCount: "Count",
         channel: "Channel",
         channelId: "Channel ID",
         channelName: "Channel Name",

+ 8 - 8
web_src/src/components/CreateLib.vue

@@ -4,7 +4,7 @@
       <div class="page-title">
         <el-button icon="el-icon-top" size="mini" style="font-size: 20px; color: #000;" type="text" @click="toBack" ></el-button>
         <el-divider direction="vertical"></el-divider>
-        创建ai库
+        {{ $t('aiManager.data.operator.add') }}
       </div>
       <div class="page-header-btn">
       </div>
@@ -12,13 +12,13 @@
     <el-container v-loading="isLoading" style="min-height: 82vh;flex-direction: column;" >
       <el-card  class="box-card mt-5">
         <div slot="header" class="card-header flex space-between align-center" >
-          <span>输入ai库配置</span>
+          <span>{{ $t('aiManager.data.title') }}</span>
         </div>
         <div class="box-center">
           <div class="line">
-            <div class="label">算法类型</div>
+            <div class="label">{{ $t('aiManager.data.type') }}</div>
             <div class="input">
-              <el-select v-model="aiTypeVal"  placeholder="请选择">
+              <el-select v-model="aiTypeVal"  :placeholder="$t('pleaseSelect')">
                 <el-option
                   v-for="item in aiTypeArr"
                   :key="item.val"
@@ -31,9 +31,9 @@
           </div>
 
           <div class="line">
-            <div class="label">ai库名称</div>
+            <div class="label">{{ $t('aiManager.data.name') }}</div>
             <div class="input">
-              <el-input placeholder="ai库的名称" v-model="libraryName"/>
+              <el-input :placeholder="$t('aiManager.data.name')" v-model="libraryName"/>
             </div>
           </div>
 
@@ -41,8 +41,8 @@
 
         <el-divider></el-divider>
         <el-button-group>
-          <el-button @click="init">重置</el-button>
-          <el-button @click="submitData()" type="primary">确认添加</el-button>
+          <el-button @click="init">{{ $t('refresh') }}</el-button>
+          <el-button @click="submitData()" type="primary">{{ $t('save') }}</el-button>
         </el-button-group>
       </el-card>
     </el-container>

+ 2 - 2
web_src/src/components/DeviceList.vue

@@ -61,7 +61,7 @@
           </el-select>
         </template>
       </el-table-column>
-      <el-table-column prop="channelCount" :label="$t('device.manufacturer')" min-width="120" >
+      <el-table-column prop="channelCount" :label="$t('device.channelCount')" min-width="120" >
       </el-table-column>
       <el-table-column :label="$t('state')" min-width="120">
         <template slot-scope="scope">
@@ -278,7 +278,7 @@ export default {
       this.$confirm(msg, 'tips', {
         dangerouslyUseHTMLString: true,
         confirmButtonText: this.$t('confirm'),
-        cancelButtonText: this.$t('channel'),
+        cancelButtonText: this.$t('cancel'),
         center: true,
         type: 'warning'
       }).then(() => {

+ 9 - 8
web_src/src/components/GBRecordDetail.vue

@@ -148,8 +148,17 @@ import h265WebJessibuca from "@components/common/h265webJessibuca.vue";
 import H265WebJs from "@components/common/h265webJs.vue";
 import {webrtcEvent} from "@/map/eventMap";
 import {strFill} from "@/until/str";
+import {checkWebrtcHevcSupport} from "../until/browser";
 
 const playList = [
+  {
+    key: "webrtc",
+    text: "webrtc 播放器",
+    description: "延迟较低的播放器,需要浏览器支持",
+    support: checkWebrtcHevcSupport()? ['h264', 'h265'] : ['h264'],
+    audioSupport: ['opus', 'pcma', 'pcmu'],
+    disable: false
+  },
   {
     key: "jessibuca",
     text: "265 jessibuca播放器",
@@ -158,14 +167,6 @@ const playList = [
     audioSupport: ['aac'],
     disable: false
   },
-  {
-    key: "webrtc",
-    text: "webrtc 播放器",
-    description: "延迟较低的播放器,需要浏览器支持",
-    support: ['h264'],
-    audioSupport: ['opus', 'pcma', 'pcmu'],
-    disable: false
-  },
 ];
 const playerProtocol = {
   webrtc: ["rtc", "rtcs"],

+ 2 - 1
web_src/src/components/com/livePlayBox.vue

@@ -11,13 +11,14 @@ import copy from "@/until/copy";
 import {webrtcEvent} from "@/map/eventMap";
 import {computeMediaStyle} from "@/until/dom";
 import * as domTool from "@/until/dom";
+import {checkWebrtcHevcSupport} from "../../until/browser";
 
 const playList = [
   {
     key: "webrtc",
     text: "webrtc 播放器",
     description: "延迟较低的播放器,需要浏览器支持",
-    support: ['h264', 'h265'],
+    support: checkWebrtcHevcSupport()? ['h264', 'h265'] : ['h264'],
     disable: false
   },
   {

+ 6 - 3
web_src/src/components/dialog/deviceEdit.vue

@@ -22,8 +22,8 @@
           <el-form-item :label="$t('password')" prop="password">
             <el-input type="password" v-model="form.password" clearable></el-input>
           </el-form-item>
-          <el-form-item :label="$t('video.media.server')" prop="mediaServerId">
-            <el-select v-model="form.mediaServerId" style="float: left; width: 100%" >
+          <el-form-item :label="$t('video.media.server')"  prop="mediaServerId">
+            <el-select v-model="form.mediaServerId" :placeholder="$t('pleaseSelect')" style="float: left; width: 100%" >
               <el-option key="auto" :label="$t('video.media.autoSelect')" value="auto"></el-option>
               <el-option
                 v-for="item in mediaServerList"
@@ -35,7 +35,10 @@
           </el-form-item>
 
           <el-form-item :label="$t('audio.encode')" prop="audioEncodePt">
-            <el-select v-model="audioEncodePt" multiple @change="audioChangeHandle" style="float: left; width: 100%" >
+            <el-select v-model="audioEncodePt" multiple @change="audioChangeHandle"
+                       :placeholder="$t('pleaseSelect')"
+                       style="float: left; width: 100%"
+            >
               <el-option
                 v-for="item in audioEncodeArr"
                 :key="item.val"

+ 77 - 0
web_src/src/until/browser.js

@@ -0,0 +1,77 @@
+export function checkWebrtcHevcSupport() {
+    let h265Supported = false;
+    try {
+        const codecs = RTCRtpSender.getCapabilities('video').codecs;
+        let codecsFound = new Set();
+        
+
+        codecs.forEach(codec => {
+            if (!['video/red', 'video/ulpfec', 'video/rtx'].includes(codec.mimeType)) {
+                codecsFound.add(codec.mimeType.replace('video/', '').toUpperCase());
+                if (codec.mimeType.toLowerCase().includes('h265')) {
+                    h265Supported = true;
+                }
+            }
+        });
+
+        // Check Chrome version
+        let chromeVersion = null;
+        let isChrome = false;
+        const userAgent = navigator.userAgent;
+        
+        if (userAgent.includes('Chrome/') && !userAgent.includes('Edg/')) {
+            isChrome = true;
+            const match = userAgent.match(/Chrome\/(\d+)/);
+            if (match) {
+                chromeVersion = parseInt(match[1]);
+            }
+        }
+        return h265Supported;
+
+
+    } catch (error) {
+        console.error(error);
+        return h265Supported;
+    }
+}
+
+
+function BorwserIsEdge(userAgent = window.navigator.userAgent)
+{
+    return /Edge/.test(userAgent) || /Edg/.test(userAgent);
+}
+
+function BrowserIsChrome(userAgent = window.navigator.userAgent)
+{
+    return /chrome/i.test(userAgent) && !BorwserIsEdge(userAgent);
+}
+
+function BrowserIsSafari(userAgent = window.navigator.userAgent)
+{
+    return /safari/i.test(userAgent) && !BorwserIsEdge(userAgent); 
+}
+
+function BrowserIsFirefox(userAgent = window.navigator.userAgent)
+{
+    return /firefox/i.test(userAgent) ; 
+}
+
+function BrowserIsOpera(userAgent = window.navigator.userAgent)
+{
+    return /opr\//i.test(userAgent); 
+}
+
+function BorwserIsMobile(userAgent = window.navigator.userAgent)
+{
+    return /mobile/i.test(userAgent); 
+}
+
+function BrowserIsIeWin7(userAgent = window.navigator.userAgent)
+{
+    return /Windows NT 6.1/i.test(userAgent) && /rv:11/i.test(userAgent); 
+}
+
+function BrowserIsOldSafari(userAgent = window.navigator.userAgent)
+{
+    return BrowserIsSafari(userAgent) && (/Version\/8/i.test(userAgent) || /Version\/9/i.test(userAgent)); 
+}