Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

active

This article needs a technical review. How you can help.

The active read-only property of the MediaStream interface returns a Boolean value that will return to be  true if the MediaStream is active, else false.

Syntax

var isActive = MediaStream.active;

Value

A Boolean value that returns true if the MediaStream is active, or false otherwise.

Example

var promise = navigator.mediaDevices.getUserMedia({ 
  audio: true, 
  video: true 
});

promise.then(function(stream) {
  var startBtn = document.querySelector('#startBtn');
  startBtn.disabled = stream.active; 
};)

Specifications

Specification Status Comment
Media Capture and Streams
The definition of 'active' in that specification.
Editor's Draft Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (Yes) ? ? ? ?
Feature Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support No support (Yes) ? ? ? ? ? (Yes)

Document Tags and Contributors

 Contributors to this page: PushpitaPikuDey, jpmedley
 Last updated by: PushpitaPikuDey,