Stay organized with collections
Save and categorize content based on your preferences.
MediaPlayer.OnTimedTextListener
public
static
interface
MediaPlayer.OnTimedTextListener
android.media.MediaPlayer.OnTimedTextListener
|
Interface definition of a callback to be invoked when a
timed text is available for display.
Summary
Public methods
onTimedText
public abstract void onTimedText (MediaPlayer mp,
TimedText text)
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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nMediaPlayer.OnTimedTextListener\n===============================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/MediaPlayer.OnTimedTextListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nMediaPlayer.OnTimedTextListener\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------------|\n| android.media.MediaPlayer.OnTimedTextListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface definition of a callback to be invoked when a\ntimed text is available for display.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onTimedText](/reference/android/media/MediaPlayer.OnTimedTextListener#onTimedText(android.media.MediaPlayer,%20android.media.TimedText))`(`[MediaPlayer](/reference/android/media/MediaPlayer)` mp, `[TimedText](/reference/android/media/TimedText)` text) ` Called to indicate an avaliable timed text |\n\nPublic methods\n--------------\n\n### onTimedText\n\nAdded in [API level 16](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onTimedText (MediaPlayer mp, \n TimedText text)\n```\n\nCalled to indicate an avaliable timed text\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|------------------------------------------------------------------------------------------------------------------|\n| `mp` | `MediaPlayer`: the MediaPlayer associated with this callback \u003cbr /\u003e |\n| `text` | `TimedText`: the timed text sample which contains the text needed to be displayed and the display format. \u003cbr /\u003e |"]]