openzim / youtube

Create a ZIM file from a Youtube channel/username/playlist
GNU General Public License v3.0
44 stars 26 forks source link

Force user to select language for video audio and subtitles #278

Open benoit74 opened 1 month ago

benoit74 commented 1 month ago

Whenever a user opens a ZIM for the first time, the user should be presented with a screen explaining that she needs to select the language she wants to consider.

She should select both audio and subtitles languages before being presented the videos.

At least one audio language should be selected. No upper limit on number of audio language is necessary since this is only used as a filter to present videos in the UI. If ZIM contains only one audio language, then this selection should not be shown.

A "fake" subtitle language will be "No subtitles". At least one subtitle language (including the fake one) must be selected.

UI will display a warning if more than 5 subtitle languages are selected, because subtitles are presented in the UI and causing some slowdowns.

A small paragraph in the UI should explain how it will be possible to select the subtitle to use in Video.JS.

This is meant to solve #38 but also better handle situations we have where it is very hard to select a subtitles in Video.JS when the dropdown contains too many values.

Once the user has selected audio and subtitle languages, the UI will filter videos and playlists to show. All combinations of audio and subtitles languages are selected, i.e. if user select two audio and four subtitles, it gives 8 possible combinations of audio and subtitles.

The configuration the user has made is stored in a localStorage setting for persistence and avoid to ask same question next time the ZIM is loaded. A button (tab?) allows to update the configuration, should the user change its mind.

It is necessary to further analyze how this configuration will be shared among ZIMs. It is mandatory to avoid the user having to redo the configuration everytime the ZIM is updated. We should however avoid to share this configuration across books (e.g. the configuration of deus_ex is not shared with canadian_preppers, because anyway we do not have the same audio and subtitles languages available).

WDYT?

kelson42 commented 1 month ago

We should avoid mandatory popups, if we go in thst direction, it should be based on the browser/kiwix reader language.

... but actually not in favour of this request. Hassling and limiting user experience because of perf problems should be the LAST solution, not the first.

benoit74 commented 1 month ago

From my perspective, problem is not perf. Problem is that user cannot select a subtitle language in a small dropdown with 10s of entries. You already confirmed this issue in TED. And second order is that many user never knows she can select a subtitle (also confirmed on TED).

Let's say this config is not mandatory and not a user popup. By default we select all video audio languages and only one subtitle, matching the kiwix reader language. And we add a UI to select more subtitles / less audio languages. WDYT?