logo
down
shadow

Audio won't be muted with JavaScript - removing audio tags with mutationobserver needed


Audio won't be muted with JavaScript - removing audio tags with mutationobserver needed

By : luiz
Date : November 24 2020, 03:01 PM
like below fixes the issue Enumerate mutations and each mutation's addedNodes Enumerate node's child elements because mutations are coalesced during page loading using the superfast getElementsByTagName instead of the superslow querySelectorAll Don't use @grant none, which runs your userscript in the page context, unless you really need direct access to the page's JavaScript objects Use @run-at document-start to mute the audio during page loading
code :
// ==UserScript==
// @name     addicto
// @include  *
// @run-at   document-start
// ==/UserScript==

const sites = ['mako.co.il'];
if (sites.some(site => location.hostname.includes(site))) {
  new MutationObserver(mutations => {
    for (const m of mutations) {
      for (const node of m.addedNodes) {
        if (node.localName == 'audio') {
          audio.muted = true;
        } else if (node.children && node.children[0]) {
          for (const child of node.getElementsByTagName('audio')) {
            audio.muted = true;
          }
        }
      }
    }
  }).observe(document, {subtree: true, childList: true});
}


Share : facebook icon twitter icon
The sound muted after playing audio with Audio Queue on iOS for a while

The sound muted after playing audio with Audio Queue on iOS for a while


By : user3788879
Date : March 29 2020, 07:55 AM
hope this fix your issue The problem has been resolved.
The key point is, you can not let the audio queue buffer waits, you must keep feeding it, or it might be muted. If you don't have enough data, fill it with blank data.
code :
do 
{
    read_bytes_enabled = g_audio_playback_buf.GetReadByteLen();
    if (read_bytes_enabled >= kAudioQueueBufferLength)
{
    break;
}
    usleep(10*1000);
}
while (true);
read_bytes_enabled = g_audio_playback_buf.GetReadByteLen();
if (read_bytes_enabled < kAudioQueueBufferLength)
{
    memset(inBuffer->mAudioData, 0x00, kAudioQueueBufferLength);
}
else
{
    inBuffer->mAudioDataByteSize = kAudioQueueBufferLength;
}
...
Change anchor text/icon during audio play using <audio> tags and Javascript

Change anchor text/icon during audio play using <audio> tags and Javascript


By : Manu Krishnan
Date : March 29 2020, 07:55 AM
wish help you to fix your issue shouldn't be too hard.
use the onplay and onpause events: http://www.w3schools.com/jsref/event_onplay.asp http://www.w3schools.com/jsref/event_onpause.asp
code :
<audio id="yourAudio" preload="none" onplay="boo()" onpause="bong()">
How do I add some other audio to the muted section of an audio using ffmpeg?

How do I add some other audio to the muted section of an audio using ffmpeg?


By : user1087145
Date : March 29 2020, 07:55 AM
wish of those help The convenient way to do this is to trim the source and concat with the new audio.
code :
ffmpeg -i in.wav -i insert.wav -filter_complex "[0]atrim=0:94[pre];[0]atrim=124,asetpts=PTS-STARTPTS[post];[1]atrim=0:30[mid];[pre][mid][post]concat=n=3:v=0:a=1" out.wav
Audio tags in React app play wrong audio clips when list of audio clips is filtered

Audio tags in React app play wrong audio clips when list of audio clips is filtered


By : user3538059
Date : March 29 2020, 07:55 AM
With these it helps Currently your example application emits the following error: Warning: Each child in an array or iterator should have a unique "key" prop.. You would need to add a unique key to each item returned from Array.prototype.map(). This will help "React identify which items have changed, are added, or are removed" and in your situation ensure filtering can work effectively. In your case it looks like each URL is unique so perhaps that can be used as an effective key:
code :
  <div>
    <h1>Filter</h1>
    <input value={this.state.text} onChange={e => this.handleChange(e)} />
    <ol>
      {filteredList.map((item, index) => {
        return (
          <div key={item}>
            {item} -{" "}
            <audio controls preload="none">
              <source src={item} type="audio/mpeg" />
            </audio>
          </div>
        );
      })}
    </ol>
  </div>
Has IOS13 broken <audio> tags used as audio buffers connected to the audio context?

Has IOS13 broken <audio> tags used as audio buffers connected to the audio context?


By : kimchibop
Date : September 30 2020, 07:00 AM
To fix this issue Unfortunately, AudioContext.createMediaElementSource has been broken since the release of iOS 13. The bug has been fixed: https://bugs.webkit.org/show_bug.cgi?id=203435. It's in Safari Technology Preview 99.
Related Posts Related Posts :
  • Make web service not accessible by browser?
  • Select DOM elements within template
  • How to customize angular ui-grid row background color?
  • Binding data in two respective $scope in AngularJS, how?
  • react put some props after import class
  • Variable is distributed among same components
  • switch class in jQuery/JavaScript for active/inactive state
  • How To Track Outbound Clicks Using Javascript
  • How to get total seconds elapsed since the beginning of the month?
  • Protractor: Stale element reference at "browser.wait(EC.visibilityOf(confDial), FIFTY_SECONDS);"
  • Access to an array inside an object
  • Reseting an JavaScript Interval with different value?
  • Learning Angular for the first time - version 2 or 4?
  • Rendering RSS feed (XML) in React with jquery, why do object values parsed from the feed seem empty?
  • Node.js xml2js http.request tag matching
  • applying texture to custom plane geometry in Threejs
  • How do I pass an Event as a function parameter in HTML written inside JavaScript variable?
  • Interface of object parameter with default value and default property
  • Does using try / catch rather than `.catch` observable operator with XHR requests reduce performance?
  • In IE11 background colors not working on printing
  • TypeScript interface signature "(): string"
  • Is synchronous XMLHttpRequest supported in Internet Explorer 10 and 11?
  • Axios function not returning any values with js
  • How to use firestore TIMESTAMP to create time-stamp in JavaScript
  • shadow
    Privacy Policy - Terms - Contact Us © voile276.org