兼容低内核版本的浏览器
This commit is contained in:
+53
-21
@@ -32,11 +32,17 @@ const INPUT_OPTION_DEFS: IOOptionDef[] = [
|
||||
{
|
||||
index: 0,
|
||||
icon: (
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" className="w-7 h-7">
|
||||
<rect x="8" y="6" width="8" height="12" rx="1.5" />
|
||||
<line x1="10" y1="6" x2="10" y2="4" />
|
||||
<line x1="14" y1="6" x2="14" y2="4" />
|
||||
</svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 24 24">
|
||||
<path d="M0 0h24v24H0z" fill="none" />
|
||||
<g fill="none">
|
||||
<path d="M3 12h18v9H3zm2-9h14v9H5z" />
|
||||
<g stroke="currentColor" stroke-width="2">
|
||||
<path d="M3 12h18v9H3zm16 0H5V3h14z" />
|
||||
<path d="M9 7.496h.004V7.5H9zm6 0h.004V7.5H15z" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
),
|
||||
},
|
||||
{
|
||||
@@ -76,15 +82,41 @@ const INPUT_OPTION_DEFS: IOOptionDef[] = [
|
||||
},
|
||||
{
|
||||
index: 5,
|
||||
icon: (
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 16 16">
|
||||
<path d="M0 0h16v16H0z" fill="none" />
|
||||
<g fill="currentColor">
|
||||
<path d="M2.5 7a.5.5 0 0 0 0 1h11a.5.5 0 0 0 0-1z" />
|
||||
<path d="M1 5a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h.293l.707.707a1 1 0 0 0 .707.293h10.586a1 1 0 0 0 .707-.293l.707-.707H15a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1zm0 1h14v3h-.293a1 1 0 0 0-.707.293l-.707.707H2.707L2 9.293A1 1 0 0 0 1.293 9H1z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
),
|
||||
},
|
||||
{
|
||||
index: 6,
|
||||
icon: (
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" className="w-7 h-7">
|
||||
<rect x="3" y="8" width="18" height="10" rx="1.5" />
|
||||
<line x1="7" y1="8" x2="7" y2="18" />
|
||||
<line x1="12" y1="8" x2="12" y2="18" />
|
||||
<line x1="17" y1="8" x2="17" y2="18" />
|
||||
<circle cx="12" cy="12" r="8" />
|
||||
<circle cx="12" cy="12" r="3" fill="currentColor" stroke="none" />
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
index: 7,
|
||||
icon: (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 24 24">
|
||||
<path d="M0 0h24v24H0z" fill="none" />
|
||||
<g fill="currentColor">
|
||||
<path d="M10 4.5h1v2h-1zm4 0h-1v2h1z" />
|
||||
<path fill-rule="evenodd" d="M7 8.5v-7h10v7h2v11a3 3 0 0 1-3 3H8a3 3 0 0 1-3-3v-11zm2-5h6v5H9zm8 7H7v9a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1z" clip-rule="evenodd" />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
const OUTPUT_OPTION_DEFS: IOOptionDef[] = [
|
||||
@@ -108,16 +140,6 @@ const OUTPUT_OPTION_DEFS: IOOptionDef[] = [
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
index: 2,
|
||||
icon: (
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" className="w-7 h-7">
|
||||
<path d="M3 18v-6a9 9 0 0 1 18 0v6" />
|
||||
<path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3z" />
|
||||
<path d="M3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z" />
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
index: 3,
|
||||
icon: (
|
||||
@@ -129,10 +151,20 @@ const OUTPUT_OPTION_DEFS: IOOptionDef[] = [
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
index: 2,
|
||||
icon: (
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" className="w-7 h-7">
|
||||
<path d="M3 18v-6a9 9 0 0 1 18 0v6" />
|
||||
<path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3z" />
|
||||
<path d="M3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z" />
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
const FALLBACK_INPUT_LABELS = ["USB-B", "USB-C", "同轴", "光纤", "蓝牙", "IIS"];
|
||||
const FALLBACK_OUTPUT_LABELS = ["XLR", "RCA", "耳机", "XLR/RCA"];
|
||||
const FALLBACK_INPUT_LABELS = ["USB-B", "USB-C", "同轴", "光纤", "蓝牙", "HDMI-EARC", "RCA", "USB Driver"];
|
||||
const FALLBACK_OUTPUT_LABELS = ["XLR", "RCA", "XLR/RCA", "耳机"];
|
||||
|
||||
function withLabels(defs: IOOptionDef[], labels: string[] | undefined, fallback: string[]): IOOption[] {
|
||||
return defs.map((def, i) => ({
|
||||
|
||||
Reference in New Issue
Block a user