mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Added basic code for audio gian
This commit is contained in:
parent
5edafe901a
commit
144e2209de
1 changed files with 14 additions and 0 deletions
|
@ -113,6 +113,20 @@ class HtmlAudioPlayer {
|
||||||
val += '#t=' + seconds;
|
val += '#t=' + seconds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const audioCtx = new AudioContext();
|
||||||
|
const myAudio = document.querySelector('.mediaPlayerAudio');
|
||||||
|
|
||||||
|
const source = audioCtx.createMediaElementSource(myAudio);
|
||||||
|
|
||||||
|
const gainNode = audioCtx.createGain();
|
||||||
|
const dbGain = -1;
|
||||||
|
console.debug(options.item);
|
||||||
|
console.debug("before" + dbGain);
|
||||||
|
gainNode.gain.value = Math.pow(10, (dbGain/20));
|
||||||
|
source.connect(gainNode);
|
||||||
|
gainNode.connect(audioCtx.destination);
|
||||||
|
console.debug('gain:' + gainNode.gain.value);
|
||||||
|
|
||||||
htmlMediaHelper.destroyHlsPlayer(self);
|
htmlMediaHelper.destroyHlsPlayer(self);
|
||||||
|
|
||||||
self._currentPlayOptions = options;
|
self._currentPlayOptions = options;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue