A component object on the canvas.
Returns any payload you have configured for the component in the Studio. Returns string
The payload of the component
Get the tags assigned to this layer in the studio. Returns Array<string>
An array of tags that were assigned to this layer.
Returns the unscaled width of this component (the width as seen in the Ceros Studio) Returns int
Returns the unscaled height of this component (the height as seen in the Ceros Studio) Returns int
Returns the x position of this component after any entry animations have completed Returns int
Returns the y position of this component after any entry animations have completed Returns int
Returns the text content of this component. If the component is not of type ‘text’, this will return undefined. Returns (string | undefined)
Returns the URL of the full-resolution version of this image. If this component is not an image, this will return undefined. Returns (string | undefined)
Returns the CerosPage that this component belongs to. Returns CerosPage
Is this a video? Returns boolean
Is this an image? Returns boolean
Is this text? Returns boolean
If this component is a video, this will start video playback.
If this component is a video, this will stop video playback.
If this component is a text component, this will set the text content on it. Parameters
textContent string The text to display in the text component
If this component is an image component, this will set the src of that image to the url provided. Parameters
If this is a text component, this resets the text content back to the original text provided in the Studio. If this is an image component, this resets the image src back to the original url.
Simulates the user clicking on this component. Any click interactions that have been configured for this component in the studio will be triggered.
Makes this component visible, and runs any entry animations that have been configured for this component in the studio. If the component is already visible, this will only have the effect of running entry animations.
Hides the component. If the component is already hidden, this will have no effect.
Subscribes to events fired on this specific component. Parameters
event CerosSDK.EVENTS The event to subscribe to.
callback function A callback function to be called when the event is fired.