public interface VideoListener
| Modifier and Type | Method and Description |
|---|---|
default void |
onRenderedFirstFrame()
Called when a frame is rendered for the first time since setting the surface, and when a frame
is rendered for the first time since a video track was selected.
|
default void |
onSurfaceSizeChanged(int width,
int height)
Called each time there's a change in the size of the surface onto which the video is being
rendered.
|
default void |
onVideoSizeChanged(int width,
int height,
int unappliedRotationDegrees,
float pixelWidthHeightRatio)
Called each time there's a change in the size of the video being rendered.
|
default void onVideoSizeChanged(int width,
int height,
int unappliedRotationDegrees,
float pixelWidthHeightRatio)
width - The video width in pixels.height - The video height in pixels.unappliedRotationDegrees - For videos that require a rotation, this is the clockwise
rotation in degrees that the application should apply for the video for it to be rendered
in the correct orientation. This value will always be zero on API levels 21 and above,
since the renderer will apply all necessary rotations internally. On earlier API levels
this is not possible. Applications that use TextureView can apply the
rotation by calling TextureView.setTransform(android.graphics.Matrix). Applications that do not
expect to encounter rotated videos can safely ignore this parameter.pixelWidthHeightRatio - The width to height ratio of each pixel. For the normal case of
square pixels this will be equal to 1.0. Different values are indicative of anamorphic
content.default void onSurfaceSizeChanged(int width,
int height)
width - The surface width in pixels. May be C.LENGTH_UNSET if unknown, or 0 if the video is not rendered
onto a surface.height - The surface height in pixels. May be C.LENGTH_UNSET if unknown, or 0 if the video is not rendered
onto a surface.default void onRenderedFirstFrame()