You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pubstructPlayerModel{// from the router, we will get (item_id, video_id, stream, meta_resourcereq)// @TODO maybe an addon transport_url too, there are use cases where we want information from the addon manifest// @TODO: Option or Loadable? Cause we may want to express "will not load" vs "loading"pubmeta:Option<MetaItem>,pubnext_video:Option<Video>,publibitem:Option<LibItem>,// should we use Loadable? pubstream:Stream,}
As for handling the bingeing (or other complicated cases), we should:
fn update(&mutself,ctx:&Ctx,action:&Action){match action {Msg::Player(item,PlayerEv::Ended)if item == Some(self.libitem) => {ifletSome(next) = self.next_video && ctx.settings.bingeing{// trigger an Effect that resolves in Open}}
By default, the player will try to get an existing item from the library with this ID. If it does not exist, it will construct it from the loaded meta. If that doesn't load, it will operate without a libItem.
All extra roles: bingeing, saving library item state, marking episodes watched, marking notifications seen
It can operate without a libItem (just proxying the Player implementation) or with one, in which case it should load the library item, nad mutate it as the player advances
When the player starts playing it should request subtitles from the addon system and do addExtraSubtitles for each result and perhaps set selected subtitles when applying PlayerPreferences;
also send stream.subtitles via addExtraSubtitles
It should also mutate and persist PlayerPreferences itself, which should contain preferred subtitle language, preferred track for each language, preferred audio track, and subtitles delay
It should also catch and handle internal inconsistencies, most notably the playing stream being different than self.stream
The text was updated successfully, but these errors were encountered:
Some part of the logic is implemented: using the correct library item, binge watching, updating library item state.
The model does not act as a proxy of the player impl as we cannot keep references to ui elements or js objects in core. Instead the ui loads the stream thats currently exported by the player model, and transforms various player impl events into player actions: onEnded, onTimeChange etc.
Player model still needs to:
load subtitles using the video hash provided by the player impl (if supported)
manage user preferences about subtitles and audio tracks
Video params have been added/changed in #533
Subtitles and audio tracks state tracking has been added in #553
User settings for the audio track language and subtitles language are handled by each application and not in core.
A stream override of these audio and subtitles languages is now implemented in #553
As for handling the bingeing (or other complicated cases), we should:
By default, the player will try to get an existing item from the library with this ID. If it does not exist, it will construct it from the loaded meta. If that doesn't load, it will operate without a libItem.
All extra roles: bingeing, saving library item state, marking episodes watched, marking notifications seen
It can operate without a libItem (just proxying the Player implementation) or with one, in which case it should load the library item, nad mutate it as the player advances
When the player starts playing it should request subtitles from the addon system and do
addExtraSubtitles
for each result and perhaps set selected subtitles when applying PlayerPreferences;also send
stream.subtitles
viaaddExtraSubtitles
It should also mutate and persist PlayerPreferences itself, which should contain preferred subtitle language, preferred track for each language, preferred audio track, and subtitles delay
It should also catch and handle internal inconsistencies, most notably the playing
stream
being different thanself.stream
The text was updated successfully, but these errors were encountered: