MediaStreamTrack.onmute

Vous lisez la version anglaise de ce contenu car il n’existe pas encore de traduction dans cette langue. Aidez-nous à traduire cet article !

MediaStreamTrack's onmute event handler is called when the mute event is received. Such an event is sent when the track is temporarily not able to send data.

Syntax

track.onmute = muteHandler;

Value

A function to serve as an EventHandler for the mute event. The event handler function receives a single parameter: the event object, which is a simple Event object.

Example

In this example, an onmute handler is established to set the content HTML of an element to display the "muted speaker" Emoji.

myTrack.onmute = function(evt) {
  playStateIcon.innerHTML = "&#1F507;";
}; 

Specifications

Specification Status Comment
Media Capture and Streams
The definition of 'MediaStreamTrack.onmute' in that specification.
Candidate Recommendation Initial specification.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
onmute
Non-standard
Chrome Full support YesEdge Full support 12Firefox Full support 59IE No support NoOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 59Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.

See also