fn selected_guess_stream_update(
    selected: &mut Option<Selected>,
    meta_items: &[ResourceLoadable<MetaItem>],
) -> Effects
Expand description

If Selected::guess_stream is true then we will override the selected stream no matter if it’s set (Some) or not (None).

How we override the stream:

  1. We find the first MetaItem that’s successfully loaded from the addons.
  2. Selecting the video id for the stream request: 2.1 If there’s a MetaItem.preview.behavior_hints.default_video_id we use it for the request 2.2 If there’s no default_video_id and no MetaItem.videos returned by the addon, we use the MetaItem.preview.id

If we haven’t found a suitable video_id, then we do not override the Selected::stream_path.