From d0d315c38b540972505c35962e496d93c8c1cbd6 Mon Sep 17 00:00:00 2001 From: xNyapAe3 Date: Sat, 16 Nov 2024 15:16:26 +0800 Subject: [PATCH] Console: Add HTTP server port input box --- trunk/research/console/js/srs.console.js | 8 +++++--- trunk/research/console/views/connect.html | 6 ++++++ trunk/research/console/views/connect_en.html | 6 ++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/trunk/research/console/js/srs.console.js b/trunk/research/console/js/srs.console.js index 7639d606c7..9a66e76622 100644 --- a/trunk/research/console/js/srs.console.js +++ b/trunk/research/console/js/srs.console.js @@ -79,12 +79,14 @@ scApp.controller("CSCConnect", ["$scope", "$location", "MSCApi", "$sc_utility", $scope.server = { schema: $sc_server.schema, ip: $sc_server.host, - port: $sc_server.port + port: $sc_server.port, + http: $sc_server.http }; $scope.connect = function(){ $sc_server.schema = $scope.server.schema; $sc_server.host = $scope.server.ip; $sc_server.port = $scope.server.port; + $sc_server.http = $scope.server.http; MSCApi.versions_get(function(data){ $sc_utility.log("trace", "连接到SRS" + $scope.server.ip + "成功, SRS/" + data.data.version); @@ -571,9 +573,8 @@ scApp.filter('sc_filter_style_error', function(){ scApp.filter('sc_filter_preview_url', ['$sc_server', function($sc_server){ return function(v){ var page = $sc_server.schema + `://${$sc_server.host}:${$sc_server.http}/players/srs_player.html`; - var http = $sc_server.http[$sc_server.http.length - 1]; var query = "vhost=" + v.owner.name + "&app=" + v.app + "&stream=" + v.name + ".flv"; - query += "&server=" + $sc_server.host +"&port=" + http + "&autostart=true&schema=" + $sc_server.schema; + query += "&server=" + $sc_server.host +"&port=" + $sc_server.http + "&autostart=true&schema=" + $sc_server.schema; return v? page+"?" + query:"javascript:void(0)"; }; }]); @@ -674,6 +675,7 @@ scApp.provider("$sc_server", [function(){ query['schema'] = self.schema; query['host'] = self.host; query['port'] = self.port; + query['http'] = self.http; var queries = []; for (var key in query) { diff --git a/trunk/research/console/views/connect.html b/trunk/research/console/views/connect.html index 2bb451cfb9..de5ef665db 100644 --- a/trunk/research/console/views/connect.html +++ b/trunk/research/console/views/connect.html @@ -27,6 +27,12 @@ +
+ +
+ +
+
diff --git a/trunk/research/console/views/connect_en.html b/trunk/research/console/views/connect_en.html index 9d8d6b235d..ae5c2b3f1a 100644 --- a/trunk/research/console/views/connect_en.html +++ b/trunk/research/console/views/connect_en.html @@ -27,6 +27,12 @@
+
+ +
+ +
+