Class NativePlayerTextureManager

  • All Implemented Interfaces:

    
    public final class NativePlayerTextureManager
    
                        

    A class responsible for managing the texture view used for video playback.

    This class handles the inflation, layout, and lifecycle of a CustomTextureView within a parent RelativeLayout. It also manages the aspect ratio of the video and listens for surface texture events.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit inflate(SurfaceTextureListener surfaceTextureListener) Inflates the texture view and adds it to the parent view.
      final Unit destroy() Destroys the texture view and releases resources.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • inflate

         final Unit inflate(SurfaceTextureListener surfaceTextureListener)

        Inflates the texture view and adds it to the parent view.

        This method sets up the texture view, attaches listeners for video size changes and surface texture events, and updates the video aspect ratio.

        Parameters:
        surfaceTextureListener - The SurfaceTextureListener for receiving surface texture events.
      • destroy

         final Unit destroy()

        Destroys the texture view and releases resources. This method removes the surface texture listener.