MediaStreamTrack.onunmute

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.

myTrack.onunmute = function(evt) {
  playStateIcon.innerHTML = "🔈";
};

Specifications

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

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic support
Deprecated
Chrome Full support YesEdge Full support 12Firefox Full support 59IE No support NoOpera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 59Opera Android Full support YesSafari iOS ? Samsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.

See also

Document Tags and Contributors

Contributors to this page: fscholz, Sheppy, libbymc, teoli
Last updated by: fscholz,