as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
メインコンテンツへスキップ
AudioPlayer is a component that implements the HTMLAudioElement interface that extends HTMLMediaElement interface. This is a typescript class and not a react native component. Apps need to create an instance of AudioPlayer and use it to start buffering the content without starting playback. It does not render the media controls GUI. Apps are expected to build their own media controls UI and control the playback experience.

Extends

  • MediaPlayer

Constructors

new AudioPlayer()

new AudioPlayer(audioType, audioUsage): AudioPlayer

Parameters

audioType?
AudioContentType | undefined Type of audio to play.
audioUsage?
AudioUsageType | undefined Reason for audio playback.

Returns

AudioPlayer

Methods

deinitialize()

deinitialize(): Promise<void>
DeInitiailzes the player.

Returns

Promise<void> Promise that is resolved when the player is deinitialized.

deinitializeSync()

deinitializeSync(timeoutInMs: number): MediaPlayerDeInitStatus
DeInitiailzes the player synchronously

Parameters

timeoutInMs
number time out threshold set by client to return the deinit control.

Returns

MediaPlayerDeInitStatus MediaPlayerDeInitStatus

initialize()

initialize(): Promise<void>
Initiailzes the player. Wait for the promise to be fulfilled before calling any other function.

Returns

Promise<void> Promise that is resolved when the player is initialized.

setMediaControlFocus()

setMediaControlFocus(componentInstance: IComponentInstance, mediaControlHandler?: any): Promise<void>
setup the component instance with current mediaplayer being used and pass mediaControlHandler in case client wants to opt handling of mediacontrol commands.

Parameters

componentInstance
IComponentInstance
mediaControlHandler?
any

Returns

Promise<void>
最終更新日 2026年8月25日