videojs / videojs-contrib-quality-levels

Other
157 stars 51 forks source link

How to properly create qualityLevels from sources? #143

Closed mateusz-wyka closed 1 month ago

mateusz-wyka commented 1 year ago

Description

I have sources:

const sources = [
  {
    src: assets(hdVideo),
    type: "video/mp4",
    label: "1080p"
  },
  {
    src: assets(sdVideo),
    type: "video/mp4",
    label: "480p"
    }
];

How to properly create qualityLevels from these sources?

adrums86 commented 1 month ago

Hi @mateusz-wyka I would take a look at the docs here for populating the qualityLevels list: https://github.com/videojs/videojs-contrib-quality-levels?tab=readme-ov-file#populating-the-list The rendition-mixin code also provides an example of how this all works together with VHS. https://github.com/videojs/http-streaming/blob/main/src/rendition-mixin.js