Adjusting Tab Volume in Manifest V3 outside of the popup

조회수 124회
읽지 않은 첫 메시지로 건너뛰기

Gawbly

읽지 않음,
2023. 2. 11. 오전 9:31:2723. 2. 11.
받는사람 Chromium Extensions
I had my extension have a volume control added to the dom of my website of interest, Upon updating the volume slider, the content script sends a message to the background page with the new volume, which then the bg page changes the volume through chrome.tabCapture.capture -> audioContext.gainNode 

Since the background page cant access tabCapture directly without user action, on each new tab, i had the user right click and click on a context menu item of the extension to enable access to tab capture.

Right now with manifest v3, this seems to be impossible to do with the service worker. My volume control seems to have to be inside the popup. bad ux imo

To be frank, i am not quite sure why one has to have access to the entire audiocontext just to be able to simply change the volume. There should be an abstraction giving us access to the gainNode only, this way less permissions are required, and less room for extensions that's sole purpose is to change tab's volume to be malicious. 
It also removes the need for the annoying caveat or using tabCapture where the user can't go full screen on a video for example
전체답장
작성자에게 답글
전달
새 메시지 0개