opentok / accelerator-core-js

Accelerator Core provides a simple way to integrate real-time audio/video into your web application using the OpenTok Platform
https://www.vonage.com/communications-apis/video/
MIT License
25 stars 38 forks source link

"Calling setStyle() has no effect" warning #75

Open alexey-zuy opened 5 years ago

alexey-zuy commented 5 years ago

New issue checklist

General information

Bug report

Expected behavior

No warnings in console.

Actual behavior

Warnings from opentok.

console.js:35 OpenTok:StylableComponent:warn Calling setStyle() has no effect because theshowControls option was set to false +0ms e.(anonymous function) @ console.js:35 o @ common.js:118 e.setStyle @ stylable_component.js:268 publish @ index.js:1123 (anonymous) @ init.js:529 (anonymous) @ communication.js:211 value @ communication.js:205 (anonymous) @ communication.js:262 value @ communication.js:237 (anonymous) @ communication.js:438 value @ communication.js:389 value @ core.js:762 (anonymous) @ index.js:formatted:3845 (anonymous) @ react-dom.production.min.js:14 f @ react-dom.production.min.js:15 (anonymous) @ react-dom.production.min.js:15 L @ react-dom.production.min.js:17 T @ react-dom.production.min.js:18 S @ react-dom.production.min.js:18 j @ react-dom.production.min.js:21 kn @ react-dom.production.min.js:84 is @ react-dom.production.min.js:241 Re @ react-dom.production.min.js:39 Tn @ react-dom.production.min.js:86 ss @ react-dom.production.min.js:241 On @ react-dom.production.min.js:85 o @ raven.js:376

Steps to reproduce

...

Crash log? Screenshots? Videos? Sample project?

...

Question or Feature Request

...

Stefjs commented 4 years ago

In the documentation found here it says:

You can disable all of these by setting the showControls property to false in the properties parameter you pass into the OT.initPublisher() method or the Session.subscribe() method.

So when the buttonDisplayMode is set to off when the showControls is set to false it will throw the warning, so go ahead and remove the buttonDisplayMode to get rid of the warning.

showControls: false, style: { buttonDisplayMode: 'off', }

michaeljolley commented 4 years ago

@alexey-zuy, that's an interesting request. The thought process here is that in seeing the warning you can modify your code to eliminate a call that is unnecessary. Is there a reason we should rethink this?