diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/web/apps.html b/assets/web/apps.html index 6a5056d8..812d5588 100644 --- a/assets/web/apps.html +++ b/assets/web/apps.html @@ -14,8 +14,11 @@ {{app.name}} - - + + + @@ -26,62 +29,132 @@
- -
Application Name, as shown on Moonlight
+ +
+ Application Name, as shown on Moonlight +
- -
The file where the output of the command is stored, if it is not - specified, the output is ignored
+ +
+ The file where the output of the command is stored, if it is not + specified, the output is ignored +
-
A list of commands to be run before/after the application.
If any of the - prep-commands fail, starting the application is aborted
+
+ A list of commands to be run before/after the application.
+ If any of the prep-commands fail, starting the application is aborted +
- + - - - + + +
Do Undo
+ + + + + +
- +
-
+
{{c}}
- +
- - + + +
+
+ A list of commands to be run and forgotten about
-
A list of commands to be run and forgotten about
- -
The main application, if it is not specified, a processs is started that - sleeps indefinitely
+ +
+ The main application, if it is not specified, a processs is started + that sleeps indefinitely +
- +
@@ -93,30 +166,32 @@ \ No newline at end of file + diff --git a/assets/web/clients.html b/assets/web/clients.html index c2d03025..5eaf56a4 100644 --- a/assets/web/clients.html +++ b/assets/web/clients.html @@ -1,3 +1,3 @@
-

Clients

-
\ No newline at end of file +

Clients

+ diff --git a/assets/web/config.html b/assets/web/config.html index c14a24b3..9c33df77 100644 --- a/assets/web/config.html +++ b/assets/web/config.html @@ -1,605 +1,886 @@
-

Configuration

-
- - - -
- -
- - -
The name displayed by Moonlight. If not specified, the PC's hostname is used -
-
- -
- - -
The minimum log level printed to standard out
-
- -
- - -
The origin of the remote endpoint address that is not denied access to Web UI -
-
- -
- - -
Automatically configure port forwarding
-
- -
- - -
Automatically configure port forwarding
-
- -
- - -
How long to wait in milliseconds for data from moonlight before shutting down the - stream
-
- -
- -
- -
-
- {{r}} - × -
-
- - -
-
-
-
- -
-
- {{f}} - × -
-
- - -
-
-
-
- The display modes advertised by Sunshine
- Some versions of Moonlight, such as Moonlight-nx (Switch), - rely on this list to ensure that the requested resolutions and fps - are supported. -
-
- -
- - -
-
- It may be possible that you cannot send the Windows Key from Moonlight directly.
- In those cases it may be usefull to make Sunshine think the Right Alt key is the Windows key -
+

Configuration

+
+ + + +
+ +
+ + +
+ The name displayed by Moonlight. If not specified, the PC's hostname + is used
- -
- -
- - -
The private key must be 2048 bits
+
+ +
+ + +
+ The minimum log level printed to standard out +
+
+ +
+ + +
+ The origin of the remote endpoint address that is not denied access to + Web UI +
+
+ +
+ + +
Automatically configure port forwarding
+
+ +
+ + +
Automatically configure port forwarding
+
+ +
+ + +
+ How long to wait in milliseconds for data from moonlight before + shutting down the stream +
+
+ +
+ +
+ +
+
+ {{r}} + ×
- -
- - -
The certificate must be signed with a 2048 bit key
+
+ + +
+
+
+
+ +
+
+ {{f}} + ×
+
+ + +
+
+
+
+ The display modes advertised by Sunshine
+ Some versions of Moonlight, such as Moonlight-nx (Switch), rely on + this list to ensure that the requested resolutions and fps are + supported. +
+
+ +
+ + +
+
+ It may be possible that you cannot send the Windows Key from Moonlight + directly.
+ In those cases it may be usefull to make Sunshine think the Right Alt + key is the Windows key +
+
+ +
+ +
+ + +
The private key must be 2048 bits
+
+ +
+ + +
+ The certificate must be signed with a 2048 bit key +
+
- -
- - -
The file where current state of Sunshine is stored
-
- -
- - -
The file where current apps of Sunshine are stored
-
+ +
+ + +
+ The file where current state of Sunshine is stored
-
- -
- - -
- The back/select button on the controller.
- On the Shield, the home and powerbutton are not passed to Moonlight.
- If, after the timeout, the back button is still pressed down, Home/Guide button press is - emulated.
- If back_button_timeout < 0, then the Home/Guide button will not be emulated
-
-
- -
- - -
- Control how fast keys will repeat themselves
- The initial delay in milliseconds before repeating keys -
-
- -
- - -
- How often keys repeat every second
- This configurable option supports decimals -
-
-
- -
- -
- - -
- The name of the audio sink used for Audio Loopback
- You can find the name of the audio sink using the following command:
-
tools\audio-info.exe
-
-
-
- - -
- The name of the audio sink used for Audio Loopback
- If you do not specify this variable, pulseaudio will select the default monitor device.
-
- You can find the name of the audio sink using either command:
-
pacmd list-sinks | grep "name:"
-
pactl info | grep Source

-
-
- -
- - -
- The virtual sink, is the audio device that's virtual (Like Steam Streaming Speakers), it allows - Sunshine - to stream audio, while muting the speakers. -
-
- -
- - -
- You can select the video card you want to stream:
- The appropriate values can be found using the following command:
-
tools\dxgi-info.exe
-
-
- -
- - -
- You can select the video card you want to stream:
- The appropriate values can be found using the following command:
- tools\dxgi-info.exe

-
-
-
- - -
- xrandr --listmonitors
- Example output: -
   0: +HDMI-1 1920/518x1200/324+0+0 HDMI-1
-
-
-
-
- -
- - -
- Set the familly of ports used by Sunshine -
-
- -
- - -
- Quantitization Parameter
- Some devices may not support Constant Bit Rate.
- For those devices, QP is used instead.
- Higher value means more compression, but less quality
-
-
- -
- - -
- Minimum number of threads used by ffmpeg to encode the video.
- Increasing the value slightly reduces encoding efficiency, but the tradeoff is usually
- worth it to gain the use of more CPU cores for encoding. The ideal value is the lowest
- value that can reliably encode at your desired streaming settings on your hardware. -
-
- -
- - -
- Allows the client to request HEVC Main or HEVC Main10 video streams.
- HEVC is more CPU-intensive to encode, so enabling this may reduce performance when using - software - encoding. -
-
- -
- - -
- Force a specific encoder, otherwise Sunshine will use the first encoder that is available -
-
- -
- - -
- Percentage of error correcting packets per data packet in each video frame.
- Higher values can correct for more network packet loss, but at the cost of increasing bandwidth - usage.
- The default value of 20 is what GeForce Experience uses. -
-
- -
- - -
- When multicasting, it could be useful to have different configurations for each connected - Client. - For example: -
    -
  • Clients connected through WAN and LAN have different bitrate contstraints.
  • -
  • Decoders may require different settings for color
  • -
