Stay organized with collections
Save and categorize content based on your preferences.
public
static
interface
MediaPlayer.OnVideoSizeChangedListener
android.media.MediaPlayer.OnVideoSizeChangedListener
|
Interface definition of a callback to be invoked when the
video size is first known or updated
Summary
Public methods |
abstract
void
|
onVideoSizeChanged(MediaPlayer mp, int width, int height)
Called to indicate the video size
The video size (width and height) could be 0 if there was no video,
no display surface was set, or the value was not determined yet.
|
Public methods
public abstract void onVideoSizeChanged (MediaPlayer mp,
int width,
int height)
Called to indicate the video size
The video size (width and height) could be 0 if there was no video,
no display surface was set, or the value was not determined yet.
Parameters |
mp |
MediaPlayer : the MediaPlayer associated with this callback |
width |
int : the width of the video |
height |
int : the height of the video |
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,["# MediaPlayer.OnVideoSizeChangedListener\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nMediaPlayer.OnVideoSizeChangedListener\n======================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/MediaPlayer.OnVideoSizeChangedListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nMediaPlayer.OnVideoSizeChangedListener\n`\n\n\n`\n\n\n`\n\n|------------------------------------------------------|\n| android.media.MediaPlayer.OnVideoSizeChangedListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface definition of a callback to be invoked when the\nvideo size is first known or updated\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onVideoSizeChanged](/reference/android/media/MediaPlayer.OnVideoSizeChangedListener#onVideoSizeChanged(android.media.MediaPlayer,%20int,%20int))`(`[MediaPlayer](/reference/android/media/MediaPlayer)` mp, int width, int height) ` Called to indicate the video size The video size (width and height) could be 0 if there was no video, no display surface was set, or the value was not determined yet. |\n\nPublic methods\n--------------\n\n### onVideoSizeChanged\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onVideoSizeChanged (MediaPlayer mp, \n int width, \n int height)\n```\n\nCalled to indicate the video size\n\nThe video size (width and height) could be 0 if there was no video,\nno display surface was set, or the value was not determined yet.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|---------------------------------------------------------------------|\n| `mp` | `MediaPlayer`: the MediaPlayer associated with this callback \u003cbr /\u003e |\n| `width` | `int`: the width of the video \u003cbr /\u003e |\n| `height` | `int`: the height of the video \u003cbr /\u003e |"]]