The MediaTrackSettings
dictionary's cursor
property indicates whether or not the cursor should be captured as part of the video track included in the MediaStream
returned by getDisplayMedia()
.
Syntax
cursorSetting = mediaTrackSettings.cursor;
Value
The value of cursor
comes from the CursorCaptureConstraint
enumerated string type, and may have one of the following values:
always
- The mouse should always be visible in the video content of the {domxref("MediaStream"), unless the mouse has moved outside the area of the content.
motion
- The mouse cursor should always be included in the video if it's moving, and for a short time after it stops moving.
never
- The mouse cursor is never included in the shared video.
Specifications
Specification | Status | Comment |
Screen CaptureThe definition of 'MediaTrackSettings.cursor' in that specification. | Working Draft | Initial definition |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
cursor
|
Chrome
Full support 71 |
Edge
Full support ≤79 |
Firefox
No support No |
IE
No support No |
Opera
Full support Yes |
Safari
? |
WebView Android
Full support 71 |
Chrome Android
Full support 71 |
Firefox Android
No support No |
Opera Android
? |
Safari iOS
? |
Samsung Internet Android
Full support 10.0 |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
See also
- Screen Capture API
- Using the screen capture API
- Capabilities, constraints, and settings
MediaDevices.getDisplayMedia()
MediaStreamTrack.getConstraints()
MediaStreamTrack.applyConstraints()
MediaStreamTrack.getSettings()
MediaTrackSettings.cursor by Mozilla Contributors is licensed under CC-BY-SA 2.5.