Jump to content

How to create my own ItemContainer and EmbyScroller etc


JasonHua

Recommended Posts

JasonHua

I'm creating a .js code to add some features in Emby media detail page. Here's my code:

https://github.com/XingyiHua2024/Emby-Javascript-Details/blob/main/emby_detail_page.js

When creating an item container, I create in a "dumb" way: create html similar to what parsed from the page. But all the buttons/eventListeners are not included in those items. Then I have to add buttons by myself. Is there any smart way or example to use Emby internal classes/methods?

Appreciate any suggestions.

 

Link to comment
Share on other sites

JasonHua

I'm trying to add a new scroller section, which contains some item containers to show movies that casted by same actor of current movie. Similar to the "similar section" but only by one actor. My question is: how to use Emby methods to create those scrollers and item containers. I guess it would be like: 1. require modules (smoothScroller.js, itemContainer.js); 2. const myElement = new EmbyElement? 3. myElement.fetchdata? Something like that....

I have created by just writing some html, and adding classes (itemAction/itemContainer/scroller...). The only issue is the "onclick" function of buttons are not inherited with just html. 

I have been looking this for many days. Appreciate your suggestions. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...