Code Monkey home page Code Monkey logo

Comments (12)

raszpl avatar raszpl commented on June 5, 2024

Would you feel better if the slider still displayed whatever volume you have set now while video played louder? What purpose would the slider at lets say for example 30% have in that case?

Lower volume sound samples carry less data. Yes, its possible to leave volume low and apply gain on that low volume signal, but it will sound terrible.

from youtube.

obeydesign avatar obeydesign commented on June 5, 2024

from youtube.

raszpl avatar raszpl commented on June 5, 2024

Took me a good couple of days, buy I got there eventually!
I finally understand what you are talking about, a general "boost my crappy speakers by x" software toggle. Pretend the new 150% volume is just 30% etc.
Instead of 0-400% "Forced volume" we can let User directly set separate "Volume Gain" multiplier and figure out logistics under the hood by faking YT player volume slider reading and switching between no gain and gain at appropriate levels. Yes, this makes sense and is much more user friendly.

The way it currently works is anything up to 100% is pure volume, above we use AudioContext createGain()

if (!this.audioContextGain && volume <= 100) {
if (this.audioContext) {
this.audioContext.close();
}
this.elements.player.setVolume(volume);
} else {
if (!this.audioContext) {
this.audioContext = new AudioContext();
this.audioContextSource = this.audioContext.createMediaElementSource(document.querySelector('video'));
this.audioContextGain = this.audioContext.createGain();
this.audioContextGain.gain.value = 1;
this.audioContextSource.connect(this.audioContextGain);
this.audioContextGain.connect(this.audioContext.destination)
}
if (this.elements.player.getVolume() !== 100) { this.elements.player.setVolume(100);}
this.audioContextGain.gain.value = volume / 100;

but the way its crudely implemented it will always start by displaying 100% and lowering the slider down ends up Amplifying bad signal with bad signal to noise ratio by whatever ratio set by "Volume Gain"/100 :/

from youtube.

obeydesign avatar obeydesign commented on June 5, 2024

from youtube.

ImprovedTube avatar ImprovedTube commented on June 5, 2024

hi @obeydesign!

Forced Volume .. behavior

  1. our feature originally was just to permanently force the same volume level for every video between 0 and 100. So most people have it set below 100. (And we or you can rename or annotate to explain that accordingly! 🎉 )

  2. New feature: Boost youtube's volume slider: We can edit youtube's volume slider's maximum! By allowing to move the handle further, but making it appear gradually red when reaching increasingly questionable Level/method.

  • (Unfortunately this will either have to appear transparent above the playback timer - or video time or shift it to the right. When i first wrote this it was a vertical slider (like window's, and not horizontal like android and chrome-book)

  • planned-out here

  • Fortunately tweaks of the youtube player might last longer and are more relevant than the rest of the youtube page.

  • As of youtube's volume normalization there usually should be some more loss-less gain possible @raszpl

  • ..and some people might be used to a temporary shortcut key (or button #1981) to undo (toggle-off) that we would have to reverse the calculation or store the previous value.

from youtube.

obeydesign avatar obeydesign commented on June 5, 2024

from youtube.

ImprovedTube avatar ImprovedTube commented on June 5, 2024

Without touching the size of Youtube's volume slider, we should still mark up/remind of the boosted somehow with a sticky position in the middle, visual divider marking 100%, and a light red color above that.

from youtube.

obeydesign avatar obeydesign commented on June 5, 2024

from youtube.

suparnaghosh934 avatar suparnaghosh934 commented on June 5, 2024

from youtube.

ImprovedTube avatar ImprovedTube commented on June 5, 2024

work in UX

then chances are you will stay @obeydesign 😃. As this project is unique there and a lot of this github yet is(/should be) about #UX & #UI discussions
. While features are specific and some are just [too] little tweaks, yet will otherwise be worth it to up to all youtube users. (and thus should be set & forget, as far as we have the dev-capacity) )


You'd probably enjoy at the top of our To-Do-List to simply allow everyone to enable/disable all of youtube's experiment flags (up to 800?) - (and crowdsourcing what they even mean)

= We can allow users to enable / disable so much more and easier than we did yet. So features should be ranked
and to many users the most important sections would be "what i removed" & "what i added"

Long-term structure/vision for our UI:

  1. my content & discovery logic

  2. my~?setup:
    a) (Web-)Video Features (+specific Youtube Tweaking + 🤖 all Youtube Experimentflags , those added by the users) ).
    b) Youtube: Cleaning/Trashbin (Ideally needed decreasingly often)
    c) Youtube Minimap/Layout (more sections, maybe Drag&drop for Sizes, Positions & paint bucket for Colors)

( #848 (reply in thread), #890 (comment) )

while extra exceptions/conditions like video genre could be set for many features on right click.
and shortcuts or buttons to toggle any experiment flag or anything could be setup with right click too.


furthermore we could cover 2,3,4 dimensional settings "rule builders" (doing something only if multiple conditions are met) example: #2042 (comment). like: https://chromewebstore.google.com/detail/youtube-refined/bhbammekghlcjhbiekoldhpfgelblcni and so much more (even if not every users will find them easy or ever learn about the power of such, we could crowd-source such rules ) #1881 (reply in thread) #1881 (comment) )

from youtube.

ImprovedTube avatar ImprovedTube commented on June 5, 2024

(related: #324 )

from youtube.

ImprovedTube avatar ImprovedTube commented on June 5, 2024

chances are you will stay @obeydesign 😃. As this project is unique there and a lot of this github yet is(/should be) about #UX & #UI discussions
. While features are specific and some are just [too] little tweaks, yet will otherwise be worth it to up to all youtube users. (and thus should be set & forget, as far as we have the dev-capacity) )

(funny but true example: #1818 )

from youtube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.