Implement Observer media and sample observables
Add an observable object that easily allows to track the current state of media and perform custom actions when that state changes.
Observable/Subject
An observable is a class responsible for receiving an ordinary object and emit personalized events that track the specific changes that occur to that object.
Examples
-
ReceiverSubject -
MediaSubject -
LazyMediaObserver
Observers
An observer is an object that performs custom actions in response to events of an observable. For example, an observer that registers the watched state on a third-party service when the user watches something.
Examples
-
Trakt - An observer that registers the watched state of media automatically in Trakt -
Playlist - A (default built-in) observer that waits for an item to stop playing to start the next one on the playlist. -
Kodi - An observer that registers the watched state of media automatically in Kodi -
PogDesignCat - An observer that registers the watched state of media automatically in PogDesignCat -
OpenSubtitles - An observer that marks a subtitle as compatible after viweing media with that subtitle
Tasks
-
Create a state class -
Extend the immutable map -
Add a state watcher class -
Matching Criteria -
Notifier - Actions
-
Do -
Emit -
EmitWith -
EmitState
-
-
-
-
Allow predefined global media watchers