nicknsy / jellyscrub

Smooth mouse-over video scrubbing previews for Jellyfin.
MIT License
670 stars 27 forks source link

[Feature request] Support for Jellyfin Media Player #22

Closed LeviSnoot closed 2 years ago

LeviSnoot commented 2 years ago

Support for JMP/JMP-web should be relatively easy to implement, since it uses only a slightly modified version of jellyfin-web.

Unfortunately, when I inject the script into JMP's index.html by adding <script plugin="Jellyscrub" version="1.0.0.4 src="/Trickplay/ClientScript"></script> or <script plugin="Jellyscrub" version="1.0.0.0 src="/Trickplay/ClientScript"></script> (not sure if the version numbering makes a difference, just following instructions from readme.md), I get the following result:

https://user-images.githubusercontent.com/13402525/183084045-aa9c23e3-ce26-4878-9c0a-aa10f4510778.mp4

Is there anything besides the index.html that needs to be done to get the script working?

nicknsy commented 2 years ago

In JMP 1.8.1 support for (some) third-party plugins has been added, including Jellyscrub. I've updated the README to reflect this.

"In the JMP desktop client (version >= 1.8.1), click on your profile image, go to "Client Settings", and tick "Jellyscrub" under plugin support. Restart for changes to take effect."

Old Instructions Since the web files are all included at compile time (I think), there's no easy way to do this for everyone without forking those repositories and making custom binaries, which I don't really want to do atm. However, there is a pretty easy way to do this on an individual device basis if you're up for doing it. This works on mac too but the index.html is under /Applications/Jellyfin Media Player.app/Contents/Resources/web-client/desktop/ instead of Program Files. Also replace `localhost:8096` with the actual base URL to your jellyfin server. **Paste the contents of https://github.com/nicknsy/jellyscrub/blob/main/Nick.Plugin.Jellyscrub/Api/trickplay.js into the ClientScript file** https://user-images.githubusercontent.com/20588554/183159028-e1f21c7c-6291-4a7e-b9ad-714787645a27.mp4
LeviSnoot commented 2 years ago

This worked perfectly! Thanks for the detailed video instructions, made it super easy to get everything working!

tydog98 commented 2 years ago

If anyone is wondering the location for the Linux Flatpak is: /var/lib/flatpak/app/com.github.iwalton3.jellyfin-media-player/current/546e6d2801e142b3035d81843f03ce87793a14d42823ea8d14bb96232b70bf83/files/share/jellyfinmediaplayer/web-client/desktop

TheHYPO35 commented 1 year ago

Can you clarify where the text comes from that you pasted into the document that became ClientScript?

nicknsy commented 1 year ago

Can you clarify where the text comes from that you pasted into the document that became ClientScript?

Yup, forgot about that in the video.

https://github.com/nicknsy/jellyscrub/blob/main/Nick.Plugin.Jellyscrub/Api/trickplay.js

NeuroDawg commented 1 year ago

I'm trying to update my desktop client, but I see there's a difference in the video and what is in the current version of trickplay.js. The current version of trickplay.js has the following: const MANIFEST_ENDPOINT = basePath + 'Trickplay/{itemId}/GetManifest'; Do I change this to: const MANIFEST_ENDPOINT = 'https://mydomain/Trickplay/{itemId}/GetManifest'; or to something else? Do I need to also change the following line? Or is there a different change that should be made?

Thanks!

Mavyre commented 1 year ago

Do I need to also change the following line? Or is there a different change that should be made?

You can skip the file copying part, directly include the clienscript like that <script plugin="Jellyscrub" version="1.0.0.0 src="http://yourjellyfinaddress/Trickplay/ClientScript"></script>

The new basePath thing will make it work. Tested and approved!

NeuroDawg commented 1 year ago

Ok, I feel like an idiot, but I can't get this to work with my desktop client. Is there perhaps a cache I need to clear somewhere?

Here's what I've done: First try:

  1. I've created a file "ClientScript" (plain text file, contents copied from https://github.com/nicknsy/jellyscrub/blob/main/Nick.Plugin.Jellyscrub/Api/trickplay.js) in my 'C:\Program Files\Jellyfin\Jellyfin Media Player\web-client\desktop\Trickplay' directory.
  2. I edited the 'index.html'file in ''C:\Program Files\Jellyfin\Jellyfin Media Player\web-client\desktop' and inserted '<script plugin="Jellyscrub" version="1.0.0.0 src="Trickplay/ClientScript">' immediately before the </body> tag.

This resulted in only seeing the chapter images when I scrub the timeline.

Second try:

  1. Same as first try, but with '<script plugin="Jellyscrub" version="1.0.0.0 src="/Trickplay/ClientScript">' (difference of leading slash) inserted into index.html.

Still no dice. All I see is chapter images.

Third try:

  1. Inserted '<script plugin="Jellyscrub" version="1.0.0.0 src="https://jellyfin.mydomain.us/Trickplay/ClientScript">' into my index.html file. I can access the ClientScript if I enter the above URI into my browser, so I know it's visible/readable.

Again, still simply seeing the chapter images when I scrub the timeline.

This plugin is working perfectly with my iOS app and the web client. I just can't make it work with the desktop app.

What am I doing wrong? I'm using the desktop app on Win10, and my JF server is in a docker container running on an Ubuntu 22.04 server.

iwalton3 commented 1 year ago

This will be supported in Jellyfin Media Player 1.8.0. You need to enable a plugin in settings for it to work.

NeuroDawg commented 1 year ago

This will be supported in Jellyfin Media Player 1.8.0. You need to enable a plugin in settings for it to work.

Great!

ausar47 commented 1 year ago

Could you please share your CSS? That looks great to me. Besides, how does Jellyfin show "Chapter"? I always want my Jellyfin to show Chapter like mpv does. Many Thanks!

LeviSnoot commented 1 year ago

Could you please share your CSS? That looks great to me. Besides, how does Jellyfin show "Chapter"? I always want my Jellyfin to show Chapter like mpv does. Many Thanks!

My CSS is a modified version of prayag17 / JellySkin. I'm not going to share my modifications as they are very rough in places and you're better off modding it to your own liking instead.

I believe Jellyfin shows chapter text as default behaviour. At least I don't remember "enabling" any feature like that.