question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with qualityPickerPlugin initialization

See original GitHub issue

What is the proper way to initialize a videojs-quality-picker plugin?

If I pass to videojs

  plugins: {
    qualityPickerPlugin: {}
  }

then I get the following error: Uncaught TypeError: Cannot read property 'on' of undefined on line tech.on('loadedqualitydata', onQualityData); (tech is not loaded yet)

If I call player.qualityPickerPlugin({}); after player init, the tech is loaded and loadedqualitydata event is already fired, so the quality picker won’t appear.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
mkhazovcommented, Oct 12, 2016

@ellyjonez

const player = videojs('player-id', {
    html5: {
      hlsjsConfig: {}
    }
});

player.qualityPickerPlugin({});
0reactions
ellyjonezcommented, Oct 14, 2016

Got this working. My player was initialized elsewhere so I had to do this:

  var player = videojs('player-id');
  player.qualityPickerPlugin({})

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quality Selection Plugin - Brightcove Player Documentation
Setting the source in the player configuration and building with single video template will cause the quality menu to not be initialized ...
Read more >
How to add quality selector option on videojs - Stack Overflow
The following is my code: I need to add a quality selector in a webpage which uses videojs. I am not sure on...
Read more >
Background Initilization failed. Sonarqube server not started
you are using a 3rd party plugin that is not compatible with sonarqube anymore (see github issue). please remove this plugin and start...
Read more >
Language Server - Snyk User Docs
The Snyk Language Server scans for vulnerabilities, open source license issues, code quality, and infrastructure misconfigurations and returns results with ...
Read more >
Flutter camera plugin: A deep dive with examples
Capture quality selector; Zoom control; Exposure control ... on CameraException catch (e) { print('Error initializing camera: $e'); } ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found