Open samuel9554 opened 4 years ago
@jllodra In theory, this issue is due to a violation of the processing order of polyfilled CustomElements. But I don't know why it works on webOS 1.x I don't know how to make a second run (w/o reinstall) of app from Tizen Studio, but maybe this will be helpful.
@dmitrylyzo Does this help? (Running v10.7.5 release, both web and server)
And here is the result of a location.reload():
@HimbeersaftLP Thank you. They are both bad (asking you about exit), right?
I don't like the line with apploader.js
. And I know why it is there: main.bundle.js
is in body
for 10.7, but in head
for master
:facepalm: PR is coming...
At least this shouldn't be a problem - tizen.js
is added anyway. But in wrong order :thinking:
error checking ScrollToOption support
can be skipped - this is the log in the catch
block.
error checking 'key' field
can be skipped - this is the log in the catch
block.
GET file:///System/Info/Public Cannot show URL
- It tries the current location as the server URL. This shouldn't be a problem, I guess. I have the same on Tizen 3/4, but it is better to filter the file
protocol in ~apiclient~ site.js
in web.
The next is weird. It found the server (response status: 200
) but was unable to connect. You should be redirected to the server selection page. But it decided that it should exit: https://github.com/jellyfin/jellyfin-web/blob/e27131edf0462c557d1c53ea4ee65fa6f4ac5b5c/src/components/appRouter.js#L529-L530
const isCurrentRouteStartup = this.currentRouteInfo ? this.currentRouteInfo.route.startup : true; const shouldExitApp = ctx.isBack && route.isDefaultRoute && isCurrentRouteStartup;
and exits (asking about exit): https://github.com/jellyfin/jellyfin-web/blob/e27131edf0462c557d1c53ea4ee65fa6f4ac5b5c/src/components/appRouter.js#L538-L544
route.isDefaultRoute
and isCurrentRouteStartup
is true
because we are on the start page.
ctx.isBack
shouldn't be true
, but it looks like it is :confused: It is set after popstate
:
https://github.com/jellyfin/jellyfin-web/blob/e27131edf0462c557d1c53ea4ee65fa6f4ac5b5c/src/components/appRouter.js#L33-L35
https://github.com/jellyfin/jellyfin-web/blob/e27131edf0462c557d1c53ea4ee65fa6f4ac5b5c/src/components/appRouter.js#L616-L622
Could you build jellyfin-web
using yarn build:development
(for 10.7) and put a breakpoint on the line const shouldExitApp =
in file www/main.[hash].bundle.js
after the first load?
If ctx.isBack
is true
, then we are "going back" for some reason.
For master
command would be npm run build:development
.
They are both bad (asking you about exit), right?
Yeah
Could you build jellyfin-web using yarn build:development (for 10.7) and put a breakpoint on the line const shouldExitApp = in file www/main.[hash].bundle.js after the first load? If ctx.isBack is true, then we are "going back" for some reason.
I put a breakpoint on the line var shouldExitApp = ctx.isBack && route.isDefaultRoute && isCurrentRouteStartup;
, then executed location.refresh() again.
ctx.isBack is indeed true:
Is there anything else I should test, master branch or some PR?
ctx.isBack is indeed true:
:eyes:
I have added debug
branch in jellyfin-tizen
- it fixes loading order for 10.7 and adds popstate
logging (to see where popstate event was fired).
FYI, some messages may be hidden in the groups defining core routes
, loading installed plugins
, loading packages
.
Also try changing the command order here: https://github.com/jellyfin/jellyfin-web/blob/e27131edf0462c557d1c53ea4ee65fa6f4ac5b5c/src/components/appRouter.js#L618-L620 to
ctx.isBack = this.popstateOccurred;
this.popstateOccurred = false;
this.handleRoute(ctx, next, route);
Dunno why I used that order. And I am not sure if changing the order will help.
Meanwhile, this will change the connection flow from the above.
The down side: we probably won't know why isBack
is true
.
@dmitrylyzo Neither the debug branch (although that one did remove the console error on 10.7) nor the order change nor your branch of jellyfin-web fixed the issue.
Btw: Another funny workaround I found is to plug a mouse into the TV and click the home button in the menu bar.
[popstate] null
:point_left: this causes Back
.
I played around with webOS 1.2 emulator - it also fires a popstate
event, but app doesn't exit because it doesn't touch the ''
route (index.html
without hash).
Next try jellyfin/jellyfin-web#2668
Yup, that solved the issue!
Yup, that solved the issue!
No more errors? Like these https://github.com/jellyfin/jellyfin-tizen/issues/19#issuecomment-633657382
Yup, that solved the issue!
No more errors? Like these #19 (comment)
The only errors I am getting are:
error checking ScrollToOptions support
error checking 'key' field
Failed to load resource: Cannot show URL file:///System/Info/Public
isUdPanelSupported() error code = undefined
Also I can't change the audio track like it has already been mentioned in other issues. It appears that video..audioTracks is always length 0:
Meanwhile, the subtitle selection works just fine:
Also, an AvPlay object (Samsung's own media API, I created the object using this tutorial: https://developer.samsung.com/smarttv/develop/guides/multimedia/media-playback/using-avplay.html) with the same media URL was able to find the audio tracks just fine:
Switching audio tracks is probably the main blocker.
On Tizen 3 and 4, I have audio tracks, but enabling/disabling doesn't work: https://forum.developer.samsung.com/t/how-to-change-audio-track-of-htmlvideoelement/6719
Same issue: https://developer.tizen.org/forums/web-application-development/video-tag-not-work-audiotracks?langswitch=en
In the worst case we need to make custom player using AvPlay API and push it from NativeShell.
Switching audio tracks also worked on AvPlay using webapis.avplay.setSelectTrack('AUDIO',2);
.
I'm afraid using AvPlay is probably the only option if TVs before 2020 should be supported. (or remuxing the file server-side)
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?