Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/main/scala/org/scalajs/dom/experimental/webrtc/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@ package object webrtc {
@js.native
trait NavigatorMediaStream extends js.Object {

/**
* The MediaDevices getUserMedia() method prompts the user for permission to use a media input
* which produces a MediaStream with tracks containing the requested types of media. That stream
* can include, for example, a video track (produced by either a hardware or virtual video source
* such as a camera, video recording device, screen sharing service, and so forth), an audio track
* (similarly, produced by a physical or virtual audio source like a microphone, A/D converter, or
* the like), and possibly other track types.
*
* MDN
*
* @see [[https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia]]
*/
def mediaDevices: MediaDevices
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Scaladoc does not correspond to this member. You took the one from MediaDevices but it should be the one from Navigator.mediaDevices.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would also be best to add = js.native to that method, so that it is not considered as abstract. This is what we typically do for interfaces that are actually implemented natively by the DOM.


@deprecated(
"Navigator.getUserMedia() is deprecated, use Navigator.mediaDevices.getUserMedia() instead.",
"2014-05-28")
def getUserMedia(constraints: MediaStreamConstraints,
success: js.Function1[MediaStream, Any],
error: js.Function1[DOMError, Any]): Unit = js.native
Expand Down