Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
alexey-zuy opened this issue May 16, 2019 · 2 comments
Open
2 tasks done

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

alexey-zuy opened this issue May 16, 2019 · 2 comments
Assignees

Comments

@alexey-zuy
Copy link

New issue checklist

General information

  • Library version(s):
    opentok.js: 2.16.1,
    opentok-accelerator-core: 2.0.15
    opentok-annotation: 2.0.59
    opentok-archiving: 1.0.19,
    opentok-screen-sharing: 1.0.33
    opentok-text-chat: 1.0.30

  • iOS/Android/Browser version(s): Google Chrome 73

  • Devices/Simulators/Machine affected:

  • Reproducible in the demo project? (Yes/No):

  • Related issues:

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
Copy link

Stefjs commented Jan 8, 2020

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
Copy link
Contributor

@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?

@michaeljolley michaeljolley self-assigned this Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants