Package com.igrium.videolib.api
Interface VideoManager
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DummyVideoManager
,VLCVideoManager
Responsible for loading and preparing video players.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
getPlayer
Get a video player by its identifier.- Parameters:
id
- Identifier to use.- Returns:
- Corresponding video player, or
null
if no video player by this ID exists.
-
getOrCreate
Get a video player by its identifier, or create it if it does not exist.- Parameters:
id
- Identifier to use.- Returns:
- The video player.
-
closePlayer
boolean closePlayer(net.minecraft.util.Identifier id) Close a video player and remove it from this manager's pool.- Parameters:
id
- Video player ID.- Returns:
- If this video player was found.
-
getReloadListener
net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener getReloadListener()Get a resource reload listener responsible for loading video files.- Returns:
- Reload listener.
-
supportedExtensions
Collection<String> supportedExtensions()Get the extensions that this implementation supports.- Returns:
- A collection of extensions, excluding the period. ('mp4', NOT '.mp4')
-
getVideoHandleFactory
VideoHandleFactory getVideoHandleFactory()Get a video handle factory that will create handles compatible with this video manager.- Returns:
- The video handle factory.
-