Package com.igrium.videolib.dummy
Class DummyVideoManager
java.lang.Object
com.igrium.videolib.dummy.DummyVideoManager
- All Implemented Interfaces:
VideoManager
,AutoCloseable
The video manager that gets loaded when no implementation is found.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
Nested classes/interfaces inherited from interface com.igrium.videolib.api.VideoManager
VideoManager.VideoManagerFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
closePlayer
(net.minecraft.util.Identifier id) Close a video player and remove it from this manager's pool.getOrCreate
(net.minecraft.util.Identifier id) Get a video player by its identifier, or create it if it does not exist.getPlayer
(net.minecraft.util.Identifier id) Get a video player by its identifier.net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener
Get a resource reload listener responsible for loading video files.Get a video handle factory that will create handles compatible with this video manager.Get the extensions that this implementation supports.
-
Constructor Details
-
DummyVideoManager
public DummyVideoManager()
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
getPlayer
Description copied from interface:VideoManager
Get a video player by its identifier.- Specified by:
getPlayer
in interfaceVideoManager
- Parameters:
id
- Identifier to use.- Returns:
- Corresponding video player, or
null
if no video player by this ID exists.
-
getOrCreate
Description copied from interface:VideoManager
Get a video player by its identifier, or create it if it does not exist.- Specified by:
getOrCreate
in interfaceVideoManager
- Parameters:
id
- Identifier to use.- Returns:
- The video player.
-
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 interfaceVideoManager
- Parameters:
id
- Video player ID.- Returns:
- If this video player was found.
-
getReloadListener
public net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener getReloadListener()Description copied from interface:VideoManager
Get a resource reload listener responsible for loading video files.- Specified by:
getReloadListener
in interfaceVideoManager
- Returns:
- Reload listener.
-
supportedExtensions
Description copied from interface:VideoManager
Get the extensions that this implementation supports.- Specified by:
supportedExtensions
in interfaceVideoManager
- Returns:
- A collection of extensions, excluding the period. ('mp4', NOT '.mp4')
-
getVideoHandleFactory
Description copied from interface:VideoManager
Get a video handle factory that will create handles compatible with this video manager.- Specified by:
getVideoHandleFactory
in interfaceVideoManager
- Returns:
- The video handle factory.
-