StandardizedEventHandlepublic interface MediaEventHandle extends StandardizedEventHandle
Media events include playback and pause.
StandardizedEventHandleSystemCapability.MultimodalInput#MULTIMODAL_INPUT| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
onMediaControl(MultimodalEvent multimodalEvent) |
Called when a media control event occurs, either playback or pause.
|
boolean |
onPause(MultimodalEvent multimodalEvent) |
Called when the playback is paused.
|
boolean |
onPlay(MultimodalEvent multimodalEvent) |
Called when the media is played.
|
boolean onPlay(MultimodalEvent multimodalEvent)
multimodalEvent - Indicates the multimodal input event information that contains the intent of media
playback.true if the event is handled; returns false otherwise.onPause(MultimodalEvent multimodalEvent)。boolean onPause(MultimodalEvent multimodalEvent)
multimodalEvent - Indicates the multimodal input event information that contains the intent of pausing the
playback.true if the event is handled; returns false otherwise.onPlay(MultimodalEvent multimodalEvent)。boolean onMediaControl(MultimodalEvent multimodalEvent)
This method is used when the specific media intent in the passed event cannot be determined. For example, it is undetermined whether the intent is to execute the playback or pause command because the current playback status cannot be obtained.
multimodalEvent - Indicates the multimodal input event information that contains the intent of playback or
pause.true if the event is handled; returns false otherwise.