News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
How to determine embeddable has initialized
Tags: ringcentral embeddable
Nov 15, 2020 at 10:45am   •   0 replies  •  0 likes
Sukhminder Arora

Hi,

After looking at several code samples and existing documents, it's unclear how to determine if the embeddable has loaded and is ready to register new services etc. (e.g. run a script to register a callLogger and other services).


For example, this doc suggests that we can listen to the 'rc-ev-init' message, but that doesn't appear to work on the latest embeddable.

https://developers.ringcentral.com/engage/voice/guide/embeddable/get-started#inject-into-web-app


Additional Considerations:

At first, i was trying to register services after the 'ringcentral-embeddable/adapter.js' script itself loaded, but that wasn't working, and I discovered I needed to wait further before being able to successfully register a service.

I've tried console logging all events after the script load, to confirm there is no message of type ' 'rc-ev-init' that was referenced in the link above.

The messages that do appear in the console sometimes repeat, whereas i'm looking for an initialization event I can rely on that also only occurs once.

Ideally, unlike the documented example, there would be an approach for running my own initialization code that doesn't require me to create an event listener that runs indefinitely with no hook for knowing when it can be torn down.


Advice appreciated.


Thank you,


-S. Arora



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us