Class ComponentVideoSurface

java.lang.Object
uk.co.caprica.vlcj.player.embedded.videosurface.VideoSurface
uk.co.caprica.vlcj.player.embedded.videosurface.ComponentVideoSurface

public class ComponentVideoSurface extends VideoSurface
Encapsulation of a video surface that uses an AWT Component (optimally a Canvas, or maybe a Window).
  • Constructor Details

    • ComponentVideoSurface

      public ComponentVideoSurface(Component component, VideoSurfaceAdapter videoSurfaceAdapter)
      Create a new video surface.
      Parameters:
      component - video surface component
      videoSurfaceAdapter - adapter to attach a video surface to a native media player
  • Method Details

    • component

      public final Component component()
      Get the canvas.
      Returns:
      canvas
    • attach

      public void attach(MediaPlayer mediaPlayer)
      Description copied from class: VideoSurface
      Attach the video surface to a media player.

      The video surface component must be visible at this point otherwise the native call will fail.

      Specified by:
      attach in class VideoSurface
      Parameters:
      mediaPlayer - media player instance