Search completed in 1.18 seconds.
3 results for "mediastreamerror":
Navigator.getUserMedia() - Web APIs
Web › API › Navigator › getUserMedia
as a camera or shared screen) and up to one audio input device (such as a microphone) as the source for a MediaStream. If permission is granted, a MediaStream whose video and/or audio tracks come from those devices is delivered to the specified success callback. If permission is denied, no compatible input devices exist, or any other error condition occurs, the error callback is executed with a MediaStreamError object describing what went wrong. If the user instead doesn't make a choice at all, neither callback is executed. This is a legacy method. Please use the newer navigator.mediaDevices.getUserMedia() instead. While technically not deprecated, this old callback version is marked as such, since the specification strongly encourages using the newer promise returning version. Syntax navigator.get...
... the stream to the desired object (such as an <audio> or <video> element), as shown in the following example: function(stream) { var video = document.querySelector('video'); video.srcObject = stream; video.onloadedmetadata = function(e) { // Do something with the video here. }; } errorCallback When the call fails, the function specified in the errorCallback is invokedwith a MediaStreamError object as its sole argument; this object is is modeled on DOMException. See {anch("Errors")}} below for a list of the errors which can occur. Return value undefined. Errors Examples Width and height Here's an example of using getUserMedia(), including code to cope with various browsers' prefixes. Note that this is the deprecated way of doing it: See the Examples section under the MediaDe...
MediaStreamTrack.applyConstraints() - Web APIs
Web › API › MediaStreamTrack › applyConstraints
object represents the basic set of constraints that must apply for the Promise to resolve. The object may contain an advanced property containing an array of additional MediaTrackConstrants objects, which are treated as exact requires. Return value A Promise which resolves when the constraints have been successfully applied. If the constraints cannot be applied, the promise is rejected with a MediaStreamError whose name is OverconstrainedError, to indicate that the constraints could not be met. This can happen if the specified constraints are too strict to find a match when attempting to configure the track. Examples The following shows how to specify a basic and advanced set of constraints. It specifies that the page or web app needs a width between 640 and 1280 and a height between 480 and 720, wi...
MediaStreamTrack.onoverconstrained - Web APIs
Web › API › MediaStreamTrack › onoverconstrained
verconstrained event is received. Such an event is sent when the track is again able to send data. Syntax track.onoverconstrained = function; Values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}. An event handler always has one single parameter, containing the event, here of type MediaStreamErrorEvent. Example dc.onoverconstrained = function() { alert("overconstrained event detected!"); }; ...