Chrome-Extensions icon indicating copy to clipboard operation
Chrome-Extensions copied to clipboard

Using API, user must click toolbar icon for extension before start recording

Open thebordella opened this issue 5 years ago • 2 comments

Using API to start recording from custom button, first time page is loaded after browser launch, extension does not 'wake up' to start recording.

recorder = new RecordRTC_Extension(recordConfig); recorder.startRecording();

Config is { enableTabCaptureAPI: true }

Above code causes extension to send post message 'startRecording' but never 'startedRecording'.

If user clicks "R" icon in toolbar for extension, then clicks custom button, API works fine and recording starts correctly. Next time browser launched, same problem.

Am I doing something wrong? Why does icon need to be clicked to start recording?

thebordella avatar Sep 23 '19 22:09 thebordella

@thebordella I noticed the same thing. I believe this is a deliberate restriction in the chrome.tabCapture API. See: https://developer.chrome.com/extensions/tabCapture#method-capture

I'm interested in using this as a way of recording video for selenium tests, but since selenium isn't able to interact with Chrome extensions it looks like it won't be a viable solution.

benshemmeld avatar Feb 23 '20 09:02 benshemmeld

@thebordella我注意到了同样的事情。 我相信这是chrome.tabCaptureAPI 中的故意限制。请参阅:https : //developer.chrome.com/extensions/tabCapture#method-capture

我有兴趣将其用作为 selenium 测试录制视频的一种方式,但由于 selenium 无法与 Chrome 扩展程序交互,因此它看起来不是一个可行的解决方案。

那是否有其他的方案可以绕过此限制? 例如在页面中增加一个按钮,或者模拟触发 chrome. browserAction

dengshicheng1996 avatar Jul 16 '21 09:07 dengshicheng1996