Class FileVideoLoader<T extends VideoHandle>

java.lang.Object
com.igrium.videolib.util.FileVideoLoader<T>
Type Parameters:
T - The type of handle this loader will use.
All Implemented Interfaces:
net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener, net.minecraft.resource.ResourceReloader

public class FileVideoLoader<T extends VideoHandle> extends Object implements net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener
A video loader that copies videos into temp directory for easy streaming.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader

    net.minecraft.resource.ResourceReloader.Synchronizer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Predicate<String>
     
    protected Consumer<Map<net.minecraft.util.Identifier,T>>
     
    protected Function<File,T>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    FileVideoLoader(Predicate<String> extensionFilter, Function<File,T> handleFactory, Consumer<Map<net.minecraft.util.Identifier,T>> handleConsumer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.util.Identifier
     
    protected File
    loadVideo(net.minecraft.util.Identifier id, net.minecraft.resource.ResourceManager manager)
     
    reload(net.minecraft.resource.ResourceReloader.Synchronizer synchronizer, net.minecraft.resource.ResourceManager manager, net.minecraft.util.profiler.Profiler prepareProfiler, net.minecraft.util.profiler.Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener

    getFabricDependencies

    Methods inherited from interface net.minecraft.resource.ResourceReloader

    getName
  • Field Details

  • Constructor Details

  • Method Details

    • reload

      public CompletableFuture<Void> reload(net.minecraft.resource.ResourceReloader.Synchronizer synchronizer, net.minecraft.resource.ResourceManager manager, net.minecraft.util.profiler.Profiler prepareProfiler, net.minecraft.util.profiler.Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor)
      Specified by:
      reload in interface net.minecraft.resource.ResourceReloader
    • loadVideo

      protected File loadVideo(net.minecraft.util.Identifier id, net.minecraft.resource.ResourceManager manager) throws IOException
      Throws:
      IOException
    • getFabricId

      public net.minecraft.util.Identifier getFabricId()
      Specified by:
      getFabricId in interface net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener