Skip to content

Commit

Permalink
Changes made by ndriqimlahu (found on my local repo)
Browse files Browse the repository at this point in the history
ndriqimlahu repo is not available anymore, i managed to save few changes he made
  • Loading branch information
OneLiberty committed Nov 17, 2023
1 parent b929bb2 commit 7e19783
Show file tree
Hide file tree
Showing 12 changed files with 313 additions and 279 deletions.
134 changes: 69 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,85 @@
# Moonlight for Tizen
An easy method for building Moonlight for Samsung TV
## About
[Moonlight for Tizen](https://moonlight-stream.org) is an open source client for NVIDIA GameStream and [Sunshine](https://github.com/LizardByte/Sunshine).

## Credits
- Moonlight developers: https://moonlight-stream.org
- Samsung developers: https://github.com/SamsungDForum/moonlight-chrome
- This Dockerfile and support files have been adapted from [jellyfin-docker-tizen](https://github.com/babagreensheep/jellyfin-tizen-docker)
- Dockerfile readapted for my repository tizen from [pablojrl123](https://github.com/pablojrl123/moonlight-tizen-docker)

## Using the prebuilt Docker image
1. Enable developer mode on the TV (more information on [official Samsung guide](https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/tv-device.html)):
- Go to Apps.
- Press `12345` on the remote; a dialog should pop up.
- Set `Developer mode` to `On`; fill in the IP of the Docker host.
- Power off and power on the TV as instructed; go once again to Apps.
- Depending on your model, a "DEVELOP MODE" or similar message might appear.

2. Deploy the application to the TV:
- Run and enter a container; the container will be removed automatically on exit:
```
docker run -it --rm ghcr.io/kyrofrcode/moonlight-chrome-tizen:samsung_wasm
```
- Connect to your TV over Smart Development Bridge:
```sh
sdb connect YOUR_TV_IP
```
- Confirm that you are connected, take note of the device ID:
```
sdb devices
```
The device ID will be the last column, something like `UE65NU7400`.
- Install the package:
```sh
tizen install -n MoonlightWasm.wgt -t DEVICE_ID
```
Moonlight should now appear in your Recent Apps - or similar page - on your TV.
- Exit the container:
```sh
exit
```
- (Optional) Remove the Docker image:
```sh
docker image rm ghcr.io/kyrofrcode/moonlight-chrome-tizen:samsung_wasm
```
Moonlight for Tizen allows you to stream your full collection of games from your powerful desktop to your Samsung Smart TV running Tizen OS 5.5 or more.

Check out the [Moonlight wiki](https://github.com/moonlight-stream/moonlight-docs/wiki) for more detailed project information, setup guide, or troubleshooting steps.

## Getting Started

Starting with the project, you should first take a look at the required [Prerequisites](https://github.com/ndriqimlahu/moonlight-chrome-tizen#prerequisites) and then follow the [Installation](https://github.com/ndriqimlahu/moonlight-chrome-tizen#installation) instructions in order to successfully install Moonlight on your Samsung Smart TV.

### Prerequisites

## Building the Docker image from source
1. Enable developer mode on the TV using the steps from the previous section
Before building this application, you must have [Windows Subsystem for Linux (WSL 2)](https://learn.microsoft.com/en-us/windows/wsl/install-manual) and [Docker Desktop](https://docs.docker.com/desktop/) installed on your computer.

2. Build the application within a Docker image:
Also, you should run "Docker Desktop" before proceeding further and it is also recommended to close any software or application that requires high CPU and memory resources, because "Docker Desktop" will take high resources during use.

### Installation
1. Enable the "Developer mode" in your "Samsung Smart TV" (If you need more detailed instructions, see the official [Samsung guide](https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/tv-device.html)):
- Go to the `Apps` panel.
- Press `12345` on the remote and a dialog should popup.
- Set `Developer mode` to `On` and fill in the `Host PC IP` field which is the `IP Address` of your PC, then click the `OK` button to close the dialog.
- Restart the TV by holding the power button for 2 seconds as instructed by the new dialog popup, then again go to the `Apps` panel.
- Depending on your model, a `DEVELOP MODE` or similar message will appear in the `Apps` panel at the top of the screen.
2. After that, in `Windows PowerShell`, enter the following command to launch the "Docker" image:
```
docker build -t moonlight-tizen .
docker run -it --rm ghcr.io/kyrofrcode/moonlight-chrome-tizen:samsung_wasm
```
This will take a while.

3. Deploy the application to the TV:
- Run and enter a container; the container will be removed automatically on exit:
- This operation may take a while, please be patient.
3. After that, in `Windows PowerShell`, follow the steps below to install the application on your TV:
```
docker run -it --rm moonlight-tizen
- Next, enter the following command to connect to your "Samsung Smart TV" over "Smart Development Bridge":
```
- Connect to your TV over Smart Development Bridge:
```sh
sdb connect YOUR_TV_IP
```
- Confirm that you are connected, take note of the device ID:
> Note: Replace `YOUR_TV_IP` with `IP Address` of your TV.
- Next, enter the following command to confirm that you are connected, then take note of the "Device ID":
```
sdb devices
```
The device ID will be the last column, something like `UE65NU7400`.
- Install the package:
```sh
tizen install -n MoonlightWasm.wgt -t DEVICE_ID
> Note: Just to clarify "Device ID" will be the last column, something like `UE55AU7172UXXH`.
- Next, enter the following command to install the package:
```
tizen install -n Moonlight.wgt -t YOUR_DEVICE_ID
```
> Note: Replace `YOUR_DEVICE_ID` with `Device ID` of your TV.
- After that, Moonlight should now appear in your `Recent Apps` or similar page on your "Samsung Smart TV".
- Next, enter the following command to exit the container:
```
Moonlight should now appear in your Recent Apps - or similar page - on your TV.
- Exit the container:
```sh
exit
```
- (Optional) Remove the Docker image:
```sh
docker image rm moonlight-tizen
> Note: At the end you can enter the `exit` command to close the `Windows PowerShell` window.
```
4. (Optional) Disable the "Developer mode" in your "Samsung Smart TV":
- Go to the `Apps` panel.
- Press `12345` on the remote and a dialog should popup.
- Set `Developer mode` to `Off` and then click the `OK` button to close the dialog.
- Restart the TV by holding the power button for 2 seconds as instructed by the new dialog popup, then again go to the `Apps` panel.
- Depending on your model, a `DEVELOP MODE` or similar message will disappear from the `Apps` panel at the top of the screen.
5. Now you can launch Moonlight on your TV, then add your host computer and enjoy the high quality streaming experience.

### Updating

1. Before updating the Moonlight app, you must delete the installed Moonlight app that you already have on your Samsung Smart TV to prevent errors during the update.
2. Now, whenever you want to install an updated version of Moonlight on your Samsung Smart TV, you need to follow the [Installation](https://github.com/kyrofrcode/moonlight-chrome-tizen#installation) instructions in order to successfully install the updated version of Moonlight on your Samsung Smart TV.

## Changelogs

See the [CHANGELOG](https://github.com/kyrofrcode/moonlight-chrome-tizen/blob/samsung_wasm/CHANGELOG.md) file for more information about the changes for each version of this project.

## Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this project better, then feel free to fork the repo, create a pull request or open an issue.

Also, if you liked the project or found it useful, don't forget to give the project a star!


## Credits
- Moonlight for Chrome OS is developed and maintained by [Moonlight Developers](https://github.com/moonlight-stream/moonlight-chrome)
- Moonlight for Tizen is based on Chrome OS version which was then adapted and powered by [Samsung Developers](https://github.com/SamsungDForum/moonlight-chrome)
- Support files and Dockerfile have been adapted by [jellyfin](https://github.com/jellyfin/jellyfin-tizen) and [babagreensheep](https://github.com/babagreensheep/jellyfin-tizen-docker)
- Dockerfile have been readapted by [pablojrl123](https://github.com/pablojrl123/moonlight-tizen-docker)
- Some content files have been readapted by [ndriqimlahu]
Binary file modified icons/icon32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ <h5 id="naclSpinnerMessage"></h5>
<h3 class="mdl-dialog__title">Pairing</h3>
<div class="mdl-dialog__content">
<p id="pairingDialogText">
Please enter the number XXXX on the GFE dialog on the computer. This dialog will be dismissed once complete
Please enter the following PIN on the target PC: XXXX<br><br>
If your host PC is running Sunshine, navigate to the Sunshine web UI to enter the PIN.<br>
Alternatively, navigate to the GeForce Experience (NVIDIA GPUs only) to enter the PIN.<br><br>
This dialog will close once the pairing is complete.
</p>
</div>
<div class="mdl-dialog__actions">
Expand Down
2 changes: 1 addition & 1 deletion static/css/material.min.css

Large diffs are not rendered by default.

101 changes: 72 additions & 29 deletions static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,19 @@ body {
}
span.mdl-layout-title {
font-weight: 300;
font-size: 24px;
}
span.mdl-layout-title > span {
font-weight: 900;
font-size: 24px;
color: #00A3C6;
}

.mdl-layout__header-row {
padding: 0 80px 0 80px;
}

main {
padding: 0 80px 0 80px;
}

@media screen and (max-width: 600px) {
#host-grid .mdl-card {
flex-basis: 50% !important;
Expand All @@ -36,7 +35,6 @@ main {
width: 75px !important;
}
}

@media screen and (min-width: 600px) and (max-width: 800px) {
#host-grid .mdl-card {
flex-basis: 33% !important;
Expand All @@ -46,7 +44,6 @@ main {
width: 112.5px !important;
}
}

@media screen and (min-width: 800px) and (max-width: 1024px) {
main {
padding: 0 72px 0 72px !important;
Expand All @@ -62,14 +59,12 @@ main {
width: 150px !important;
}
}

@media screen and (min-width: 1024px) {
#game-grid .mdl-card {
height: 300px !important;
width: 225px !important;
}
}

.nav-menu-parent {
position: relative;
margin: 0 4px;
Expand All @@ -80,10 +75,14 @@ main {
}
.mdl-menu__item {
color: white;
font-size: 14px;
}
.mdl-menu__item:hover {
background-color: #00A3C6;
}
.mdl-tooltip {
font-size: 12px;
}
#bitrateField {
width: 100px;
height: 36px;
Expand All @@ -93,7 +92,6 @@ main {
.bitrateMenu {
width: 170px;
}

.mdl-button {
color: #fff !important;
}
Expand All @@ -113,23 +111,28 @@ main {
cursor: pointer;
}
.mdl-dialog {
width: 400px;
width: 500px;
background-color: #333846;
color: white;
}
.mdl-dialog__title {
padding: 24px 24px 0;
padding: 24px 24px 14px;
margin: 0;
font-size: 2.5rem;
}
.mdl-dialog__content {
padding: 20px 24px 24px 24px;
padding: 20px 24px 14px 24px;
color: rgba(255, 255, 255, 0.90);
}
.mdl-dialog__actions button {
width: 100%;
}
.mdl-textfield__input {
width: 152%;
border-bottom: 1px solid rgba(255, 255, 255, 0.90);
}
.mdl-textfield__label {
font-size: 1.1rem;
color: rgba(255, 255, 255, 0.90);
}
#naclSpinner {
Expand Down Expand Up @@ -199,9 +202,13 @@ main {
}
#host-grid .mdl-card__title .mdl-card__title-text {
width: 100%;
font-size: 14px;
font-size: 16px;
padding: 10px 15px;
background-color: rgba(0,0,0,0.7);
justify-content: center;
}
#host-grid .mdl-shadow--4dp {
box-shadow: unset;
}
#game-grid .mdl-card img {
height: 100%;
Expand All @@ -217,7 +224,7 @@ main {
position: absolute;
bottom: 0;
min-height: 20px;
font-size: 13px;
font-size: 14px;
font-weight: 300;
padding: 5px 0;
width: 100%;
Expand All @@ -230,13 +237,19 @@ main {
}
.add-host-card > .mdl-card__title {
color: #fff;
background:
url('../res/ic_add_to_queue_white_48px.svg') center no-repeat #3E4454;
background: url('../res/ic_add_to_queue_white_48px.svg') center no-repeat #3E4454;
}
.host-container > .mdl-card__title {
color: #fff;
background:
url('../res/ic_tv_white_48px.svg') center no-repeat #3E4454;
background: url('../res/ic_tv_white_48px.svg') center no-repeat #3E4454;
}
.mdl-card.hovered {
background-color: initial;
transform: scale(1.1);
outline-color: #00A3C6;
}
.hovered {
background-color: rgba(158,158,158,.2);
}
#host-grid p {
margin: 0;
Expand Down Expand Up @@ -322,17 +335,47 @@ main {
.cancel-current .game-title {
color: #fff;
}

.hovered {
background-color: rgba(158,158,158,.2);
#pairingDialogText, #quitAppDialogText,
#deleteHostDialogText, #terminateMoonlightDialogText {
font-size: 1.1rem;
}

.mdl-card.hovered {
background-color: initial;
transform: scale(1.1);
outline-color: #00A3C6;
#continueAddHost {
width: 48%;
}
#cancelAddHost {
width: 48%;
margin: 0 10px 20px 0;
}
#continueDeleteHost {
width: 48%;
}
#cancelDeleteHost {
width: 48%;
margin: 0 10px 20px 0;
}
#cancelPairingDialog {
margin: 0 10px 20px 0;
}
#continueQuitApp {
width: 48%;
}
#cancelQuitApp {
width: 48%;
margin: 0 10px 20px 0;
}
#exitTerminateMoonlight {
width: 48%;
}
#cancelTerminateMoonlight{
width: 48%;
margin: 0 10px 20px 0;
}
#continueAddHost:focus, #cancelAddHost:focus,
#continueDeleteHost:focus, #cancelDeleteHost:focus,
#cancelPairingDialog:focus, #removeHostButton:focus,
#backIcon:focus, #quitCurrentApp:focus,
#continueQuitApp:focus, #cancelQuitApp:focus,
#exitTerminateMoonlight:focus, #cancelTerminateMoonlight:focus {
background-color: #404354;
box-shadow: rgba(0, 163, 198, 1) 0px 0px 2px 4px;
}

#host-grid .mdl-shadow--4dp {
box-shadow: unset;
}
Loading

0 comments on commit 7e19783

Please sign in to comment.