jwplayer / ott-web-app

Reference implementation for JWP-powered apps
Apache License 2.0
70 stars 52 forks source link

Series: Support Favorites and Continue Watching #110

Open AntonLantukh opened 2 years ago

AntonLantukh commented 2 years ago

We need a more native approach to store Favorites and Continue Watching items for Series.

Favorites

It is possible to mark an episode as a favourite one. However in this case we will save the whole Series object as a favorite one. Afterwards on a Home page, a customer will see a Series card (not an episode selected). When clicking on such an item, a customer will see Series page with 1st season selected.

Current Favorites object structure:

{
    mediaId: "X88EmIbE"
}

Suggested Favorites object structure (no changes):

{
    mediaId: "X88EmIbE"
}

Right now we use watchlists to retrieve all the media items info having only one request. That will still be possible as we use a dumb media item to link it to series id. So we will just look at tag / custom param to define that the item we have as a series one.

Should we highlight a media item here?

It seems that we can just open the first episode of the first season. Or we can also add episodeId where the button on which the Favorites button was clicked.

Continue Watching

We store only one item of each series as a Continue Watching item. So if you are in progress of watching several episodes of one series, then we save only one with a higher season number. We add a next episode to the Continue Watching section, if the current one is finished watching. We save not only mediaId, but also episodeId.

Afterwards on Home page, a customer will see a Series card (not an episode selected). After clicking on such a card, we open series with a selected season and episode in a ‘play’ state.

Current Continue Watching object structure:

{
    mediaid: "X88EmIbE",
    progress: 0.9752381363636364
}

Suggested Continue Watching object structure:

{
    mediaid: "X88EmIbE",
    episodeid: "DSA32fdE"
    progress: 0.9752381363636364
}

Right now we use watchlists to retrieve all the media items info having only one request. That will still be possible as we use a dumb media item to link it to series id.

Backdoor problem?

It seems to be the possible case, when the episode is opened as a simple movie and then saved in Favorites (it will be also shown as a movie in Favorites). However we assume that the episodes won't be parts of playlists (we don't support it) so maybe we can leave it as is.

@ChristiaanScheermeijer @dbudzins @marcovandeveen please have a look (we also discussed this topic previously in the thread)

ChristiaanScheermeijer commented 3 months ago

@AntonLantukh, what's the status of this feature request? Do you consider it ready, or do we still need to do some work?