Search completed in 1.16 seconds.
22 results for "unmute":
Your results are loading. Please wait...
MediaStreamTrack: unmute event - Web APIs
The unmute event is sent to a MediaStreamTrack when the track's source is once again able to provide media data after a period of not being able to do so. This ends the muted state that began with the mute event. Bubbles No Cancelable No Interface Event Event handler property onunmute Note: The condition that most people think of as "muted" (that is, a user-controllable way to silence a track) is actually managed using the MediaStreamTrack.enabled property, for which there are no events. Examples In this example, event handlers are established for the mute and unmute events in order to detect when the media is not flowing from the source for the MediaStreamTrack stored in the variable musicTrack. musicTrack.addEventListener("mute", ev...
...re are no events. Examples In this example, event handlers are established for the mute and unmute events in order to detect when the media is not flowing from the source for the MediaStreamTrack stored in the variable musicTrack. musicTrack.addEventListener("mute", event => { document.getElementById("timeline-widget").style.backgroundColor = "#aaa"; }, false); musicTrack.addEventListener("unmute", event => { document.getElementById("timeline-widget").style.backgroundColor = "#fff"; }, false); With these event handlers in place, when the track musicTrack enters its muted state, the element with the ID timeline-widget gets its background color changed to #aaa. When the track exits the muted state--detected by the arrival of an unmuted event--the background color is restored to white. Y...
...t.getElementById("timeline-widget").style.backgroundColor = "#fff"; }, false); With these event handlers in place, when the track musicTrack enters its muted state, the element with the ID timeline-widget gets its background color changed to #aaa. When the track exits the muted state--detected by the arrival of an unmuted event--the background color is restored to white. You can also use the onunmute event handler property to set up a handler for this event; similarly, the onmute event handler is available for setting up a handler for the mute event. The following example shows this: musicTrack.onmute = event => { document.getElementById("timeline-widget").style.backgroundColor = "#aaa"; } musicTrack.mute = event = > { document.getElementById("timeline-widget").style.backgroundColor = "...
...ndler for the mute event. The following example shows this: musicTrack.onmute = event => { document.getElementById("timeline-widget").style.backgroundColor = "#aaa"; } musicTrack.mute = event = > { document.getElementById("timeline-widget").style.backgroundColor = "#fff"; } Specifications Specification Status Comment Media Capture and StreamsThe definition of 'unmute' in that specification. Candidate Recommendation Initial specification. ...
MediaStreamTrack.onunmute - Web APIs
MediaStreamTrack's onunmute event handler is called when the unmute event is received. Such an event is sent when the track is again able to send data. When the onunmute event handler is called, the track's muted flag is false. Syntax track.onunmute = unmuteHandler; Value unmuteHandler is a function which is called when the MediaStreamTrack receives the unmute event. The event handler receives as input a single parameter: an Event whose kind is "unmute". Example This example creates an unmute event handler which changes the state of a visual indicator to display the Emoji character representing a "speaker" icon. ...
... Candidate Recommendation Initial specification. ...
... kind is "unmute". Example This example creates an unmute event handler which changes the state of a visual indicator to display the Emoji character representing a "speaker" icon. myTrack.onunmute = function(evt) { playStateIcon.innerHTML = "🔈"; }; Specifications Specification Status Comment Media Capture and StreamsThe definition of 'MediaStreamTrack.onunmute' in that specification. Candidate Recommendation Initial specification. ...
HTMLIFrameElement.unmute()
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The unmute() method of the HTMLIFrameElement unmutes any audio playing in the browser <iframe>. Syntax instanceOfHTMLIframeElement.unmute(); Returns Void. Parameters None. Example var browser = document.querySelector('iframe'); browser.unmute(); Specification Not part of any specification. ...
MediaStreamTrack: mute event - Web APIs
The mute event is sent to a MediaStreamTrack when the track's source is temporarily unable to provide media data. When the track is once again able to produce media output, an unmute event is sent. During the time between the mute event and the unmute event, the value of the track's muted property is true. Note: The condition that most people think of as "muted" (that is, a user-toggled state of silencing a track) is actually managed using the MediaStreamTrack.enabled property, for which there are no events. ...
... condition that most people think of as "muted" (that is, a user-toggled state of silencing a track) is actually managed using the MediaStreamTrack.enabled property, for which there are no events. ...
...er property onmute Examples In this example, event handlers are established for the mute and unmute events in order to detect when the media is not flowing from the source for the MediaStreamTrack referenced by musicTrack. musicTrack.addEventListener("mute", event => { document.getElementById("timeline-widget").style.backgroundColor = "#aaa"; }, false); musicTrack.addEventListener("unmute", event => { document.getElementById("timeline-widget").style.backgroundColor = "#fff"; }, false); With these event handlers in place, when the track musicTrack enters its muted state, the element with the ID timeline-widget gets its background color changed to #aaa. When the track exits the muted state--detected by the arrival of an unmute event--the background color is restored to white. Yo...
... With these event handlers in place, when the track musicTrack enters its muted state, the element with the ID timeline-widget gets its background color changed to #aaa. When the track exits the muted state--detected by the arrival of an unmute event--the background color is restored to white. You can also use the onmute event handler property to set up a handler for this event; similarly, the onunmute event handler is available for setting up a handler for the unmute event. The following example shows this: musicTrack.onmute = event => { document.getElementById("timeline-widget").style.backgroundColor = "#aaa"; } musicTrack.mute = event = > { document.getElementById("timeline-widget").style.backgroundColor = "#fff"; } Specifications Specification Status Comment ...
Index - Web APIs
Web › API › Index
ent interface's currentTime property specifies the current playback time in seconds. 1778 HTMLMediaElement.defaultMuted API, HTML DOM, HTMLMediaElement, Property, Web The HTMLMediaElement.defaultMuted property reflects the muted HTML attribute, which indicates whether the media element's audio output should be muted by default. This property has no dynamic effect. To mute and unmute the audio output, use the muted property. 1779 HTMLMediaElement.defaultPlaybackRate API, HTML DOM, HTMLMediaElement, Property, Web The HTMLMediaElement.defaultPlaybackRate property indicates the default playback rate for the media. 1780 HTMLMediaElement.disableRemotePlayback The HTMLMediaElement.disableRemotePlayback property determines whether the media...
...e event handler is called when the mute event is received. 2473 MediaStreamTrack.onoverconstrained API, Event Handler, Property, Reference, Reference(2), WebRTC The MediaStreamTrack.onoverconstrained event handler is a property called when the overconstrained event is received. Such an event is sent when the track is again able to send data. 2474 MediaStreamTrack.onunmute API, Event Handler, Media Capture, Media Capture and Streams, MediaStreamTrack, Property, Reference, WebRTC, onunmute, unmute MediaStreamTrack's onunmute event handler is called when the unmute event is received. Such an event is sent when the track is again able to send data. 2475 MediaStreamTrack.readyState API, Media Stream API, MediaStreamTrack, Property, Read-only, R...
...treaming has stopped because the end of the media was reached or because no further data is available. 2479 MediaStreamTrack: mute event API, Audio, Event, Media, Media Capture and Streams, MediaStreamTrack, Reference, Video, mute The mute event is sent to a MediaStreamTrack when the track's source is temporarily unable to provide media data. 2480 MediaStreamTrack: unmute event Audio, Media, Media Capture and Streams, Media Streams, MediaStreamTrack, Reference, Video, events, unmute The unmute event is sent to a MediaStreamTrack when the track's source is once again able to provide media data after a period of not being able to do so. 2481 MediaStreamTrackAudioSourceNode The MediaStreamTrackAudioSourceNode interface is a type of Aud...
Video player styling basics - Developer guides
This has now been changed ...
..., .controls button:focus { opacity:0.5; } To obtain appropriate button images, a set of free common control set icons was downloaded from the web. Each image was then converted to a base64 encoded string (using an online base64 image encoder), since the images are quite small, the resultant encoded strings are quite short. Since some buttons have dual functionality, e.g. play/pause, and mute/unmute, these buttons have different states that need to be styled. As mentioned earlier, a `data-state` variable is used to indicate which state such buttons are currently in. For example, the play/pause button has the following background image definitions (the full base64 strings have been omitted for brevity): .controls button[data-state="play"] { background-image: url('data:image/png;base64,iV...
...s functionality: var changeButtonState = function(type) { // Play/Pause button if (type == 'playpause') { if (video.paused || video.ended) { playpause.setAttribute('data-state', 'play'); } else { playpause.setAttribute('data-state', 'pause'); } } // Mute button else if (type == 'mute') { mute.setAttribute('data-state', video.muted ? ...
HTMLIFrameElement.getMuted()
a Promise version: instanceOfHTMLIframeElement.getMuted().then(function(muted) { ... }); Returns Callback version: A DOMRequest that represents the get muted request. It has an onsuccess handler to handle the success case, and an onerror handler to handle the failure case. The muted value is available in the request.result property, and is a Boolean value -- true means muted, and false means unmuted. Promise version: A Promise that resolves with the muted value -- a Boolean where true means muted, and false means unmuted. Parameters None. Example Callback version: var browser = document.querySelector('iframe'); var request = browser.getMuted(); request.onsuccess = function() { if(request.result) { console.log('The browser is muted.'); } else { console.log('The browser i...
... Promise version: A Promise that resolves with the muted value -- a Boolean where true means muted, and false means unmuted. Parameters None. Example Callback version: var browser = document.querySelector('iframe'); var request = browser.getMuted(); request.onsuccess = function() { if(request.result) { console.log('The browser is muted.'); } else { console.log('The browser is unmuted.'); } } Promise version: var browser = document.querySelector('iframe'); browser.getMuted().then(function(muted) { if(muted) { console.log('The browser is muted.'); } else { console.log('The browser is unmuted.'); } }); Specification Not part of any specification. ...
BaseAudioContext.createGain() - Web APIs
of the audio graph. Syntax var gainNode = AudioContext.createGain(); Return value A GainNode which takes as input one or more audio sources and outputs audio whose volume has been adjusted in gain (volume) to a level specified by the node's GainNode.gain a-rate parameter. Example The following example shows basic usage of an AudioContext to create a GainNode, which is then used to mute and unmute the audio when a Mute button is clicked by changing the gain property value. The below snippet wouldn't work as is -- for a complete working example, check out our Voice-change-O-matic demo (view source.) <div> <button class="mute">Mute button</button> </div> var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); var gainNode = audioCtx.createGain(); var mute = document.que...
....connect(gainNode); gainNode.connect(audioCtx.destination); ... mute.onclick = voiceMute; function voiceMute() { if(mute.id == "") { // 0 means mute. If you still hear something, make sure you haven't // connected your source into the output in addition to using the GainNode. gainNode.gain.setValueAtTime(0, audioCtx.currentTime); mute.id = "activated"; mute.innerHTML = "Unmute"; } else { gainNode.gain.setValueAtTime(1, audioCtx.currentTime); mute.id = ""; mute.innerHTML = "Mute"; } } Specifications Specification Status Comment Web Audio APIThe definition of 'createGain()' in that specification. Working Draft ...
GainNode.gain - Web APIs
Web › API › GainNode › gain
rate AudioParam representing the amount of gain to apply. Syntax var audioCtx = new AudioContext(); var gainNode = audioCtx.createGain(); gainNode.gain.value = 0.5; Value An AudioParam. Note: Though the AudioParam returned is read-only, the value it represents is not. Example The following example shows basic usage of an AudioContext to create a GainNode, which is then used to mute and unmute the audio when a Mute button is clicked by changing the gain property value. The below snippet wouldn't work as is -- for a complete working example, check out our Voice-change-O-matic demo (view source.) <div> <button class="mute">Mute button</button> </div> var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); var gainNode = audioCtx.createGain(); var mute = document.que...
....connect(gainNode); gainNode.connect(audioCtx.destination); ... mute.onclick = voiceMute; function voiceMute() { if(mute.id == "") { // 0 means mute. If you still hear something, make sure you haven't // connected your source into the output in addition to using the GainNode. gainNode.gain.setValueAtTime(0, audioCtx.currentTime); mute.id = "activated"; mute.innerHTML = "Unmute"; } else { gainNode.gain.setValueAtTime(1, audioCtx.currentTime); mute.id = ""; mute.innerHTML = "Mute"; } } Specifications Specification Status Comment Web Audio APIThe definition of 'gain' in that specification. Working Draft ...
GainNode - Web APIs
Web › API › GainNode
AudioNode. GainNode.gain Read only Is an a-rate AudioParam representing the amount of gain to apply. You have to set AudioParam.value or use the methods of AudioParam to change the effect of gain. Methods No specific method; inherits methods from its parent, AudioNode. Example The following example shows basic usage of an AudioContext to create a GainNode, which is then used to mute and unmute the audio when a Mute button is clicked by changing the gain property value. The below snippet wouldn't work as is -- for a complete working example, check out our Voice-change-O-matic demo (view source.) <div> <button class="mute">Mute button</button> </div> var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); var gainNode = audioCtx.createGain(); var mute = document.que...
....connect(gainNode); gainNode.connect(audioCtx.destination); ... mute.onclick = voiceMute; function voiceMute() { if(mute.id == "") { // 0 means mute. If you still hear something, make sure you haven't // connected your source into the output in addition to using the GainNode. gainNode.gain.setValueAtTime(0, audioCtx.currentTime); mute.id = "activated"; mute.innerHTML = "Unmute"; } else { gainNode.gain.setValueAtTime(1, audioCtx.currentTime); mute.id = ""; mute.innerHTML = "Mute"; } } Specifications Specification Status Comment Web Audio APIThe definition of 'GainNode' in that specification. Working Draft ...
MediaStreamTrack - Web APIs
phone". The string may be left empty and is empty as long as no source has been connected. When the track is deassociated from its source, the label is not changed. MediaStreamTrack.muted Read only Returns a Boolean value indicating whether the track is unable to provide media data due to a technical issue. Note: You can implement standard "mute" functionality by setting enabled to false, and unmute the media by setting it back to true again. MediaStreamTrack.readonly Read only Returns a Boolean value with a value of true if the track is readonly (such a video file source or a camera that settings can't be modified), false otherwise. MediaStreamTrack.readyState Read only Returns an enumerated value giving the status of the track. This will be one of the following values: "live" w...
...t whenever the value of the isolated property changes due to the document gaining or losing permission to access the track. Also available through the onisolationchange event handler property. overconstrained Sent when the constraints specified for the track cause the track to be incompatible and therefore to not be used. Also available through the onoverconstrained event handler property. unmute Sent to the track when data becomes available again, ending the muted state. Also available through the onunmute event handler property. Specifications Specification Status Comment Identity for WebRTCThe definition of 'Isolated tracks' in that specification. Candidate Recommendation Additional properties for isolated track support Media Capture and ...
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
the camera and microphone stream, allowing the local user to see what the other peer sees. Handling incoming tracks We next need to set up a handler for track events to handle inbound video and audio tracks that have been negotiatied to be received by this peer connection. To do this, we implement the the RTCPeerConnection's ontrack event handler. pc.ontrack = ({track, streams}) => { track.onunmute = () => { if (remoteVideo.srcObject) { return; } remoteVideo.srcObject = streams[0]; }; }; When the track event occurs, this handler executes. Using destructuring, the RTCTrackEvent's track and streams properties are extracted. The former is either the video track or the audio track being received. The latter is an array of MediaStream objects, each representing a stream con...
...ck and streams properties are extracted. The former is either the video track or the audio track being received. The latter is an array of MediaStream objects, each representing a stream containing this track (a track may in rare cases belong to multiple streams at once). In our case, this will always contain one stream, at index 0, because we passed one stream into addTrack() earlier. We add an unmute event handler to the track, because the track will become unmuted once it starts receiving packets. We put the remainder of our reception code in there. If we already have video coming in from the remote peer (which we can see if the remote view's <video> element's srcObject property already has a value), we do nothing. Otherwise, we set srcObject to the stream at index 0 in the streams array. ...
Browser API
<iframe> is the currently active frame. Audio-related methods The following methods allow direct control of sound in the browser element. HTMLIFrameElement.getVolume() Gets the current volume of the browser <iframe>. HTMLIFrameElement.setVolume() Sets the current volume of the browser <iframe>. HTMLIFrameElement.mute() Mutes any audio playing in the browser <iframe>. HTMLIFrameElement.unmute() Unmutes any audio playing in the browser <iframe>. HTMLIFrameElement.getMuted() Indicates whether the browser <iframe> is currently muted. Event-related methods In order to manage the browser <iframe>'s content, many new events were added (see below). The following methods are used to deal with those events: The <iframe> gains support for the methods of the EventTarget interface addEv...
AudioTrack - Web APIs
Properties enabled A Boolean value which controls whether or not the audio track's sound is enabled. Setting this value to false mutes the track's audio. id Read only A DOMString which uniquely identifies the track within the media. ...
HTMLMediaElement.defaultMuted - Web APIs
Syntax var dMuted = video.defaultMuted; audio.defaultMuted = true; Value A Boolean. A value of true means that the audio output will be muted by default. ...
MediaStreamTrack.enabled - Web APIs
o effect. Syntax const enabledFlag = track.enabled track.enabled = [true | false] Value When true, enabled indicates that the track is permitted to render its actual media to the output. When enabled is set to false, the track only generates empty frames. Empty audio frames have every sample's value set to 0. Empty video frames have every pixel set to black. Note: When implementing a mute/unmute feature, you should use the enabled property. Usage notes If the MediaStreamTrack represents the video input from a camera, disabling the track by setting enabled to false also updates device activity indicators to show that the camera is not currently recording or streaming. For example, the green "in use" light next to the camera in iMac and MacBook computers turns off while the track is mut...
MediaStreamTrack.muted - Web APIs
The muted read-only property of the MediaStreamTrack interface returns a Boolean value indicating whether or not the track is currently unable to provide media output. To implement a way for users to mute and unmute a track, use the enabled property. When a track is disabled by setting enabled to false, it generates only empty frames (audio frames in which every sample is 0, or video frames in which every pixel is black). Syntax const mutedFlag = track.muted Value A Boolean which is true if the track is currently muted, or false if the track is currently unmuted. When possible, avoid polling muted to monitor the track's muting status. Instead, add event listeners for the mute and unmute events. Example This example counts the number of tracks in an array of MediaStreamTrack objects ...
Media Capture and Streams API (Media Stream) - Web APIs
r URL Early versions of the Media Capture and Streams API specification included separate AudioStreamTrack and VideoStreamTrack interfaces--each based upon MediaStreamTrack--which represented streams of those types. These no longer exist, and you should update any existing code to instead use MediaStreamTrack directly. Events addtrack ended muted overconstrained removetrack started unmuted Guides and tutorials The articles below provide additional guidance and how-to information that will help you learn to use the API, and how to perform specific tasks that you may wish to handle. Capabilities, constraints, and settingsThe twin concepts of constraints and capabilities let the browser and Web site or app exchange information about what constrainable properties the br...
ARIA: button role - Accessibility
mute" could indicate that sound is muted by setting the aria-pressed state true. The label of a toggle button should not change when its state changes. In our example the label remains "Mute" with a screen reader reading "Mute toggle button pressed" or "Mute toggle button not pressed" depending on the value of aria-pressed. If the design were to call for the button label to change from "Mute" to "Unmute," a toggle button would not be appropriate, so the the aria-pressed attribute would be omitted. Keyboard interactions Key Function Enter Activates the button. Space Activates the button Following button activation, focus is set depending on the type of action the button performs. For example, if clicking the button opens a dialog, the focus should move...
Adding captions and subtitles to HTML5 video - Developer guides
ideo-controls" class="controls" data-state="hidden"> <button id="playpause" type="button" data-state="play">Play/Pause</button> <button id="stop" type="button" data-state="stop">Stop</button> <div class="progress"> <progress id="progress" value="0" min="0"> <span id="progress-bar"></span> </progress> </div> <button id="mute" type="button" data-state="mute">Mute/Unmute</button> <button id="volinc" type="button" data-state="volup">Vol+</button> <button id="voldec" type="button" data-state="voldown">Vol-</button> <button id="fs" type="button" data-state="go-fullscreen">Fullscreen</button> <button id="subtitles" type="button" data-state="subtitles">CC</button> </div> CSS Changes The video controls have undergone some minor changes in order to make sp...
Creating a cross-browser video player - Developer guides
unctionality, which is explained later on). <ul id="video-controls" class="controls"> <li><button id="playpause" type="button">Play/Pause</button></li> <li><button id="stop" type="button">Stop</button></li> <li class="progress"> <progress id="progress" value="0" min="0"> <span id="progress-bar"></span> </progress> </li> <li><button id="mute" type="button">Mute/Unmute</button></li> <li><button id="volinc" type="button">Vol+</button></li> <li><button id="voldec" type="button">Vol-</button></li> <li><button id="fs" type="button">Fullscreen</button></li> </ul> Each button is given an id so it can be easily accessed with JavaScript. The span within the <progress> element is for browsers that do not support the progress element and will be updated at the...
Autoplay guide for media and Web Audio APIs - Web media technologies
ke this: <video src="/videos/awesomevid.webm" controls autoplay muted> This video element is configured to include the user controls (typically play/pause, scrubbing through the video's timeline, volume control, and muting); also, since the muted attribute is included, the video will autoplay but with the audio muted. The user has the option, however, of re-enabling the audio by clicking on the unmute button in the controls. Browser configuration options Browsers may have preferences that control the way autoplay works, or how autoplay blocking is handled. Here, any such preferences that may be of special significance or importance to you as a web developer are listed. These include any that may aid in testing or debugging as well as any that could be set in a way that you need to be prepare...