https://www.electronjs.org/ja/docs/latest/api/shared-texture • 42 KB fetched Open original page
sharedTexture | Electron
メインコンテンツへ飛ぶ
Electron ドキュメント API ブログ ツール
* Electron Forge
* Electron Fiddle
コミュニティ
* ガバナンス
* 事例紹介
* リソース
リリース 日本語
* English
* Deutsch
* Español
* Français
* 日本語
* Português
* Русский
* 中文
検索
* メインプロセスモジュール
* app
* autoUpdater
* BaseWindow
* BrowserView
* Deprecated
* BrowserWindow
* clipboard
* contentTracing
* crashReporter
* desktopCapturer
* dialog
* globalShortcut
* ImageView
* inAppPurchase
* ipcMain
* Menu
* MenuItem
* MessageChannelMain
* MessagePortMain
* nativeImage
* nativeTheme
* net
* netLog
* Notification
* powerMonitor
* powerSaveBlocker
* process
* protocol
* pushNotifications
* safeStorage
* screen
* session
* sharedTexture
* ShareMenu
* shell
* systemPreferences
* TouchBar
* Tray
* utilityProcess
* webContents
* WebContentsView
* webFrameMain
* 表示
* レンダラープロセスモジュール
* Utility Process Modules
* カスタム DOM 要素
* Chromium と Node.js
* クラス
* API の構造体
*
* メインプロセスモジュール
* sharedTexture 目次
sharedTexture
Import shared textures into Electron and converts platform specific handles into VideoFrame . Supports all Web rendering systems, and can be transferred across Electron processes. Read here for more information.
Process: Main , Renderer
メソッド
The sharedTexture module has the following methods:
Note: Experimental APIs are marked as such and could be removed in the future.
sharedTexture.importSharedTexture(options) Experimental
* options Object - Options for importing shared textures.
* textureInfo SharedTextureImportTextureInfo - The information of the shared texture to import.
* allReferencesReleased Function (optional) - Called when all references in all processes are released. You should keep the imported texture valid until this callback is called.
Imports the shared texture from the given options.
note
This method is only available in the main process.
Returns SharedTextureImported - The imported shared texture.
sharedTexture.sendSharedTexture(options, ...args) Experimental
* options Object - Options for sending shared texture.
* frame WebFrameMain - The target frame to transfer the shared texture to. For WebContents , you can pass webContents.mainFrame . If you provide a webFrameMain that is not a main frame, you'll need to enable webPreferences.nodeIntegrationInSubFrames for this, since this feature requires IPC between main and the frame.
* importedSharedTexture SharedTextureImported - The imported shared texture.
* ...args any[] - Additional arguments to pass to the renderer process.
Send the imported shared texture to a renderer process. You must register a receiver at renderer process before calling this method. This method has a 1000ms timeout. Ensure the receiver is set and the renderer process is alive before calling this method.
note
This method is only available in the main process.
Returns Promise<void> - Resolves when the transfer is complete.
sharedTexture.setSharedTextureReceiver(callback) Experimental
* callback Function<Promise<void>> - The function to receive the imported shared texture.
* receivedSharedTextureData Object - The data received from the main process.
* importedSharedTexture SharedTextureImported - The imported shared texture.
* ...args any[] - Additional arguments passed from the main process.
Set a callback to receive imported shared textures from the main process.
note
This method is only available in the renderer process.
プロパティ
The sharedTexture module has the following properties:
sharedTexture.subtle Experimental
A SharedTextureSubtle property, provides subtle APIs for interacting with shared texture for advanced users.
このページを編集
前
session
次
ShareMenu
* メソッド
* importSharedTexture
* sendSharedTexture
* setSharedTextureReceiver
* プロパティ
* subtle
ドキュメント
* 始めましょう
* API リファレンス
チェックリスト
* パフォーマンス
* セキュリティ
ツール
* Electron Forge
* Electron Fiddle
コミュニティ
* ガバナンス
* リソース
* Discord
* Bluesky
* X
* Mastodon
* Stack Overflow
その他
* GitHub
* Open Collective
* Infrastructure Dashboard
Copyright OpenJS Foundation and Electron contributors. All rights reserved. The OpenJS Foundation has registered trademarks and uses trademarks. For a list of trademarks of the OpenJS Foundation , please see our Trademark Policy and Trademark List . Trademarks and logos not indicated on the list of OpenJS Foundation trademarks are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them. The OpenJS Foundation | Terms of Use | Privacy Policy | Bylaws | Code of Conduct | Trademark Policy | Trademark List | Cookie Policy
Hosting and infrastructure graciously provided by