- Unlike simply broadcasting to multiple Client, this will generate distinct video streams.
- Note, CPU usage increases for each distinct video stream generated -
-
- -
- - -
- Store Username/Password seperately from Sunshine's state file. -
-
- -
- - -
The origin of the remote endpoint address that is not denied for HTTP method /pin -
-
- -
- - -
If no external IP address is given, Sunshine will automatically detect external - IP
-
-
- -
-
- - -
-
- - -
-
- -
- -
- - -
-
- - -
-
- - -
-
- -
- -
- - -
-
- - -
-
- - -
-
-
- +
+ +
+ + +
+ The file where current apps of Sunshine are stored
+
-
Success! Restart Sunshine to apply changes
-
- +
+ +
+ + +
+ The back/select button on the controller.
+ On the Shield, the home and powerbutton are not passed to + Moonlight.
+ If, after the timeout, the back button is still pressed down, + Home/Guide button press is emulated.
+ If back_button_timeout < 0, then the Home/Guide button will not be + emulated
+
+
+ +
+ + +
+ Control how fast keys will repeat themselves
+ The initial delay in milliseconds before repeating keys +
+
+ +
+ + +
+ How often keys repeat every second
+ This configurable option supports decimals +
+
+ +
+ +
+ + +
+ The name of the audio sink used for Audio Loopback
+ You can find the name of the audio sink using the following + command:
+
tools\audio-info.exe
+
+
+
+ + +
+ The name of the audio sink used for Audio Loopback
+ If you do not specify this variable, pulseaudio will select the + default monitor device.
+
+ You can find the name of the audio sink using either command:
+
pacmd list-sinks | grep "name:"
+
pactl info | grep Source
+
+
+
+ +
+ + +
+ The virtual sink, is the audio device that's virtual (Like Steam + Streaming Speakers), it allows Sunshine to stream audio, while muting + the speakers. +
+
+ +
+ + +
+ You can select the video card you want to stream:
+ The appropriate values can be found using the following command:
+
tools\dxgi-info.exe
+
+
+ +
+ + +
+ You can select the video card you want to stream:
+ The appropriate values can be found using the following command:
+ tools\dxgi-info.exe

+
+
+
+ + +
+ xrandr --listmonitors
+ Example output: +
   0: +HDMI-1 1920/518x1200/324+0+0 HDMI-1
+
+
+
+
+ +
+ + +
Set the familly of ports used by Sunshine
+
+ +
+ + +
+ Quantitization Parameter
+ Some devices may not support Constant Bit Rate.
+ For those devices, QP is used instead.
+ Higher value means more compression, but less quality
+
+
+ +
+ + +
+ Minimum number of threads used by ffmpeg to encode the video.
+ Increasing the value slightly reduces encoding efficiency, but the + tradeoff is usually
+ worth it to gain the use of more CPU cores for encoding. The ideal + value is the lowest
+ value that can reliably encode at your desired streaming settings on + your hardware. +
+
+ +
+ + +
+ Allows the client to request HEVC Main or HEVC Main10 video + streams.
+ HEVC is more CPU-intensive to encode, so enabling this may reduce + performance when using software encoding. +
+
+ +
+ + +
+ Force a specific encoder, otherwise Sunshine will use the first + encoder that is available +
+
+ +
+ + +
+ Percentage of error correcting packets per data packet in each video + frame.
+ Higher values can correct for more network packet loss, but at the + cost of increasing bandwidth usage.
+ The default value of 20 is what GeForce Experience uses. +
+
+ +
+ + +
+ When multicasting, it could be useful to have different configurations + for each connected Client. For example: +
    +
  • + Clients connected through WAN and LAN have different bitrate + contstraints. +
  • +
  • Decoders may require different settings for color
  • +
