Comments (2)
Did you ever figure this out? I can't get it working either. Seems like incredibly unclear docs to me.
from videojs-contrib-quality-levels.
const player = (playerRef.current = videojs(videoElement, options, () => {
player.on('loadedmetadata', () => {
const qualityLevels = player.qualityLevels();
qualityLevels.on('change', function() {
console.log('Quality Level changed!');
console.log('New level:', qualityLevels[qualityLevels.selectedIndex]);
const currentTime = player.currentTime();
player.src(options.sources[qualityLevels.selectedIndex]); //<--- change the source
player.currentTime(currentTime); // <-- set the new source to the previous source current seek position
player.play();
});
});
}));
from videojs-contrib-quality-levels.
Related Issues (20)
- An in-range update of karma is breaking the build 🚨 HOT 3
- Editing quality list HOT 2
- Problem in IE10
- Dependency Injection HOT 3
- qualityLevels with length 0 HOT 3
- Auto Quality Change Example HOT 1
- Can we hide a specific quality level for video-js-http-source-selector plugin? HOT 1
- "TypeError: this.player.qualityLevels is not a function" HOT 4
- Not working with videojs-contrib-dash HOT 3
- Quality Levels Not Populated in Safari for Playlist with multiple formats HOT 5
- When clicking on a quality from the dropdown, nothing is happening HOT 1
- Has no quality level / can't select qualities despite overrideNative in Safari desktop HOT 13
- Can you provide a script tag version of the dist file? HOT 1
- Question: to display two same resolution 1080p but diff bitrate
- How to properly create qualityLevels from sources?
- TypeError: Cannot read properties of undefined (reading 'merge') HOT 2
- unable to change quality on stream in newest version HOT 3
- Representation.bandwidth or Representation.bitrate? HOT 2
- User selects a different quality level, the change is applied very slowly.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from videojs-contrib-quality-levels.