Stay organized with collections
Save and categorize content based on your preferences.
public
static
interface
MediaPlayer.OnBufferingUpdateListener
android.media.MediaPlayer.OnBufferingUpdateListener
|
Interface definition of a callback to be invoked indicating buffering
status of a media resource being streamed over the network.
Summary
Public methods |
abstract
void
|
onBufferingUpdate(MediaPlayer mp, int percent)
Called to update status in buffering a media stream received through
progressive HTTP download.
|
Public methods
public abstract void onBufferingUpdate (MediaPlayer mp,
int percent)
Called to update status in buffering a media stream received through
progressive HTTP download. The received buffering percentage
indicates how much of the content has been buffered or played.
For example a buffering update of 80 percent when half the content
has already been played indicates that the next 30 percent of the
content to play has been buffered.
Parameters |
mp |
MediaPlayer : the MediaPlayer the update pertains to |
percent |
int : the percentage (0-100) of the content
that has been buffered or played thus far |
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.OnBufferingUpdateListener\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nMediaPlayer.OnBufferingUpdateListener\n=====================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/MediaPlayer.OnBufferingUpdateListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nMediaPlayer.OnBufferingUpdateListener\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------------------|\n| android.media.MediaPlayer.OnBufferingUpdateListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface definition of a callback to be invoked indicating buffering\nstatus of a media resource being streamed over the network.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onBufferingUpdate](/reference/android/media/MediaPlayer.OnBufferingUpdateListener#onBufferingUpdate(android.media.MediaPlayer,%20int))`(`[MediaPlayer](/reference/android/media/MediaPlayer)` mp, int percent) ` Called to update status in buffering a media stream received through progressive HTTP download. |\n\nPublic methods\n--------------\n\n### onBufferingUpdate\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onBufferingUpdate (MediaPlayer mp, \n int percent)\n```\n\nCalled to update status in buffering a media stream received through\nprogressive HTTP download. The received buffering percentage\nindicates how much of the content has been buffered or played.\nFor example a buffering update of 80 percent when half the content\nhas already been played indicates that the next 30 percent of the\ncontent to play has been buffered.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|-----------------------------------------------------------------------------------------------|\n| `mp` | `MediaPlayer`: the MediaPlayer the update pertains to \u003cbr /\u003e |\n| `percent` | `int`: the percentage (0-100) of the content that has been buffered or played thus far \u003cbr /\u003e |"]]