Merge pull request #1808 from jomp16/master-playback

Support for faster playback rates.
This commit is contained in:
dkanada 2020-08-17 17:08:42 +09:00 committed by GitHub
commit 84ff01ad51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 122 additions and 0 deletions

View file

@ -1634,6 +1634,31 @@ function tryRemoveElement(elem) {
return null;
}
getSupportedPlaybackRates() {
return [{
name: '0.5x',
id: 0.5
}, {
name: '0.75x',
id: 0.75
}, {
name: '1x',
id: 1.0
}, {
name: '1.25x',
id: 1.25
}, {
name: '1.5x',
id: 1.5
}, {
name: '1.75x',
id: 1.75
}, {
name: '2x',
id: 2.0
}];
}
setVolume(val) {
const mediaElement = this.#mediaElement;
if (mediaElement) {