-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support error & loading progress feedback to browser clients via MediaLibraryService #1322
Comments
If I understand the proposal correctly, this should already work by calling |
Thanks. So in this case, when the service doesn't have the data in |
|
In our case, the total number of items isn't known in advance and determining that itself takes a while from the service end. |
In this case I can only recommend sending sendCustomCommand, as you already pointed out yourself. Do you have another API in mind that would you would really like to see in the library? I can't really see a good way to fit your feature request into the existing APIs, so I'm curious if you already had something in mind. |
On top of my head, APIs could leverage the existing notify pattern from service end, |
Thanks, in this case sending a custom message is probably most useful still because the requirements for such a loading callback may be quite different between apps. I can only imagine that having a dedicated method makes sense when where is a generic controller that can display the progress from all apps. The proposed In the interest of providing a reactive interface, you may also want to publish a small number of items initially, and then later call |
MediaLibraryService to support loading progress feedback to connected browsers
MediaLibraryService loads data from the filesystem and knows the total number of files in advance and would like to provide progress feedback to connected browsers. Likewise, would also like to notify of any errors.
Proposed solution
MediaLibraryService to support a loading and error API/protocol which could be invoked by the service for every onGetChildren request. This could support a bundle for any custom application specific payload. Connected browsers can use the payload to update UI to give more useful feedback than just displaying an infinite loading indicator. Load, data and error states is a typical flow in any application and an out of box support would be nice.
Alternatives considered
Alternative is to use custom messages via sendCustomCommand on the media session and this needs some coordination on the browser side between different callbacks. Also, this kind of custom solutions is duplicated across different applications.
The text was updated successfully, but these errors were encountered: