Stay organized with collections
Save and categorize content based on your preferences.
OnTimedTextListener
interface OnTimedTextListener
Interface definition of a callback to be invoked when a timed text is available for display.
Summary
Public methods |
abstract Unit |
Called to indicate an avaliable timed text
|
Public methods
onTimedText
abstract fun onTimedText(
mp: MediaPlayer!,
text: TimedText!
): Unit
Called to indicate an avaliable timed text
Parameters |
mp |
MediaPlayer!: the MediaPlayer associated with this callback |
text |
TimedText!: the timed text sample which contains the text needed to be displayed and the display format. |
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# MediaPlayer.OnTimedTextListener\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnTimedTextListener\n===================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/MediaPlayer.OnTimedTextListener \"View this page in Java\") \n\n```\ninterface OnTimedTextListener\n```\n\n|----------------------------------------------------|\n| [android.media.MediaPlayer.OnTimedTextListener](#) |\n\nInterface definition of a callback to be invoked when a timed text is available for display.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onTimedText](#onTimedText(android.media.MediaPlayer,%20android.media.TimedText))`(`mp:` `[MediaPlayer](/reference/kotlin/android/media/MediaPlayer)!`, `text:` `[TimedText](/reference/kotlin/android/media/TimedText)!`)` Called to indicate an avaliable timed text |\n\nPublic methods\n--------------\n\n### onTimedText\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onTimedText(\n mp: MediaPlayer!, \n text: TimedText!\n): Unit\n```\n\nCalled to indicate an avaliable timed text\n\n| Parameters ||\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `mp` | [MediaPlayer](/reference/kotlin/android/media/MediaPlayer)!: the MediaPlayer associated with this callback |\n| `text` | [TimedText](/reference/kotlin/android/media/TimedText)!: the timed text sample which contains the text needed to be displayed and the display format. |"]]