Class VLCVideoManager

java.lang.Object
com.igrium.videolib.vlc.VLCVideoManager
All Implemented Interfaces:
VideoManager, AutoCloseable

public class VLCVideoManager extends Object implements VideoManager
A media playback implementation that relies on VLCJ.
  • Field Details

  • Constructor Details

  • Method Details

    • getPlayer

      @Nullable public VLCVideoPlayer getPlayer(net.minecraft.util.Identifier id)
      Description copied from interface: VideoManager
      Get a video player by its identifier.
      Specified by:
      getPlayer in interface VideoManager
      Parameters:
      id - Identifier to use.
      Returns:
      Corresponding video player, or null if no video player by this ID exists.
    • getOrCreate

      public VLCVideoPlayer getOrCreate(net.minecraft.util.Identifier id)
      Description copied from interface: VideoManager
      Get a video player by its identifier, or create it if it does not exist.
      Specified by:
      getOrCreate in interface VideoManager
      Parameters:
      id - Identifier to use.
      Returns:
      The video player.
    • createPlayer

      protected VLCVideoPlayer createPlayer(net.minecraft.util.Identifier id)
    • getVideos

      public Map<net.minecraft.util.Identifier,VideoHandle> getVideos()
    • getHandle

      public VideoHandle getHandle(net.minecraft.util.Identifier id)
    • getFactory

      public uk.co.caprica.vlcj.factory.MediaPlayerFactory getFactory()
      Get the native media player factory from VLCJ
      Returns:
      The factory
    • getVideoHandleFactory

      public VideoHandleFactory getVideoHandleFactory()
      Description copied from interface: VideoManager
      Get a video handle factory that will create handles compatible with this video manager.
      Specified by:
      getVideoHandleFactory in interface VideoManager
      Returns:
      The video handle factory.
    • getReloadListener

      public FileVideoLoader<? extends VideoHandle> getReloadListener()
      Description copied from interface: VideoManager
      Get a resource reload listener responsible for loading video files.
      Specified by:
      getReloadListener in interface VideoManager
      Returns:
      Reload listener.
    • supportedExtensions

      public Collection<String> supportedExtensions()
      Description copied from interface: VideoManager
      Get the extensions that this implementation supports.
      Specified by:
      supportedExtensions in interface VideoManager
      Returns:
      A collection of extensions, excluding the period. ('mp4', NOT '.mp4')
    • closePlayer

      public boolean closePlayer(net.minecraft.util.Identifier id)
      Description copied from interface: VideoManager
      Close a video player and remove it from this manager's pool.
      Specified by:
      closePlayer in interface VideoManager
      Parameters:
      id - Video player ID.
      Returns:
      If this video player was found.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable