jellyfin / jellyfin-tizen

Jellyfin Samsung TV Client
https://jellyfin.org
928 stars 72 forks source link

Support for Tizen 2.4 #19

Open samuel9554 opened 4 years ago

samuel9554 commented 4 years ago

I don't know if that have been asked before. I've tried to build for my Samsung Tv running Tizen 2.4. Everything work fine but when I start the apps on the TV I just got a black screen. Probably the Chrome version is too old on it. Do we have a solution for older Tizen device?

dmitrylyzo commented 4 years ago

It was, but I didn't get feedback.

I suppose you are trying master branch of jellyfin-web. I cannot guarantee, but this may help:

diff --git a/webpack.dev.js b/webpack.dev.js
index beca8ea4f..687e3d6b7 100644
--- a/webpack.dev.js
+++ b/webpack.dev.js
@@ -14,7 +14,7 @@ module.exports = merge(common, {
         rules: [
             {
                 test: /\.js$/,
-                exclude: /node_modules[\\/](?!query-string)/,
+                exclude: /node_modules[\\/](?!query-string|split-on-first|strict-uri-encode)/,
                 loader: "babel-loader"
             },
             {
diff --git a/webpack.prod.js b/webpack.prod.js
index 80d40f345..59d988fa9 100644
--- a/webpack.prod.js
+++ b/webpack.prod.js
@@ -7,7 +7,7 @@ module.exports = merge(common, {
         rules: [
             {
                 test: /\.js$/,
-                exclude: /node_modules[\\/](?!query-string)/,
+                exclude: /node_modules[\\/](?!query-string|split-on-first|strict-uri-encode)/,
                 loader: "babel-loader"
             },
             {

Apply patch to jellyfin-web (from jellyfin-web folder)

patch -p1 < saved_patchfile_from_post

This is what I noted during webOS 2 test.

samuel9554 commented 4 years ago

So what I did step by step.

Git clone https://github.com/jellyfin/jellyfin-tizen.git Git clone https://github.com/jellyfin/jellyfin-web.git

Change in webpack.dev.js and webpack.prod.js the line exclude: /node_modules[\\/](?!query-string)/, to exclude: /node_modules[\\/](?!query-string|split-on-first|strict-uri-encode)/,

cd jellyfin-web yarn install cd jellyfin-tizen JELLYFIN_WEB_DIR=../jellyfin-web/dist yarn install

tizen.bat build-web -e ".*" -e gulpfile.js -e README.md -e "node_modules/*" -e "package*.json" -e "yarn.lock"

change in .buildresult\config.xml <tizen:application id="AprZAARz4r.Jellyfin" package="AprZAARz4r" required_version="3.0"/> to <tizen:application id="AprZAARz4r.Jellyfin" package="AprZAARz4r" required_version="2.4"/> tizen.bat package -t wgt -o . -- .buildResult tizen.bat install -n Jellyfin.wgt -t NAME_TV

The install was successful but again I have a black screen and nothing loading.

dmitrylyzo commented 4 years ago

It's bad that Samsung does not have an emulator for Tizen 2.x

I looked at UserAgent string for Tizen 2.4 and it probably uses WebKit like webOS 2. This also speaks of WebKit.

Here is another fix https://github.com/jellyfin/jellyfin-web/pull/1119 But webOS 2 is still not good.

HimbeersaftLP commented 4 years ago

It's bad that Samsung does not have an emulator for Tizen 2.x

It'd also be helpful if Tizen Studio wouldn't crash every time I try launch this program in debug mode on my Tizen 2 TV. Does Samsung even test their stuff?!

samuel9554 commented 4 years ago

Also I just realized that they won't even support CSS Flex... And what I remember to have work a little bit on the jellyfin-web repo is that we use it everywhere. So I'm starting to think that this would just be impossible. Only solution I can think of is to build a apps in C in tizen studio and use the api for those older device.

dmitrylyzo commented 4 years ago

Also I just realized that they won't even support CSS Flex...

flex might work with prefix -webkit- (which should be added automatically by babel in master jf-web branch). But looking on webOS 2 I am not sure now.

bebbenhorst commented 4 years ago

Hi I need Tizen 2.3 for installing jellyfin.wgt on my 2015 UJU7000 tv 15TV_STANDARD1

I got unknown platform when I try to connect.

But I cannot find the right files for it, on the samsung site I dont see any download files for 2.3

dmitrylyzo commented 4 years ago

@bebbenhorst try to change required_version in this line https://github.com/jellyfin/jellyfin-tizen/blob/0e98d1c605cce4bee91bf9d1cbdafc5a86df08c2/config.xml#L4

Jellyfin is currently working on WebOS 2 emulator, so there is a good chance that Tizen 2.4 (or even 2.3) will work too.

dmitrylyzo commented 4 years ago

I am writing here to be closer to "2.4"

@bebbenhorst wrote https://github.com/jellyfin/jellyfin-tizen/issues/1#issuecomment-629783584: I'm connected but i get unknown platform in device manager, I use the newest Tizen studio, and i also cannot right mouse button click to permit install applications

For reference https://developer.tizen.org/forums/sdk-ide/device-manager-unknown-platform

There is no guarantee, but maybe you have to install TV-Extensions-3.1.2 I heard somewhere that it supports 2 (https://medium.com/@ibazzva/developing-for-old-samsung-tvs-in-tizen-studio-2-x-5aa3f853db09)

TV-Extensions-3.1.2 can be taken here https://developer.samsung.com/smarttv/develop/tools/tv-extension/archive.html

bebbenhorst commented 4 years ago

I installed the tv extentions image

But in the studio I cannot select it image

on the inscrutions in here they are talking about tizen studio 2.X I only found studio 3.7 from the website

dmitrylyzo commented 4 years ago

But in the studio I cannot select it

Same. I installed it for emulator 3.0, and it works - enough for me. But what does device manager show now?

bebbenhorst commented 4 years ago

Same. I installed it for emulator 3.0, and it works - enough for me. But what does device manager show now?

what is the meaning of emulator? just to test things? In Device Manager is still showing the same thing , I'm connected but unknown platform and unable to permit installation. Is there no other way to get tizen studio 2.X , download link or installation folder from someone?

If it is possible I want to deploy the wgt file to the tv but if this isn't possible due to old tizen version its unfortunate.

dmitrylyzo commented 4 years ago

what is the meaning of emulator? just to test things?

Yes. For example, I don't have Tizen 5 TV but can test app in emulator. I installed TV-Extensions-3 to get emulator with Tizen 3. But I didn't find emulator for 2.x and have no TV with it.

I found something https://stackoverflow.com/a/47706212

Could you try to build WGT with Tizen certificate and just install it on TV (skip Permit install...)?

HimbeersaftLP commented 4 years ago

Both the latest tizen studio and tv extensions work on my first gen Tizen tv, however you will need to create a Samsung developer certificate with a Tizen distributor certificate instead of both being Samsung.

bebbenhorst commented 4 years ago

I Just created an wgt with an samsung developer certificate and the default tizen distributor certificate.

When I try to install I get the following message:

$ tizen.bat install -n Jellyfin.wgt -t UJU7000 Transferring the package... Transferred the package: C:\nieuw\web\jellyfin-tizen\Jellyfin.wgt -> /opt/usr/apps/tmp Installing the package...

Platform log view

install AprZAARz4r.Jellyfin

packet_path /opt/usr/apps/tmp/Jellyfin.wgt

install app, app_id[AprZAARz4r.Jellyfin], packet_path[/opt/usr/apps/tmp/Jellyfin.wgt], install_path[]

app_id[AprZAARz4r.Jellyfin] installing[3]

app_id[AprZAARz4r.Jellyfin] installing[23]

app_id[AprZAARz4r.Jellyfin] installing[26]

app_id[AprZAARz4r.Jellyfin] installing[34]

app_id[AprZAARz4r.Jellyfin] install failed[PKGMGR_ERROR]

spend time for wascmd is [13148]ms

cmd_ret:0 Failed to install Tizen application. Total time: 00:01:03.158

This settings I got image

Is the DUID maybe not right? I got it from my tv , menu, support ,contact samsung then Unique ID : XTCC2KSD57A4W

dmitrylyzo commented 4 years ago

Try to remove second distributor (leave only tizen-distributor-signer). Or create second profile: Samsung author + Tizen distributor (Public).

Currently, I am confused: I am able to install WGT with such profile, but DUID is not specified in this case. But I own Tizen 4 cert-1

Also, Permit to install application is probably not required.

  1. You don't need to execute 'Permit to install applications'. 'Permit to install applications' is used to copy your mail-received certification to TV. If you use local certification, it is not needed. from here
bebbenhorst commented 4 years ago

Did remove the second Distributer Certificate and kept the tizen distributer signer but the same result: app_id[AprZAARz4r.Jellyfin] install failed[PKGMGR_ERROR]

thanks for your help btw

dmitrylyzo commented 4 years ago

I forgot to mention: you should rebuild WGT after you change profile

bebbenhorst commented 4 years ago

I just did rebuild it with the new certificates but still get the error:(

app_id[AprZAARz4r.Jellyfin] install failed[PKGMGR_ERROR]

dmitrylyzo commented 4 years ago

I already posted this link somewhere https://developer.youi.tv/latest/Content/Tizen_DevTopics/H1BuildingInstallingAppWidgets.htm#Installa

PKGMGR_ERROR If the application is already installed on a 2015 TV, try uninstalling it first. If you are installing a Samsung signed widget to a 2015 TV, try re-signing it with a Tizen certificate instead.

Also, how much free space on TV you have? Jellyfin is big because of fonts (38-39MB)

And what firmware version?

bebbenhorst commented 4 years ago

I tried to install again and cleaned my jellyfin web and tizen folder and created everything again.

created my own author placed an password on it and then created an new tizen certificate.

removed the samsung distributor from the first one and added the tizen one.

created the wgt file Author certficate: C:\Users\bebbenhorst\SamsungCertificate\tizen-cert\author.p12 Distributor1 certificate : C:\tizen-directory\tools\certificate-generator\certificates\distributor\tizen-distributor-signer.p12

but still the same pkgmgr_error

Also I downloaded the newest firmware for the tv 1.550 but the tv was allready on the newest.

If I read the discription it says use tizen certificate instead of samsung but that is what I did. Maybe im doing something wrong?

Is it possible to ask someone else to create the certificate so i can import them to test?

TV space is like 1 gb in use and 3 in space

dmitrylyzo commented 4 years ago

Just to be sure, please check again required_version in jellyfin-tizen/config.xml. Should be 2.3.

<tizen:application id="AprZAARz4r.Jellyfin" package="AprZAARz4r" required_version="2.3"/>

What else can be done? Unplugging TV from power.

Also I downloaded the newest firmware for the tv 1.550 but the tv was allready on the newest.

Installation via USB was available until 1412 (I read somewhere). So not an option.

TV space is like 1 gb in use and 3 in space

:drooling_face: my NU7400 cannot provide much free space

bebbenhorst commented 4 years ago

@dmitrylyzo Thanks a million! When I eddited the config file to 2.3 it worked with installing :)

samuel9554 commented 4 years ago

@dmitrylyzo Thanks a million! When I eddited the config file to 2.3 it worked with installing :)

Are you able to use the application on the tv? Or you get black screen?

bebbenhorst commented 4 years ago

It is working in the tv , got normaal screen and van play movie ect

samuel9554 commented 4 years ago

Guys we need to build a steep by steep for me also. My tv is a 2.4

bebbenhorst commented 4 years ago

What I did was following the instructions in the wiki , and instead of Samsung certificate I replaced it with An Tizen certificate. Further I changed the application required_version to 2.3 and build it.

dmitrylyzo commented 4 years ago

Guys we need to build a steep by steep for me also. My tv is a 2.4

Wait a bit, jellyfin-web seems broken - I will make a quick PR. As an experiment, try NOT to install TV-extensions-3 first - it probably need for debugging.

dmitrylyzo commented 4 years ago

OK. Now jf-web should work until next module migration :stuck_out_tongue:

About certificate for Tizen 2.3/2.4. We ended on Samsung author + Tizen distributor (Public = default), as mentioned https://github.com/jellyfin/jellyfin-tizen/issues/19#issuecomment-629816880 There is a small chance that you can use both Tizen (author + distributor). This doesn't work for Tizen 4, but who knows.

Then as usual with one extra step. For Linux

  1. Clone jellyfin-web
  2. yarn install in jellyfin-web
  3. Clone jellyfin-tizen
  4. JELLYFIN_WEB_DIR=../jellyfin-web/dist yarn install in jellyfin-tizen
  5. Change required_version to 2.3 in config.xml <- extra step
  6. Build WGT
HimbeersaftLP commented 4 years ago

I tried on my Tizen 2.3 TV from 2015 and it just displays a gray/black screen when I launch it. However I added -e "*.woff2" to the build-web command to save space, could this have broken it?

dmitrylyzo commented 4 years ago

could this have broken it?

I tried on Tizen 3 emulator without any "woff2" - 404 error, but works.

What jellyfin-web commit do you use? git log, then top hash.

HimbeersaftLP commented 4 years ago

e3cef950f71934576ef729b287d94d908121b536

dmitrylyzo commented 4 years ago

e3cef950f71934576ef729b287d94d908121b536

This commit created a dependency loop - now fixed. Just checked current master (https://github.com/jellyfin/jellyfin-web/commit/e32df64c9f5c5c8ff67180039c0d04451f441a04) - works on WebOS 2 (this is almost 100% that it will work on Tizen 2.4)

Also, we fixed the dropdown menus in TV layout.

bebbenhorst commented 4 years ago

Great work , so should we rebuild the wgt and install it to update?

dmitrylyzo commented 4 years ago

Great work , so should we rebuild the wgt and install it to update?

If you want fixed dropdown menus.

What is your problem with subtitles? If they are ASS, we probably need to add enableSsaRender: true here https://github.com/jellyfin/jellyfin-tizen/blob/0e98d1c605cce4bee91bf9d1cbdafc5a86df08c2/tizen.js#L91 like this

return profileBuilder({ enableMkvProgressive: false, enableSsaRender: true });

There are two identical blocks, don't miss: need getDeviceProfile

bebbenhorst commented 4 years ago

The subtitels are just not showing, external srt Is there something i can provide like an log file?

But first id like to get the updated version to see if the subtitels maybe are working then

HimbeersaftLP commented 4 years ago

This commit created a dependency loop - now fixed. Just checked current master (jellyfin/jellyfin-web@e32df64) - works on WebOS 2 (this is almost 100% that it will work on Tizen 2.4)

Also, we fixed the dropdown menus in TV layout.

Thanks, it works now!

robert-wm commented 4 years ago

For me (using a Tizen 2.4 UE60KS7090 TV) it only works on the first application start. Browsing and watching movies works fine.

Exiting the app and restarting it, it shows the first Jellyfin startpage with no content. None of the remote keys are working except the back button which quits the application.

btw: i was using jellyfin-web master branch, commit c14f72342d56bda904136b3fa8f1fffa67717055

On a second TV (Tizen 3 UE55MU8009) it works fine.

fruhnow commented 4 years ago

For me (using a Tizen 2.4 UE60KS7090 TV) it only works on the first application start. Browsing and watching movies works fine.

Exiting the app and restarting it, it shows the first Jellyfin startpage with no content. None of the remote keys are working except the back button which quits the application.

btw:

i was using jellyfin-web master branch, commit c14f72342d56bda904136b3fa8f1fffa67717055

On a second TV (Tizen 3 UE55MU8009) it works fine.

I can confirm this for Tizen 2.4

dmitrylyzo commented 4 years ago

Since I don't have Tizen 2.4, I built a bundled version of WebOS app to mimic Tizen app (WebOS 2 uses WebKit like Tizen 2.4). It loads after exit normally.

Better if someone could run debugging from Tizen Studio. This may require to install TV-Extensions-3.1.2. Alternatively, someone could use method described here https://github.com/jellyfin/jellyfin-web/issues/1102#issuecomment-616075036 Comment out (or delete) DEBUG block to suppress DEBUG output after applying patch.

var console_debug = console.debug;
console.debug = function(message) {
    append('DEBUG: ', message);
    console_debug.apply(console, arguments);
};
HimbeersaftLP commented 4 years ago

Debugging works fine with the latest tv extensions on the sample clock app. But the Jellyfin App is apparently to big or complex so that Tizen Studio shits itself when you try to build it and I haven't found a way to debug an already installed app.

dmitrylyzo commented 4 years ago

But the Jellyfin App is apparently to big or complex so that Tizen Studio shits itself when you try to build it

If you have created project from repo, uncheck node_modules in package properties (Properties/Tizen Studio/Package). tizen_studio-1

Or you can import WGT as project.

Also, I had a problem to run debug (even in emulator) until I converted project type to tv-samsung-5.5. This may also be required. tizen_studio-2 tizen_studio-3

robert-wm commented 4 years ago

with that on-screen debugging the error seems to be:

....../maintabmanager.js?=25.1: undefined TypeError: 'undefined' is not a function (evaluating tabsElem.selectedIndex(selectedIndex))

dmitrylyzo commented 4 years ago

....../maintabmanager.js?=25.1: undefined TypeError: 'undefined' is not a function (evaluating tabsElem.selectedIndex(selectedIndex))

Hmm, this error was at the beginning of WebOS 1/2 support. Since WebKit doesn't have native CustomElements, it is polyfilled, but became async. Element emby-tabs wasn't called in time, so this error occurs. Then this fix was used https://github.com/jellyfin/jellyfin-web/blob/320d5e37e9d0a02f02de8a75db962659377eb2ec/src/components/maintabsmanager.js#L169

Is any error before this one? In advance, these are not errors: error checking ScrollToOptions support error checking 'key' field

robert-wm commented 4 years ago

The first error i get is: ERROR: isUdPanelSupported() error code = undefined followed by the the two "errors" you mentioned. Then a little bit later the next error i get is the error in maintabmanager.js

robert-wm commented 4 years ago

sometimes i also get: ....../maintabmanager.js?=25.1: undefined TypeError: 'undefined' is not a function (evaluating tabsElem.selectedIndex(index))

instead of ....../maintabmanager.js?=25.1: undefined TypeError: 'undefined' is not a function (evaluating tabsElem.selectedIndex(selectedIndex))

dmitrylyzo commented 4 years ago

The first error i get is: ERROR: isUdPanelSupported() error code = undefined followed by the the two "errors" you mentioned. Then a little bit later the next error i get is the error in maintabmanager.js

This occurs on Tizen 3 as well and is not related. It probably affects on max video bitrate, and now every Tizen are UHD, i.e. unlimited.

sometimes i also get: ....../maintabmanager.js?=25.1: undefined TypeError: 'undefined' is not a function (evaluating tabsElem.selectedIndex(index))

instead of ....../maintabmanager.js?=25.1: undefined TypeError: 'undefined' is not a function (evaluating tabsElem.selectedIndex(selectedIndex))

Errors are from here https://github.com/jellyfin/jellyfin-web/blob/320d5e37e9d0a02f02de8a75db962659377eb2ec/src/components/maintabsmanager.js#L234 https://github.com/jellyfin/jellyfin-web/blob/320d5e37e9d0a02f02de8a75db962659377eb2ec/src/components/maintabsmanager.js#L253

At these points, tabs element is supposed to be already constructed, but it is not.

I wonder why everything works on first run.

T-bond commented 3 years ago

The problem still occurs with ~10.7 RC 1~ 10.8.5. A workaround is to use the Jellyfin app on your phone / browser, connect to the running app on the TV with the Screen cast button, and set Display mirroring on, and navigate to a media file for example. After this, the app on the TV should work without an issue, until closed. You have to do this dance with a phone or another browser app every time you open Jellyfin on a 2.4 Tizen TV, but after this, it is usable.

pixelomer commented 3 years ago

I am also having the issues described in this thread. The app works on first run but after opening it for a second time, the application starts on the "Do you want to exit" screen and saying no to that question gives you an empty homescreen. No buttons work except for the back button which takes you back to that screen.

A workaround is to use the Jellyfin app on your phone / browser, connect to the running app on the TV with the Screen cast button, and set Display mirroring on, and navigate to a media file for example.

After this, the app on the TV should work without an issue, until closed.

This workaround seems to work for me as well. After navigating somewhere using a remote device, the app just starts working again.

jllodra commented 3 years ago

I'm on 2.4 Tizen TV too and I also have this problem of "only works in the first run". It is really annoying.

I have not much idea on how to use Tizen Studio, but if anyone can point me into the right direction I can spend some time debugging this, so the developers could fix it?

Could it be related to serviceworker? (it works the first time but the next time there might be some problem with the sw)

Edit: I commented out all code related to serviceworker but still the same issue.