Class MediaHandler

java.lang.Object
io.goobi.viewer.controller.imaging.MediaHandler

public class MediaHandler extends Object
Resolves urls audio or video files.
Author:
Florian Alpers
  • Constructor Details

    • MediaHandler

      public MediaHandler()
    • MediaHandler

      public MediaHandler(AbstractApiUrlManager urls)
      Creates a new MediaHandler instance.
      Parameters:
      urls - API URL manager for building media resource URLs
  • Method Details

    • getMediaUrl

      public String getMediaUrl(String type, String format, String pi, String filename) throws de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
      Returns the url to the media object for the given pi and filename.
      Parameters:
      type - The mime type to use
      format - media sub-format (e.g. audio or video format extension)
      pi - The pi of the requested work
      filename - The media filename
      Returns:
      the url to the media file of the given pi and filename
      Throws:
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException