Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
Builder to create a PlaybackEvent object.

Constructors

new PlaybackEventBuilder()

new PlaybackEventBuilder(): PlaybackEventBuilder

Returns

PlaybackEventBuilder

Methods

buildActiveEvent()

buildActiveEvent(): PlaybackEvent Builds a PlaybackEvent object with the fields set on the builder for a playback event that occured on-device. If EventTimestamp is not set, it will be set as the current time.

Returns

PlaybackEvent The PlaybackEvent object created.

Throws

InvalidArgumentError if required fields are not set.

buildOffDeviceEvent()

buildOffDeviceEvent(): PlaybackEvent Builds a PlaybackEvent object with the fields set on the builder for a playback event that occured off-device.

Returns

PlaybackEvent The PlaybackEvent object created.

Throws

InvalidArgumentError if required fields are not set.
Last modified on October 2, 2025