본문으로 바로가기

TIL 2023-02-08 Chrome Manifest V3 tabCapture

category TIL 2023. 2. 8. 23:27

Audio Controller 같은 크롬 익스텐션을 만들고 싶은데, 문제가 있었다.

 

audio를 캡쳐해서 AudioContext로 만들어서 다시 탭에 쏴주는 것이 background 스크립트에서 하는 예제가 정배인데,

 

Chrome Manifest V3부터는 background에서는 tabCapture 기능을 사용하지 못한다는 것!!

 

https://stackoverflow.com/questions/66217882/properly-using-chrome-tabcapture-in-a-manifest-v3-extension

 

Properly using chrome.tabCapture in a manifest v3 extension

Edit: As the end of the year and the end of Manifest V2 is approaching I did a bit more research on this and found the following workarounds: The example here that uses the desktopCapture API: htt...

stackoverflow.com

이 글에서도 관련된 내용을 묻는 내용이 있다.

 

그리고 이 질문자가 찾은 두가지 방법은

 

desktopCapture를 사용하는 것

 

tabCapture를 접근할 수 있는 inactive tab을 생성해서 거기서 active tab에 관한 내용을 다루는 것이다.

 

나의 상황과 조금 다른 점이라면 이 친구는 audio Record를 하고 싶은 것이고, 나는 실시간으로 audioContext를 조작해 변형된 소리를 주고 싶다는 차이점이 있다.

 

일단 한번 해봐야겠다.

 

 

 

Chrome Extension V3에 오면서 다양한 것들이 많이 바뀌었는데, 이것이 V2의 유즈케이스를 모두 충족시키면서 만들어진거 같지 않다는 생각이 마구마구 든다. 물론 보안적 관점에서 Deprecated했다고는 하지만....