|
2 | 2 | */
|
3 | 3 | package org.scalajs.dom.experimental.mediastream
|
4 | 4 |
|
5 |
| -import org.scalajs.dom.{Event, EventInit, EventTarget, TimeRanges} |
| 5 | +import org.scalajs.dom._ |
6 | 6 | import scala.scalajs.js
|
7 | 7 | import scala.scalajs.js.annotation._
|
8 | 8 | import scala.scalajs.js.|
|
@@ -525,40 +525,34 @@ trait MediaTrackSupportedConstraints extends js.Object {
|
525 | 525 | var groupId: js.UndefOr[Boolean] = js.undefined
|
526 | 526 | }
|
527 | 527 |
|
528 |
| -/** |
529 |
| - * The ImageCapture interface of the MediaStream Image Capture API provides methods |
530 |
| - * to enable the capture of images or photos from a camera or other photographic |
531 |
| - * device referenced through a valid MediaStreamTrack. |
532 |
| - * |
533 |
| - * MDN |
534 |
| - */ |
| 528 | +/** The ImageCapture interface of the MediaStream Image Capture API provides methods to enable the capture of images or |
| 529 | + * photos from a camera or other photographic device referenced through a valid MediaStreamTrack. |
| 530 | + * |
| 531 | + * MDN |
| 532 | + */ |
535 | 533 | @js.native
|
536 | 534 | @JSGlobal
|
537 | 535 | class ImageCapture(
|
538 | 536 | init: MediaStreamTrack
|
539 | 537 | ) extends js.Object {
|
540 | 538 |
|
541 |
| - /** |
542 |
| - * Returns a reference to the MediaStreamTrack passed to the constructor. |
543 |
| - * |
544 |
| - * MDN |
545 |
| - */ |
| 539 | + /** Returns a reference to the MediaStreamTrack passed to the constructor. |
| 540 | + * |
| 541 | + * MDN |
| 542 | + */ |
546 | 543 | val track: MediaStreamTrack = js.native
|
547 | 544 |
|
548 |
| - /** |
549 |
| - * Takes a single exposure using the video capture device sourcing a MediaStreamTrack and |
550 |
| - * returns a Promise that resolves with a Blob containing the data. |
551 |
| - * |
552 |
| - * MDN |
553 |
| - */ |
| 545 | + /** Takes a single exposure using the video capture device sourcing a MediaStreamTrack and returns a Promise that |
| 546 | + * resolves with a Blob containing the data. |
| 547 | + * |
| 548 | + * MDN |
| 549 | + */ |
554 | 550 | def takePhoto(): js.Promise[Blob] = js.native
|
555 | 551 |
|
556 |
| - /** |
557 |
| - * Takes a snapshot of the live video in a MediaStreamTrack, returning an ImageBitmap, if |
558 |
| - * successful. |
559 |
| - * |
560 |
| - * MDN |
561 |
| - */ |
| 552 | + /** Takes a snapshot of the live video in a MediaStreamTrack, returning an ImageBitmap, if successful. |
| 553 | + * |
| 554 | + * MDN |
| 555 | + */ |
562 | 556 | def grabFrame(): js.Promise[ImageBitmap] = js.native
|
563 | 557 | }
|
564 | 558 |
|
|
0 commit comments