feat(toDash): Add option to include thumbnails in the manifest#446
feat(toDash): Add option to include thumbnails in the manifest#446LuanRT merged 2 commits intoLuanRT:mainfrom
Conversation
7b9b015 to
ff72f7d
Compare
|
Haven't reviewed this completely yet but the YouTube.js/src/core/mixins/MediaInfo.ts Lines 42 to 44 in 7e5c364 |
|
Unfortunately YouTube Kids doesn't provide any storyboads, so the storyboards properties are on the YouTube Music |
|
We'll have the same issue with captions, as both YouTube and YouTube Kids provide them but YouTube music doesn't, at least not on the |
|
Yes I am aware, but can't we just throw an error (or even better, just ignore it and generate the manifest anyway) if someone tries using I really doubt anybody is going to use that option by accident, unless they're mixing youtube+youtube music+youtube kids. |
|
Also, you do have access to |
|
Move the toDash implementation to just be in the MediaInfo class again, thanks for the suggestion! |
|
Perfect. Awesome work, as always! Thank you. |
The DASH spec allows manifests to provide thumbnails, the most common use case for them is showing a preview when seeking with the seekbar. Players like shaka and DASH.js don't have a built-in UI for them, but they do parse them and provide APIs to get the thumbnail for a given timestamp,
Player#getThumbnailsandMediaPlayer#provideThumbnailrespectively.I decided to make this feature opt-in with a setting for the toDash function, as it requires making a few HEAD requests to get the content length, to approximate the bandwidth for the storyboards and it's not supported by all players/they don't provide a built-in UI for them. Sticking it behind an option allows people that can and want to use it, to use it without slowing the manifest generation down for everyone else.
I will create a separate pull request after this is merged (to avoid merge conflicts), to add captions/subtitles to the manifests, those require making requests too and it doesn't make sense to include both WebVTT and TTML captions, if you know your player only supports one of them.