Stay organized with collections
Save and categorize content based on your preferences.
OnVideoSizeChangedListener
interface OnVideoSizeChangedListener
Interface definition of a callback to be invoked when the video size is first known or updated
Summary
Public methods |
abstract Unit |
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
onVideoSizeChanged
abstract fun onVideoSizeChanged(
mp: MediaPlayer!,
width: Int,
height: Int
): Unit
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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnVideoSizeChangedListener\n==========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/MediaPlayer.OnVideoSizeChangedListener \"View this page in Java\") \n\n```\ninterface OnVideoSizeChangedListener\n```\n\n|-----------------------------------------------------------|\n| [android.media.MediaPlayer.OnVideoSizeChangedListener](#) |\n\nInterface definition of a callback to be invoked when the video size is first known or updated\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onVideoSizeChanged](#onVideoSizeChanged(android.media.MediaPlayer,%20kotlin.Int,%20kotlin.Int))`(`mp:` `[MediaPlayer](/reference/kotlin/android/media/MediaPlayer)!`, `width:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `height:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` 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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onVideoSizeChanged(\n mp: MediaPlayer!, \n width: Int, \n height: Int\n): Unit\n```\n\nCalled 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\n| Parameters ||\n|----------|------------------------------------------------------------------------------------------------------------|\n| `mp` | [MediaPlayer](/reference/kotlin/android/media/MediaPlayer)!: the MediaPlayer associated with this callback |\n| `width` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the width of the video |\n| `height` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the height of the video |"]]