id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
Electron/Using_Screen_Capture8_84_0.txt | MDN logo
Your blueprint for a better internet. | |
Electron/web-contents8_314_0.txt | Takes a V8 heap snapshot and saves it to ` filePath ` .
#### ` contents.getBackgroundThrottling() ` â | |
Electron/recording-the-entire-desktop-in-angular-98_36_0.txt | Sorted by: Reset to default
Highest score (default) Trending (recent votes count more) Date modified
(newest first) Date created (oldest first) | |
Electron/Electron_7_1.txt | .log('Tracing started')
await new Promise(resolve => setTimeout(resolve, 5000))
const path = await contentTracing.stopRecording()
console.log('Tracing data recorded to ' + path)
})()
})
## Methods â
The ` contentTracing ` module has the following methods:
### `... | |
Electron/web-contents8_220_0.txt | Executes the editing command ` selectAll ` in web page.
#### ` contents.unselect() ` â | |
Electron/web-contents8_143_0.txt | Returns:
* ` event ` Event
* ` preferredSize ` Size \- The minimum size needed to contain the layout of the documentâwithout requiring scrolling. | |
Electron/recording-the-entire-desktop-in-angular-98_28_0.txt | 19 7 7 bronze badges
4 | |
Electron/web-contents8_292_0.txt | #### ` contents.savePage(fullPath, saveType) ` â
* ` fullPath ` string - The absolute file path.
* ` saveType ` string - Specify the save type.
* ` HTMLOnly ` \- Save only the HTML of the page.
* ` HTMLComplete ` \- Save complete-html page.
* ` MHTML ` \- Save complete-html page as MHTML. | |
Electron/1941460_12_0.txt | The next step is to create handlers in the Main process to handle messages
from the Renderer process.
Let's navigate back to the ` main.js ` file and add the necessary handlers. | |
Electron/recording-the-entire-desktop-in-angular-98_61_0.txt | Saving desktopCapturer to video file in Electron
#### Related | |
Electron/web-contents8_267_0.txt | * ` x ` Integer
* ` y ` Integer
Starts inspecting element at position ( ` x ` , ` y ` ). | |
Electron/web-contents8_322_0.txt | 1. ` contents.on('ipc-message') `
2. ` contents.mainFrame.on(channel) `
3. ` contents.ipc.on(channel) `
4. ` ipcMain.on(channel) `
Handlers registered with ` invoke ` will be checked in the following order.
The first one that is defined will be called, the rest will be ignored. | |
Electron/web-contents8_4_0.txt | * English
* Deutsch
* Español
* Français
* æ¥æ¬èª
* Português
* Ð ÑÑÑкий
* 䏿
Search | |
Electron/web-contents8_146_0.txt | * ` event ` Event
* ` details ` Object
* ` frame ` WebFrameMain
Emitted when the mainFrame , an ` <iframe> ` , or a nested ` <iframe> ` is
loaded within the page. | |
Electron/web-contents8_29_0.txt | #### Event: 'did-fail-load' â
Returns: | |
Electron/recording-the-entire-desktop-in-angular-98_80_0.txt | * Blog
* Facebook
* Twitter
* LinkedIn
* Instagram
Site design / logo © 2024 Stack Exchange Inc; user contributions licensed
under CC BY-SA . rev 2024.4.30.8466 | |
Electron/recording-the-entire-desktop-in-angular-98_50_0.txt | Submit
### Post as a guest | |
Electron/recording-the-entire-desktop-in-angular-98_22_0.txt | I have already tried to harness the RecordRTC library, and it does record
video with audio, but not of my desktop, but of the web camera.
It is heavily underdocumented for Angular, and Electron's documentation is
missing a working example. | |
Electron/web-contents8_95_0.txt | * ` event ` Event
* ` query ` string - text to query for.
Emitted when 'Search' is selected for text in its context menu. | |
Electron/web-contents8_219_0.txt | Executes the editing command ` delete ` in web page.
#### ` contents.selectAll() ` â | |
Electron/web-contents8_173_0.txt | #### ` contents.goBack() ` â
Makes the browser go back a web page. | |
Electron/web-contents8_28_0.txt | #### Event: 'did-finish-load' â
Emitted when the navigation is done, i.e. the spinner of the tab has stopped
spinning, and the ` onload ` event was dispatched. | |
Electron/web-contents8_8_0.txt | * * Main Process Modules
* webContents
On this page | |
Electron/Electron_5_2.txt | uirrel.Mac) README for more information.
Sets the ` url ` and initialize the auto updater.
### ` autoUpdater.getFeedURL() ` â
Returns ` string ` \- The current update feed URL.
### ` autoUpdater.checkForUpdates() ` â
Asks the server whether there is an update. You must call ` setFeedURL `
before using this ... | |
Electron/web-contents8_228_0.txt | * ` text ` string
Executes the editing command ` replace ` in web page. | |
Electron/recording-the-entire-desktop-in-angular-98_44_0.txt | Reminder: Answers generated by artificial intelligence tools are not allowed
on Stack Overflow. Learn more
Thanks for contributing an answer to Stack Overflow! | |
Electron/Using_Screen_Capture8_70_0.txt | html
<p>
This example shows you the contents of the selected part of your display.
Click the Start Capture button to begin.
</p>
<p>
<button id="start">Start Capture</button> <button id="stop">
Stop Capture
</button>
</p>
<video id="video" au... | |
Electron/Electron_6_9.txt |
* ` newBounds ` [ Rectangle ](/docs/latest/api/structures/rectangle) \- Size the window is being resized to.
* ` details ` Object
* ` edge ` (string) - The edge of the window being dragged for resizing. Can be ` bottom ` , ` left ` , ` right ` , ` top-left ` , ` top-right ` , ` bottom-left ` or ` bottom-rig... | |
Electron/web-contents8_147_0.txt | ### Instance Methods â
#### ` contents.loadURL(url[, options]) ` â | |
Electron/Using_Screen_Capture8_35_0.txt | ### Example of a window allowing the user to select a display surface to
capture
You can then use the captured stream, ` captureStream ` , for anything that
accepts a stream as input. The examples below show a few ways to make use of
the stream. | |
Electron/recording-the-entire-desktop-in-angular-98_48_0.txt | ### Sign up or log in
Sign up using Google | |
Electron/web-contents8_32_0.txt | * ` event ` Event
* ` errorCode ` Integer
* ` errorDescription ` string
* ` validatedURL ` string
* ` isMainFrame ` boolean
* ` frameProcessId ` Integer
* ` frameRoutingId ` Integer
This event is like ` did-fail-load ` but emitted when the load was cancelled
(e.g. ` window.stop() ` was invoked). | |
Electron/Using_Screen_Capture8_33_0.txt | js
function startCapture(displayMediaOptions) {
return navigator.mediaDevices
.getDisplayMedia(displayMediaOptions)
.catch((err) => {
console.error(err);
return null;
});
}
| |
Electron/Using_Screen_Capture8_38_0.txt | A user agent might allow the capture of the entire content of an obscured
window after gaining permission from the user to do so. In this case, the user
agent may include the obscured content, either by getting the current contents
of the hidden portion of the window or by presenting the most-recently-visible
contents ... | |
Electron/web-contents8_134_0.txt | Returns:
* ` event ` Event
* ` level ` Integer - The log level, from 0 to 3. In order it matches ` verbose ` , ` info ` , ` warning ` and ` error ` .
* ` message ` string - The actual console message
* ` line ` Integer - The line number of the source that triggered this console message
* ` sourceId ` str... | |
Electron/web-contents8_325_0.txt | #### ` contents.userAgent ` â
A ` string ` property that determines the user agent for this web page. | |
Electron/web-contents8_196_0.txt | * ` handler ` Function < {action: 'deny'} | {action: 'allow', outlivesOpener?: boolean, overrideBrowserWindowOptions?: BrowserWindowConstructorOptions}\ >
* ` details ` Object
* ` url ` string - The resolved version of the URL passed to ` window.open() ` . e.g. opening a window with ` window.open('foo... | |
Electron/web-contents8_38_0.txt | #### Event: 'page-title-updated' â
Returns: | |
Electron/web-contents8_210_0.txt | #### ` contents.undo() ` â
Executes the editing command ` undo ` in web page. | |
Electron/web-contents8_341_0.txt | utilityProcess
Next | |
Electron/web-contents8_315_0.txt | Returns ` boolean ` \- whether or not this WebContents will throttle
animations and timers when the page becomes backgrounded. This also affects
the Page Visibility API.
#### ` contents.setBackgroundThrottling(allowed) ` â | |
Electron/Using_Screen_Capture8_13_0.txt | * JavaScript
Learn to run scripts in the browser | |
Electron/Using_Screen_Capture8_30_0.txt |
const displayMediaOptions = {
video: {
displaySurface: "browser",
},
audio: {
suppressLocalAudioPlayback: false,
},
preferCurrentTab: false,
selfBrowserSurface: "exclude",
systemAudio: "include",
surfaceSwitching: "include",
monitorType... | |
Electron/Electron_1_0.txt | Skip to main content
[   **Electron** ](/) [ Docs ](/docs/latest/) [
API ](/docs/latest/api/app) [ Blog ](/blog)
Tools
* [ Electron Forge ](https://electronforge.io)
* [ Electron Fiddle ](/fiddle)
Community
* [ Governance ](/... | |
Electron/web-contents8_339_0.txt | #### ` contents.opener ` Readonly â
A ` WebFrameMain ` property that represents the frame that opened this
WebContents, either with open(), or by navigating a link with a target
attribute. | |
Electron/recording-the-entire-desktop-in-angular-98_20_0.txt | Modified 3 years, 11 months ago
Viewed 1k times | |
Electron/web-contents8_343_0.txt | Docs
* Getting Started
* API Reference | |
Electron/Electron_6_4.txt | rd title bar for macOS or Windows respectively.
* ` hidden ` \- Results in a hidden title bar and a full size content window. On macOS, the window still has the standard window controls (âtraffic lightsâ) in the top left. On Windows, when combined with ` titleBarOverlay: true ` it will activate the Window Co... | |
Electron/Electron_7_2.txt | svg) ](https://openjsf.org/)
Copyright © 2023 OpenJS Foundation and Electron contributors.
Hosting and infrastructure graciously provided by
  
  of the underlying platform. It is possible for all three methods to be mapped to the same algorithm on a given platform.
Returns ` NativeImage ` \- The resized image.
If only the ` height ` or the ` width ` are specified then the current aspect
... | |
Electron/web-contents8_25_0.txt | When communicating with the Chrome DevTools Protocol , it can be useful to
lookup a WebContents instance based on its assigned TargetID.
async function lookupTargetId (browserWindow) {
const wc = browserWindow.webContents
await wc.debugger.attach('1.3')
const { targetInfo } = aw... | |
Electron/Electron_3_1.txt | macOS [ template images
](https://developer.apple.com/documentation/appkit/nsimage/1520017-template) .
Electron APIs that take image files accept either file paths or ` NativeImage
` instances. An empty and transparent image will be used when ` null ` is
passed.
For example, when creating a [ Tray ](/docs/latest/tuto... | |
Electron/web-contents8_243_0.txt | Use ` page-break-before: always; ` CSS style to force to print to a new page.
Example usage: | |
Electron/web-contents8_36_0.txt | #### Event: 'did-stop-loading' â
Corresponds to the points in time when the spinner of the tab stopped
spinning. | |
Electron/web-contents8_158_0.txt | Returns ` boolean ` \- Whether the web page is destroyed.
#### ` contents.close([opts]) ` â | |
Electron/Electron_3_5.txt | provided by
  
 
| |
Electron/web-contents8_126_0.txt | Returns:
* ` event ` Event
* ` dirtyRect ` Rectangle
* ` image ` NativeImage \- The image data of the whole frame. | |
Electron/Using_Screen_Capture8_56_0.txt | The object ` displayMediaOptions ` contains the options to pass into `
getDisplayMedia() ` ; here, the ` displaySurface ` property is set to `
window ` , indicating that the whole window should be captured.
Finally, event listeners are established to detect user clicks on the start
and stop buttons. | |
Electron/Using_Screen_Capture8_57_0.txt | js
const videoElem = document.getElementById("video");
const logElem = document.getElementById("log");
const startElem = document.getElementById("start");
const stopElem = document.getElementById("stop");
// Options for getDisplayMedia()
const displayMediaOptions = {
v... | |
Electron/recording-the-entire-desktop-in-angular-98_19_0.txt | Ask Question
Asked 3 years, 11 months ago | |
Electron/web-contents8_120_1.txt | canSave ` boolean - Whether or not the media element can be downloaded.
* ` canShowPictureInPicture ` boolean - Whether the media element can show picture-in-picture.
* ` isShowingPictureInPicture ` boolean - Whether the media element is currently showing picture-in-picture.
* ` canRotate ` boolean... | |
Electron/1941460_1_0.txt | Search
Write a publication | |
Electron/web-contents8_130_0.txt | * ` event ` Event
* ` webPreferences ` WebPreferences \- The web preferences that will be used by the guest page. This object can be modified to adjust the preferences for the guest page.
* ` params ` Record < string, string\ > \- The other ` <webview> ` parameters such as the ` src ` URL. This object can be... | |
Electron/Using_Screen_Capture8_36_0.txt | ### Visible vs. logical display surfaces
For the purposes of the Screen Capture API, a display surface is any content
object that can be selected by the API for sharing purposes. Sharing surfaces
include the contents of a browser tab, a complete window, and a monitor (or
group of monitors combined together into one... | |
Electron/web-contents8_176_0.txt | Navigates browser to the specified absolute web page index.
#### ` contents.goToOffset(offset) ` â | |
Electron/web-contents8_175_0.txt | #### ` contents.goToIndex(index) ` â
* ` index ` Integer | |
Electron/web-contents8_89_0.txt | #### Event: 'blur' â
Emitted when the ` WebContents ` loses focus. | |
Electron/web-contents8_75_0.txt | #### Event: 'unresponsive' â
Emitted when the web page becomes unresponsive. | |
Electron/1941460_11_0.txt | * electronMain:screen:getSources
*The names of the channels can be customized as per your preference. | |
Electron/web-contents8_148_0.txt | * ` url ` string
* ` options ` Object (optional)
* ` httpReferrer ` (string | Referrer ) (optional) - An HTTP Referrer url.
* ` userAgent ` string (optional) - A user agent originating the request.
* ` extraHeaders ` string (optional) - Extra headers separated by "\n".
* ` postData ` ( Uploa... | |
Electron/web-contents8_47_0.txt | #### Event: 'will-navigate' â
Returns: | |
Electron/Using_Screen_Capture8_61_0.txt | The ` startCapture() ` method, below, starts the capture of a ` MediaStream `
whose contents are taken from a user-selected area of the screen. `
startCapture() ` is called when the "Start Capture" button is clicked.
js | |
Electron/web-contents8_159_0.txt | * ` opts ` Object (optional)
* ` waitForBeforeUnload ` boolean - if true, fire the ` beforeunload ` event before closing the page. If the page prevents the unload, the WebContents will not be closed. The ` will-prevent-unload ` will be fired if the page requests prevention of unload.
Closes the page, as if th... | |
Electron/web-contents8_155_0.txt | #### ` contents.getURL() ` â
Returns ` string ` \- The URL of the current web page. | |
Electron/web-contents8_296_0.txt | #### ` contents.startPainting() ` â
If offscreen rendering is enabled and not painting, start painting. | |
Electron/web-contents8_328_0.txt | A ` number ` property that determines the zoom factor for this web contents.
The zoom factor is the zoom percent divided by 100, so 300% = 3.0. | |
Electron/web-contents8_225_0.txt | Example:
const win = new BrowserWindow()
// Adjusts the beginning of the selection 1 letter forward,
// and the end of the selection 5 letters forward.
win.webContents.adjustSelection({ start: 1, end: 5 })
// Adjusts the beginning of the selection 2 letters forward, ... | |
Electron/Using_Screen_Capture8_53_0.txt | ### Streaming screen capture
In this example, the contents of the captured screen area are streamed into a
` <video> ` element on the same page. | |
Electron/web-contents8_333_0.txt | A ` NavigationHistory ` used by this webContents.
#### ` contents.hostWebContents ` Readonly â | |
Electron/web-contents8_189_0.txt | * ` code ` string
* ` userGesture ` boolean (optional) - Default is ` false ` .
Returns ` Promise<any> ` \- A promise that resolves with the result of the
executed code or is rejected if the result of the code is a rejected promise. | |
Electron/web-contents8_272_0.txt | Opens the developer tools for the service worker context.
#### ` contents.send(channel, ...args) ` â | |
Electron/web-contents8_252_0.txt | #### ` contents.setDevToolsWebContents(devToolsWebContents) ` â
* ` devToolsWebContents ` WebContents | |
Electron/web-contents8_187_0.txt | Returns ` Promise<void> ` \- Resolves if the removal was successful.
Removes the inserted CSS from the current web page. The stylesheet is
identified by its key, which is returned from ` contents.insertCSS(css) ` . | |
Electron/recording-the-entire-desktop-in-angular-98_9_0.txt | 6. Companies
7. Labs | |
Electron/web-contents8_299_0.txt | #### ` contents.setFrameRate(fps) ` â
* ` fps ` Integer | |
Electron/Electron_6_16.txt |
More precisely the format is ` window:id:other_id ` where ` id ` is ` HWND `
on Windows, ` CGWindowID ` ( ` uint64_t ` ) on macOS and ` Window ` ( `
unsigned long ` ) on Linux. ` other_id ` is used to identify web contents
(tabs) so within the same top level window.
#### ` win.getNativeWindowHandle() ` â
Returns ... | |
Electron/Using_Screen_Capture8_75_0.txt | ## Security
In order to function when Permissions Policy is enabled, you will need the `
display-capture ` permission. This can be done using the ` Permissions-Policy
` HTTP header orâif you're using the Screen Capture API in an ` <iframe> `
, the ` <iframe> ` element's ` allow ` attribute. | |
Electron/web-contents8_87_0.txt | #### Event: 'zoom-changed' â
Returns: | |
Electron/web-contents8_254_0.txt | By default Electron manages the devtools by creating an internal ` WebContents
` with native view, which developers have very limited control of. With the `
setDevToolsWebContents ` method, developers can use any ` WebContents ` to
show the devtools in it, including ` BrowserWindow ` , ` BrowserView ` and `
<webview> `... | |
Electron/web-contents8_294_0.txt | #### ` contents.showDefinitionForSelection() ` macOS â
Shows pop-up dictionary that searches the selected word on the page. | |
Electron/web-contents8_327_0.txt | The original size is 0 and each increment above or below represents zooming
20% larger or smaller to default limits of 300% and 50% of original size,
respectively. The formula for this is ` scale := 1.2 ^ level ` .
#### ` contents.zoomFactor ` â | |
Electron/Electron_6_10.txt | The method underlying this event is built to handle older macOS-style trackpad
swiping, where the content on the screen doesn't move with the swipe. Most
macOS trackpads are not configured to allow this kind of swiping anymore, so
in order for it to emit properly the 'Swipe between pages' preference in `
System Prefere... | |
Electron/recording-the-entire-desktop-in-angular-98_24_0.txt | I don't want the ability to choose which window do I want to record, and I
would like to keep the webcamera turned off.
Thanks! | |
Electron/web-contents8_338_0.txt | #### ` contents.mainFrame ` Readonly â
A ` WebFrameMain ` property that represents the top frame of the page's frame
hierarchy. | |
Electron/web-contents8_206_0.txt | > NOTE : The zoom policy at the Chromium level is same-origin, meaning that
> the zoom level for a specific domain propagates across all instances of
> windows with the same domain. Differentiating the window URLs will make zoom
> work per-window.
#### ` contents.getZoomLevel() ` â | |
Electron/web-contents8_263_0.txt | #### ` contents.getDevToolsTitle() ` â
Returns ` string ` \- the current title of the DevTools window. This will only
be visible if DevTools is opened in ` undocked ` or ` detach ` mode. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.