Jump to content

Server Side Events (SSE)


Recommended Posts

mickle026
Posted

Is there any demo doe anywhere showing how to get these working in Emby Plugins?

I have tried and tried but still cannot get the to connect to the c# backend

The javascript end is pretty simple, its the server backed code that I cannot get working.

Helpful help would be appreciated

 

Thanks

Posted

Hi, what events are you wanting to listen to?

mickle026
Posted

I want to send data from my plugins to the webUI instead of requesting the data at intervals from the webUI.  I would like when I process something for it to update the Webpage as and when it can.

Like a push event.  For example, a loop incrementing an index, could push that incremented data and it appear in real-time on the webpage.

 

The problem i have is that every method I can find requires a port (I understand that  part), and to use anything without the ApiClient.getUrl means I have to supply headers and an ApiKey from the WebUI.
To have the webUI run so it doesn't need an ApiKey then I cannot find another method than the GET/POST Route and [Authenticated(Roles = "Admin")].

Is there a way to send data from the server to the Webpage?  Can I send via the websockets that emby uses? - if so how?
 

 

Posted

OK I would look at the auto-organize source for an example of that.

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...