Created
          May 31, 2018 04:58 
        
      - 
      
- 
        Save mehmetbebek/5bb5eac97898389b533ee0adb427eb40 to your computer and use it in GitHub Desktop. 
    Sesi Streo Yapmak
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const ctx = new AudioContext() | |
| const L = ctx.createGain() | |
| const R = ctx.createGain() | |
| const splitter = ctx.createChannelSplitter(2) | |
| ctx.createMediaElementSource($('video')).connect(splitter, 0, 0) | |
| splitter.connect(L, 0) | |
| splitter.connect(R, 1) | |
| L.connect(ctx.destination, 0) | |
| R.connect(ctx.destination, 0) | |
| window.soundLevel = level => | |
| gainL.gain.value = gainR.gain.value = level | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment