persistent-serviceworker
captureSystemAudio
persistent-serviceworker | captureSystemAudio | |
---|---|---|
8 | 46 | |
20 | 39 | |
- | - | |
2.8 | 2.8 | |
4 months ago | about 2 months ago | |
JavaScript | JavaScript | |
- | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
persistent-serviceworker
-
How to keep a serviceworker (background.js) alive in a chrome extension
Here you go persistent-serviceworker.
-
[AskJS] Do specification authors and implementers listen to developers in the field?
The ServiceWorker becoming inactive in 5 minutes per MV3 is a debacle. Workarounds exist and the code to implement keeping the ServiceWorker persistent, e.g., to stream live radio station from the ServiceWorker to the client winds up not saving any resources - we have to keep something running to keep the service worker running. You would be hard-pressed to count how many issues in the wild have been filed in multiple source code repositories just on that lack of functionality - for years now, e.g., Need help to understand and use this #2.
-
[AskJS] What are the worst case scenarios for programmatically setting arbitrary Web pages (Origins) as Client or WindowClient of a ServiceWorker?
There are workarounds which involve using an iframe https://github.com/guest271314/persistent-serviceworker/tree/main/chromium_extension_web_accessible_resources_iframe_message_event or window.open() https://github.com/guest271314/sw-transfer-stream or and offscreen document https://github.com/guest271314/offscreen-webrtc with WebRTC - however that involves loading an entire HTML document, and each has its own deficienfies - with all of the Window features that we do not really need just to transfer data between the Web page I have control of and the ServiceWorker I have control of.
-
Transfer ArrayBuffer from ServiceWorker to Web page
One approach for your requirement is to append an iframe with src set to an HTML document listed in "web_accessible_resources" to an arbitrary document and use postMessage() from the Web page to the iframe, then from the iframe to the MV3 ServiceWorker, see https://github.com/guest271314/persistent-serviceworker/tree/main/chromium_extension_web_accessible_resources_iframe_message_event.
-
How to have background:persistent in V3?
See https://github.com/guest271314/persistent-serviceworker
-
Manifest 3 limitation with background.js
Yes, it is possible to keep an extension or non-extension ServiceWorker persistent, active indefinitely https://github.com/guest271314/persistent-serviceworker.
-
Confirming isolation of cross-domain iframe (chrome extension context)
If you host the HTML for and use
"web_accessible_resources"
in manifest.json the</code> can communicate directly with MV3 <code>ServiceWorker</code>. </p> <p>To keep MV3 <code>ServiceWorker</code> persistent see <a href="https://github.com/guest271314/persistent-serviceworker">https://github.com/guest271314/persistent-serviceworker</a>.</p> </div>
-
Manifest v3: how to mitigate the timeout of the service worker?
I utilize "web_accessible_resources" with an , where chrome.* API's are exposed, and does not become inactive.
Some workarounds to keep MV3
ServiceWorker
active Persistent ServiceWorker.
captureSystemAudio
-
JavaScript Standard Input/Output: Unspecified
Synchronous. Though non-blocking when we read the message from the browser, execute the command, then stream data output from the local application to the browser piped from QuickJS std.popen(), capture_system_audio.js
-
IAMA senior javascript dev, ask me anything
I've already achieved the requirement multiple ways, already; from using Native Messaging https://github.com/guest271314/native-messaging-espeak-ng, to using GNU Core Utilities tail, to Deno.watchFs() https://github.com/guest271314/fs, et al., see captureSystemAudio. The one approach I have not yet achieved is compiling to Emscripten - with SSML support.
-
Need help with ytdl-core and ExpressJS
Sure, see https://github.com/guest271314/captureSystemAudio/blob/master/native_messaging/capture_system_audio/background.js, in pertinent part
-
Kindly review this C QuickJS HTTP streaming Web server module
This is my second time writing C source code capture_system_audio.c. I got a lot of help doing that, too . I basically implemented the same Native Messaging host algorithm in C, C++, Python, WASI/WebAssembly, and JavaScript (Node.js, QuickJS) which is the programming language I write code most using.
-
Termino.js: Create command based apps on any website - great for games, chat-bots, animations and real world apps!
I just fetch the nightly node executable, get rid of everything else in the archive, use .mjs extension for import to work without package.json, then I can connect to the host https://github.com/guest271314/native-messaging-nodejs, and start subprocesses, e.g., raw PCM streams, where stdout is streamed to the client (browser), e.g, https://github.com/guest271314/captureSystemAudio/blob/master/native_messaging/capture_system_audio/capture_system_audio_node.js.
-
How to serve exactly 1 HTML file and 1 JavaScript file, then exit the program?
Technically I can just serve the raw data as long as the server is capable of opening creating sub-processes, e.g., using EventSource https://plnkr.co/edit/qX5tepJ38BuDOSZj?preview, in which case I would just need to convert this https://github.com/guest271314/captureSystemAudio/blob/master/native_messaging/capture_system_audio/capture_system_audio.c to accept GET request, read the URL, and send the named event stream to the client.
-
[AskJS] Has anybody implemented and compiled ServiceWorker specification to a standalone executable?
Chromium and Chrome refuses to capture monitor devices on Linux. Read this https://github.com/edisionnano/Screenshare-with-audio-on-Discord-with-Linux README and the README at https://github.com/guest271314/captureSystemAudio very carefully. At best you can capture tab audio, not whatever is output to speakears and headphones, in spite of the systemAudio constraints, which is poorly named, and actually misleading.
-
[AskJS] Do specification authors and implementers listen to developers in the field?
How is capturing speechSynthesis.speak() a security vector https://github.com/guest271314/captureSystemAudio?
-
What chrome extensions are you using in 2023?
Capture audio output to speakers or headphones to MP3 or Opus in WebM https://github.com/guest271314/captureSystemAudio/tree/master/native_messaging/capture_system_audio
-
You can learn React and Python in browser without dev environment.
An example of using Native Messaging to capture "What-U-Hear", sound output to speakers and headphone, launching native GUI's https://github.com/guest271314/captureSystemAudio/tree/master/native_messaging/capture_system_audio; an adapter for espeak-ng so we can capture the output of speech synthesis engine and stream output to the browser https://github.com/guest271314/native-messaging-espeak-ng.
What are some alternatives?
developer.chrome.com - The frontend, backend, and content source code for developer.chrome.com
libdatachannel - C/C++ WebRTC network library featuring Data Channels, Media Transport, and WebSockets
offscreen-webrtc - Offscreen document <=> WebRTC Data Channel <=> Web page
proposal-do-expressions - Proposal for `do` expressions
playwright-dotnet - .NET version of the Playwright testing and automation library.
comet - Browser extension to replace Youtube comments with Reddit comments or view the Reddit comments of any webpage.
sw-transfer-stream - MV3 ServiceWorker => ReadableStream => Web page
native-messaging-bash - Bash Native Messaging host.
ServiceWorkerFullVideoBuffer - A service worker that buffers a full video, so when the video tag ask for ranges, these can be satisfied. Play + pause = buffer the whole video.
webextensions-examples - Example Firefox add-ons created using the WebExtensions API
mediacapture-main - Media Capture and Streams specification (aka getUserMedia)
GoogleNetworkSpeechSynthesis - Google's Network Speech Synthesis: Bring your own Google API key and proxy