Skip to content

Commit

Permalink
onlineServiceAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
xifangczy committed Aug 2, 2024
1 parent 5516657 commit d926a38
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 8 deletions.
6 changes: 6 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -809,5 +809,11 @@
},
"invokeApp": {
"message": "Invoke application"
},
"onlineServiceAddress": {
"message": "Online Service Address"
},
"withinChina": {
"message": "Within China"
}
}
6 changes: 6 additions & 0 deletions _locales/zh_CN/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -809,5 +809,11 @@
},
"invokeApp": {
"message": "调用程序"
},
"onlineServiceAddress": {
"message": "在线服务地址"
},
"withinChina": {
"message": "中国境内"
}
}
6 changes: 6 additions & 0 deletions _locales/zh_TW/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -809,5 +809,11 @@
},
"invokeApp": {
"message": "呼叫應用"
},
"onlineServiceAddress": {
"message": "在線服務地址"
},
"withinChina": {
"message": "中國境內"
}
}
14 changes: 9 additions & 5 deletions css/options.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ body {
}
.wrapper {
margin: 0 auto;
width: 640px;
/* width: 640px; */
width: 45rem;
}
/* .wrapper input {
margin-left: 10px;
Expand Down Expand Up @@ -123,6 +124,9 @@ input.regex {
.item .switch {
margin-right: 50px;
}
.item .switchSelect{
margin-right: 85px;
}
.optionsTitle {
margin-top: 20px;
}
Expand Down Expand Up @@ -237,8 +241,8 @@ textarea {
#PlayerTemplate {
width: 200px;
}
#autoClearMode {
width: 100px;
.select {
width: 8rem;
}
#errorTsList p {
color: red;
Expand Down Expand Up @@ -354,9 +358,9 @@ textarea {
.m3u8DL{
margin-right: 70px !important;
}
.m3u8DL #m3u8dl{
/* .m3u8DL #m3u8dl{
width: 8rem;
}
} */
.break-all {
word-break: break-all;
}
Expand Down
10 changes: 8 additions & 2 deletions js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ G.OptionLists = {
M3u8StreamSaver: false,
M3u8Ffmpeg: true,
M3u8AutoClose: false,
// 第三方服务地址
onlineServiceAddress: 0,
};
// 本地储存的配置
G.LocalVar = {
Expand Down Expand Up @@ -150,11 +152,15 @@ G.scriptList.set("webrtc.js", { key: "webrtc", refresh: true, allFrames: true, w
G.ffmpegConfig = {
tab: 0,
version: 1,
url: "https://ffmpeg.bmmmd.com/",
get url() {
return G.onlineServiceAddress == 0 ? "https://ffmpeg.bmmmd.com/" : "https://ffmpeg2.bmmmd.com/";
}
}
// streamSaver 边下边存
G.streamSaverConfig = {
url: "https://stream.bmmmd.com/mitm.html"
get url() {
return G.onlineServiceAddress == 0 ? "https://stream.bmmmd.com/mitm.html" : "https://stream2.bmmmd.com/mitm.html";
}
}

// 正则预编译
Expand Down
12 changes: 11 additions & 1 deletion options.html
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ <h1 class="optionsTitle" data-i18n="otherSettings"></h1>

<div class="item">
<div data-i18n="clearOption"></div>
<div class="switch">
<div class="switch switchSelect">
<select id="autoClearMode" class="select" save="select">
<option value="0" data-i18n="doNotClear"></option>
<option value="1" data-i18n="normalClear"></option>
Expand All @@ -549,6 +549,16 @@ <h1 class="optionsTitle" data-i18n="otherSettings"></h1>
</div>
</div>

<div class="item">
<div data-i18n="onlineServiceAddress"></div>
<div class="switch switchSelect">
<select id="onlineServiceAddress" class="select" save="select">
<option value="0" data-i18n="withinChina"></option>
<option value="1">cloudflare</option>
</select>
</div>
</div>

<div class="item">
<div data-i18n="defaultPopup"></div>
<div class="popupAttr">
Expand Down

0 comments on commit d926a38

Please sign in to comment.