By calling the library as a function it performs the WebRTC check in the browser. This function MUST be called before attempting to use the library.
It returns true
if the browser supports WebRTC.
Returns true
if the browser supports WebRTC.
Returns true
if rtcninja()
was already called.
Returns a String with the version of the library.
rtcninja.version
=> "X.Y.Z"
Provides access to the debug module.
Provides access to the native navigator.mediaDevices
object (if supported), which includes Promise based getUserMedia()
and enumerateDevices()
methods as the specification defines.
Provides a wrapper over the native navigator.(webkit|moz)getUserMedia()
function. As a feature, if WebRTC is not supported this function fires the given errorCallback
instead of throwing an error.
Provides a wrapper over the native navigator.getMediaDevices()
or MediaStreamTrack.getSources()
.
NOTE: This method does not exist (rtcninja.getMediaDevices === undefined
) if the browser does not support any of the native implementations to get the list of media devices.
Provides access to the rtcninja.RTCPeerConnection
class, which wrappes a native (webkit|moz)RTCPeerConnection
.
Wrapper for the native RTCSessionDescription
class.
Wrapper for the native RTCIceCandidate
class.
Wrapper for the native MediaStreamTrack
class.
Sets the given stream
(of type MediaStream
) as the source of the <video>
or <audio>
element pointed by element
.
Returns the element
itself.
Closes the given stream
(of type MediaStream
).
Boolean indicating whether SDP renegotiation is properly supported by the current WebRTC engine.