new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

Electron · API · all subjects

webcontents: media & capture

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

MediaAccessPermissionRequest object structure

MediaAccessPermissionRequest extends PermissionRequest and contains the following properties: securityOrigin (string, optional) - The security origin of the request; mediaTypes (string[], optional) - The types of media access being requested.

MediaAccessPermissionRequest mediaTypes values

The mediaTypes property can contain elements with values 'video' or 'audio'. For a media permission request, video represents the camera and audio represents the microphone. For a display-capture permission request, video represents the screen, window or tab video and audio represents its audio.

WebPreferences autoplayPolicy property

The `autoplayPolicy` string property applies autoplay policy to content in the window. Accepted values are `no-user-gesture-required`, `user-gesture-required`, or `document-user-activation-required`. Defaults to `no-user-gesture-required`.

webview audio methods

setAudioMuted(muted) sets guest page muted state (boolean). isAudioMuted() returns whether guest page has been muted. isCurrentlyAudible() returns whether audio is currently playing.

webview media events

media-started-playing event emits when media starts playing. media-paused event emits when media is paused or done playing.

Give your agent this brain