Stay organized with collections
Save and categorize content based on your preferences.
OnJetEventListener
interface OnJetEventListener
Handles the notification when the JET engine generates an event.
Summary
Public methods |
abstract Unit |
Callback for when the JET engine generates a new event.
|
abstract Unit |
Callback for when JET's number of queued segments is updated.
|
abstract Unit |
Callback for when JET pause state is updated.
|
abstract Unit |
Callback for when JET's currently playing segment's userID is updated.
|
Public methods
onJetEvent
abstract fun onJetEvent(
player: JetPlayer!,
segment: Short,
track: Byte,
channel: Byte,
controller: Byte,
value: Byte
): Unit
Callback for when the JET engine generates a new event.
Parameters |
player |
JetPlayer!: the JET player the event is coming from |
segment |
Short: 8 bit unsigned value |
track |
Byte: 6 bit unsigned value |
channel |
Byte: 4 bit unsigned value |
controller |
Byte: 7 bit unsigned value |
value |
Byte: 7 bit unsigned value |
onJetNumQueuedSegmentUpdate
abstract fun onJetNumQueuedSegmentUpdate(
player: JetPlayer!,
nbSegments: Int
): Unit
Callback for when JET's number of queued segments is updated.
Parameters |
player |
JetPlayer!: the JET player the status update is coming from |
nbSegments |
Int: the number of segments in the JET queue |
onJetPauseUpdate
abstract fun onJetPauseUpdate(
player: JetPlayer!,
paused: Int
): Unit
Callback for when JET pause state is updated.
Parameters |
player |
JetPlayer!: the JET player the status update is coming from |
paused |
Int: indicates whether JET is paused (1) or not (0) |
onJetUserIdUpdate
abstract fun onJetUserIdUpdate(
player: JetPlayer!,
userId: Int,
repeatCount: Int
): Unit
Callback for when JET's currently playing segment's userID is updated.
Parameters |
player |
JetPlayer!: the JET player the status update is coming from |
userId |
Int: the ID of the currently playing segment |
repeatCount |
Int: the repetition count for the segment (0 means it plays once) |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# JetPlayer.OnJetEventListener\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnJetEventListener\n==================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/JetPlayer.OnJetEventListener \"View this page in Java\") \n\n```\ninterface OnJetEventListener\n```\n\n|-------------------------------------------------|\n| [android.media.JetPlayer.OnJetEventListener](#) |\n\nHandles the notification when the JET engine generates an event.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onJetEvent](#onJetEvent(android.media.JetPlayer,%20kotlin.Short,%20kotlin.Byte,%20kotlin.Byte,%20kotlin.Byte,%20kotlin.Byte))`(`player:` `[JetPlayer](/reference/kotlin/android/media/JetPlayer)!`, `segment:` `[Short](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short/index.html)`, `track:` `[Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html)`, `channel:` `[Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html)`, `controller:` `[Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html)`, `value:` `[Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html)`)` Callback for when the JET engine generates a new event. |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onJetNumQueuedSegmentUpdate](#onJetNumQueuedSegmentUpdate(android.media.JetPlayer,%20kotlin.Int))`(`player:` `[JetPlayer](/reference/kotlin/android/media/JetPlayer)!`, `nbSegments:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Callback for when JET's number of queued segments is updated. |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onJetPauseUpdate](#onJetPauseUpdate(android.media.JetPlayer,%20kotlin.Int))`(`player:` `[JetPlayer](/reference/kotlin/android/media/JetPlayer)!`, `paused:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Callback for when JET pause state is updated. |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onJetUserIdUpdate](#onJetUserIdUpdate(android.media.JetPlayer,%20kotlin.Int,%20kotlin.Int))`(`player:` `[JetPlayer](/reference/kotlin/android/media/JetPlayer)!`, `userId:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `repeatCount:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Callback for when JET's currently playing segment's userID is updated. |\n\nPublic methods\n--------------\n\n### onJetEvent\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onJetEvent(\n player: JetPlayer!, \n segment: Short, \n track: Byte, \n channel: Byte, \n controller: Byte, \n value: Byte\n): Unit\n```\n\nCallback for when the JET engine generates a new event.\n\n| Parameters ||\n|--------------|------------------------------------------------------------------------------------------------------|\n| `player` | [JetPlayer](/reference/kotlin/android/media/JetPlayer)!: the JET player the event is coming from |\n| `segment` | [Short](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short/index.html): 8 bit unsigned value |\n| `track` | [Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html): 6 bit unsigned value |\n| `channel` | [Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html): 4 bit unsigned value |\n| `controller` | [Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html): 7 bit unsigned value |\n| `value` | [Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html): 7 bit unsigned value |\n\n### onJetNumQueuedSegmentUpdate\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onJetNumQueuedSegmentUpdate(\n player: JetPlayer!, \n nbSegments: Int\n): Unit\n```\n\nCallback for when JET's number of queued segments is updated.\n\n| Parameters ||\n|--------------|---------------------------------------------------------------------------------------------------------------------|\n| `player` | [JetPlayer](/reference/kotlin/android/media/JetPlayer)!: the JET player the status update is coming from |\n| `nbSegments` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the number of segments in the JET queue |\n\n### onJetPauseUpdate\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onJetPauseUpdate(\n player: JetPlayer!, \n paused: Int\n): Unit\n```\n\nCallback for when JET pause state is updated.\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------------------------------------------------|\n| `player` | [JetPlayer](/reference/kotlin/android/media/JetPlayer)!: the JET player the status update is coming from |\n| `paused` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): indicates whether JET is paused (1) or not (0) |\n\n### onJetUserIdUpdate\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onJetUserIdUpdate(\n player: JetPlayer!, \n userId: Int, \n repeatCount: Int\n): Unit\n```\n\nCallback for when JET's currently playing segment's userID is updated.\n\n| Parameters ||\n|---------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| `player` | [JetPlayer](/reference/kotlin/android/media/JetPlayer)!: the JET player the status update is coming from |\n| `userId` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the ID of the currently playing segment |\n| `repeatCount` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the repetition count for the segment (0 means it plays once) |"]]