Skip to content

Commit

Permalink
- Separate frontend URL from API server URL
Browse files Browse the repository at this point in the history
- Improve README
- Improve Authorization replay contents.
- Add app info and oss info to settings dialog.
- Fix security issue that name displaying label accepts any format (such as html)
  • Loading branch information
hanatyan128 committed Nov 23, 2024
1 parent dc7d894 commit 0a218a0
Show file tree
Hide file tree
Showing 13 changed files with 988 additions and 686 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ endif()
if(DEFINED ENV{API_WS_SERVER})
add_compile_definitions(API_WS_SERVER="$ENV{API_WS_SERVER}")
endif()
if(DEFINED ENV{FRONTEND_SERVER})
add_compile_definitions(FRONTEND_SERVER="$ENV{FRONTEND_SERVER}")
endif()
if(DEFINED ENV{CLIENT_ID})
add_compile_definitions(CLIENT_ID="$ENV{CLIENT_ID}")
endif()
Expand Down
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ Please download latest install package from [Release](https://github.com/OPENSPH

Then add/remove as many sources as you want to receive from one guest (e.g. 2 sources for a webcam and a game screen).

2. By default, you are registered as a member of the receiver, but this is mainly for testing purposes, so you can delete or disable it (click the eye icon) if you do not need it (you can also send and receive yourself, but the video may loop).
2. **Basically, the host doesn't need to register as a member with the receiver.**

If you wish to register yourself as a member for testing purposes, you may do so.
You can also send and receive yourself, but the video may loop.
Refer to the guest's instructions on how to stream the video.

3. Install the SRC-Link plugin in OBS Studio [Download here](https://github.com/OPENSPHERE-Inc/src-link/releases)

Expand Down Expand Up @@ -197,8 +201,11 @@ Please download latest install package from [Release](https://github.com/OPENSPH

次にゲスト1人から受信したいインプット数分だけソースを追加/削除します(例: ウェブカメラとゲーム画面なら 2 個)

2. 初期状態で自分自身がレシーバーにメンバー登録されていますが、これは主にテスト用途なので、
不要なら削除するか無効化(眼アイコンをクリック)してください(自分で送信して自分で受信することもできますが映像がループする場合があります)
2. **基本的に、ホストはレシーバーにメンバー登録する必要はありません。**

テストの目的で自分自身を登録したい場合は、そのようにできます。
自分で送信して自分で受信することもできますが映像がループする場合があります。
映像の送信方法は [ゲストの手順](#ゲスト向け) を参照してください。

3. OBS Studio に SRC-Link プラグインをインストールします [ダウンロードはこちら](https://github.com/OPENSPHERE-Inc/src-link/releases)

Expand Down Expand Up @@ -295,7 +302,7 @@ This plugin is developed under [obs-plugintemplate](https://github.com/obsprojec

## Using Open Source Libraries

- [Qt6](https://www.qt.io/)
- [O2 (OAuth client)](https://github.com/pipacs/o2)
- [Font Awesome](https://fontawesome.com/)
- [Qt6 + Qt WebSockets](https://www.qt.io/)
- [o2](https://github.com/pipacs/o2) (Qt based OAuth2 client)
- [Font Awesome](https://fontawesome.com) Free 6.7.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.
- [OBS Studio](https://obsproject.com/)
1 change: 1 addition & 0 deletions build-windows-installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ $OutputName = "${ProductName}-${ProductVersion}-windows-x64"

$Env:API_SERVER = "https://replaceYourApiServer"
$Env:API_WS_SERVER = "wss://replaceYourApiServer"
$Env:FRONTEND_SERVER = "https://replaceYourFrontendServer"
$Env:CLIENT_ID = "replaceYourClientId"
$env:CLIENT_SECRET = "replaceYourClientSecret"
$env:SCHEMA_DEBUG = "true"
Expand Down
4 changes: 3 additions & 1 deletion data/locale/en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Interlock="Interlock"
NoReceiver="No Receiver"
LocalSource="Video Source"
Status="Status"
ForceDisconnectOtherClients="Force disconnect other clients (if connected)"
ForceDisconnectOtherClients="Force disconnect other clients"
DownlinkSettings="Downlink Settings"
AdvancedSettings="Advanced Settings"
UDPListenPortRange="UDP Port Range for listen"
Expand All @@ -83,3 +83,5 @@ SRCLinkControlPanel="Control Panel"
Manage="Manage"
SignupSRCLinkControlPanel="Signup SRC-link Control Panel"
PrivateIPForLAN="Private IP for LAN connection"
AppInfo="SRC-Link Plugin ver%1 developed by <a href='https://opensphere.co.jp'>OPENSPHERE Inc.</a>"
OpenSourceLibraries="Open Source Libraries"
4 changes: 3 additions & 1 deletion data/locale/ja-JP.ini
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Interlock="連動"
NoReceiver="レシーバーがありません"
LocalSource="映像ソース"
Status="ステータス"
ForceDisconnectOtherClients="他のクライアントを強制切断する(接続がある場合)"
ForceDisconnectOtherClients="他のクライアントを強制切断する"
DownlinkSettings="ダウンリンク設定"
AdvancedSettings="詳細設定"
UDPListenPortRange="待ち受け UDP ポート範囲"
Expand All @@ -83,3 +83,5 @@ SRCLinkControlPanel="コントロールパネル"
Manage="管理"
SignupSRCLinkControlPanel="SRC-link コントロールパネルにサインアップ"
PrivateIPForLAN="LAN接続用のプライベートIP"
AppInfo="SRC-Link Link ver%1 は <a href='https://opensphere.co.jp'>OPENSPHERE Inc.</a> により開発されました"
OpenSourceLibraries="オープンソースライブラリ"
57 changes: 53 additions & 4 deletions data/oauth-reply-en-US.html

Large diffs are not rendered by default.

58 changes: 54 additions & 4 deletions data/oauth-reply-ja-JP.html

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions data/oss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Qt6 + Qt WebSockets https://www.qt.io/

o2 (Qt based OAuth2 client) https://github.com/pipacs/o2

Font Awesome Free 6.7.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.

OBS Studio https://obsproject.com/
11 changes: 10 additions & 1 deletion src/UI/egress-link-connection-widget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
</font>
</property>
<property name="text">
<string>Connection name</string>
<string/>
</property>
<property name="textFormat">
<enum>Qt::TextFormat::PlainText</enum>
</property>
</widget>
</item>
Expand Down Expand Up @@ -83,6 +86,12 @@
<property name="text">
<string>Description</string>
</property>
<property name="textFormat">
<enum>Qt::TextFormat::PlainText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
Expand Down
20 changes: 16 additions & 4 deletions src/UI/egress-link-dock.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>518</width>
<height>575</height>
<width>320</width>
<height>454</height>
</rect>
</property>
<property name="minimumSize">
Expand All @@ -34,6 +34,12 @@
</property>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="minimumSize">
<size>
<width>320</width>
<height>400</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Shape::NoFrame</enum>
</property>
Expand All @@ -54,8 +60,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>518</width>
<height>521</height>
<width>320</width>
<height>400</height>
</rect>
</property>
<layout class="QVBoxLayout" name="scrollAreaLayout">
Expand Down Expand Up @@ -127,6 +133,9 @@
<property name="text">
<string/>
</property>
<property name="textFormat">
<enum>Qt::TextFormat::PlainText</enum>
</property>
<property name="margin">
<number>0</number>
</property>
Expand Down Expand Up @@ -214,6 +223,9 @@
<property name="text">
<string/>
</property>
<property name="textFormat">
<enum>Qt::TextFormat::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
</property>
Expand Down
15 changes: 15 additions & 0 deletions src/UI/settings-dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#include <QImageReader>
#include <QMessageBox>
#include <QNetworkInterface>
#include <QFile>

#include "../utils.hpp"
#include "../plugin-support.h"
#include "settings-dialog.hpp"

#define OSS_INFO_FILE "oss.md"

SettingsDialog::SettingsDialog(SRCLinkApiClient *_apiClient, QWidget *parent)
: QDialog(parent),
ui(new Ui::SettingsDialog),
Expand Down Expand Up @@ -85,6 +88,18 @@ SettingsDialog::SettingsDialog(SRCLinkApiClient *_apiClient, QWidget *parent)
ui->egressLinkSettingsLabel->setText(QTStr("UplinkSettings"));
ui->ssIntervalLabel->setText(QTStr("ScreenshotInterval"));
ui->privateIpLabel->setText(QTStr("PrivateIPForLAN"));
ui->authorLabel->setText(QTStr("AppInfo").arg(PLUGIN_VERSION));
ui->ossLabel->setText(QTStr("OpenSourceLibraries"));

// Read oss info markdown
QString ossInfoFile =
QString("%1/%2").arg(obs_get_module_data_path(obs_current_module())).arg(QTStr(OSS_INFO_FILE));
QFile ossInfoContent(ossInfoFile);
if (!ossInfoContent.open(QIODevice::ReadOnly)) {
obs_log(LOG_ERROR, "Failed to read OSS info Markdown: %s", qUtf8Printable(ossInfoFile));
} else {
ui->ossTextBrowser->setMarkdown(ossInfoContent.readAll());
}

obs_log(LOG_DEBUG, "SettingsDialog created");
}
Expand Down
Loading

0 comments on commit 0a218a0

Please sign in to comment.