+ Unlike simply broadcasting to multiple Client, this will generate + distinct video streams.
+ Note, CPU usage increases for each distinct video stream generated +
+
+ +
+ + +
+ Store Username/Password seperately from Sunshine's state file. +
+
+ +
+ + +
+ The origin of the remote endpoint address that is not denied for HTTP + method /pin +
+
+ +
+ + +
+ If no external IP address is given, Sunshine will automatically detect + external IP +
+
+
+ +
+
+ + +
+
+ + +
+
+ +
+ +
+ + +
+
+ + +
+
+ + +
+
+ +
+ +
+ + +
+
+ + +
+
+ + +
+
+
+ +
+
+
+ Success! Restart Sunshine to apply changes +
+
+ +
\ No newline at end of file + .ms-item { + background-color: #ccc; + font-size: 12px; + font-weight: bold; + } + diff --git a/assets/web/header-no-nav.html b/assets/web/header-no-nav.html index c6cf6993..4aefc9e8 100644 --- a/assets/web/header-no-nav.html +++ b/assets/web/header-no-nav.html @@ -1,17 +1,23 @@ - - - - - + + + + Sunshine - - - - + + + + - \ No newline at end of file + + diff --git a/assets/web/header.html b/assets/web/header.html index 1c9702e6..6e153e14 100644 --- a/assets/web/header.html +++ b/assets/web/header.html @@ -1,45 +1,62 @@ - - - - - + + + + Sunshine - - - - + + + + - - \ No newline at end of file + + + + diff --git a/assets/web/index.html b/assets/web/index.html index 4b02f845..761f16f3 100644 --- a/assets/web/index.html +++ b/assets/web/index.html @@ -1,9 +1,11 @@
-
-
-

Hello, Sunshine!

-

Sunshine is a Gamestream host for Moonlight

- Official GitHub Repository -
+
+
+

Hello, Sunshine!

+

Sunshine is a Gamestream host for Moonlight

+ Official GitHub Repository
-
\ No newline at end of file +
+
diff --git a/assets/web/password.html b/assets/web/password.html index 3e3f2140..6ad76d5e 100644 --- a/assets/web/password.html +++ b/assets/web/password.html @@ -1,97 +1,133 @@
-

Password Change

-
-
-
-

Current Credentials

-
- - -
 
-
-
- - -
-
-
-

New Credentials

-
- - -
If not specified, the username will not change -
-
-
- - -
-
- - -
-
+

Password Change

+ +
+
+

Current Credentials

+
+ + +
 
-
Error: {{error}}
-
Success! This page will reload soon, your browser will ask you for the new credentials
-
- +
+ +
- +
+
+

New Credentials

+
+ + +
+ If not specified, the username will not change +
+
+
+ + +
+
+ + +
+
+
+
Error: {{error}}
+
+ Success! This page will reload soon, your browser will ask you for + the new credentials +
+
+ +
+
\ No newline at end of file + .buttons { + padding: 1em 0; + } + diff --git a/assets/web/pin.html b/assets/web/pin.html index 89e5b704..4b5fb3be 100644 --- a/assets/web/pin.html +++ b/assets/web/pin.html @@ -1,31 +1,42 @@ -
-

PIN Pairing

-
-
- - -
-
- Warning! Make sure you have access to the client you are pairing with.
- This software can give total control to your computer, so be careful! -
-
-
+

PIN Pairing

+
+
+ + +
+
+ Warning! Make sure you have access to the client you are pairing + with.
+ This software can give total control to your computer, so be careful! +
+
+
\ No newline at end of file + document.querySelector("#form").addEventListener("submit", (e) => { + e.preventDefault(); + let pin = document.querySelector("#pin-input").value; + document.querySelector("#status").innerHTML = ""; + let b = JSON.stringify({ pin: pin }); + fetch("/api/pin", { method: "POST", body: b }) + .then((response) => response.json()) + .then((response) => { + if (response.status) { + document.querySelector( + "#status" + ).innerHTML = ``; + } else { + document.querySelector( + "#status" + ).innerHTML = ``; + } + }); + }); + diff --git a/assets/web/welcome.html b/assets/web/welcome.html index 5570de50..94643f98 100644 --- a/assets/web/welcome.html +++ b/assets/web/welcome.html @@ -1,69 +1,90 @@ -
-
-
-

Welcome to Sunshine!

-

Before Getting Started, write down below these credentials

-
+
+
+
+

Welcome to Sunshine!

+

+ Before Getting Started, write down below these credentials +

-
These Credentials down below are needed to access the rest of the application.
Keep them safe, since you will never see them again!
-
-
- - -
-
- - -
-
- - -
- -
Error: {{error}}
-
Success! This page will reload soon, your browser will ask you for the new credentials
-
-
+
+
+ These Credentials down below are needed to access the rest of the + application.
+ Keep them safe, since you will never see them again! +
+
+
+ + +
+
+ + +
+
+ + +
+ +
Error: {{error}}
+
+ Success! This page will reload soon, your browser will ask you for + the new credentials +
+
\ No newline at end of file + }, + }); +