Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add new epub3 mediatypes

fix opentype media name
  • Loading branch information...
commit 25f579ad706ff2f5260bb7dda4a35c4990348000 1 parent 113a3de
@psiegman authored
View
23 epublib-core/src/main/java/nl/siegmann/epublib/service/MediatypeService.java
@@ -17,18 +17,33 @@
public static final MediaType XHTML = new MediaType("application/xhtml+xml", ".xhtml", new String[] {".htm", ".html", ".xhtml"});
public static final MediaType EPUB = new MediaType("application/epub+zip", ".epub");
+ public static final MediaType NCX = new MediaType("application/x-dtbncx+xml", ".ncx");
+
+ public static final MediaType JAVASCRIPT = new MediaType("text/javascript", ".js");
+ public static final MediaType CSS = new MediaType("text/css", ".css");
+
+ // images
public static final MediaType JPG = new MediaType("image/jpeg", ".jpg", new String[] {".jpg", ".jpeg"});
public static final MediaType PNG = new MediaType("image/png", ".png");
public static final MediaType GIF = new MediaType("image/gif", ".gif");
- public static final MediaType CSS = new MediaType("text/css", ".css");
+
public static final MediaType SVG = new MediaType("image/svg+xml", ".svg");
+
+ // fonts
public static final MediaType TTF = new MediaType("application/x-truetype-font", ".ttf");
- public static final MediaType NCX = new MediaType("application/x-dtbncx+xml", ".ncx");
+ public static final MediaType OPENTYPE = new MediaType("application/vnd.ms-opentype", ".otf");
+ public static final MediaType WOFF = new MediaType("application/font-woff", ".woff");
+
+ // audio
+ public static final MediaType MP3 = new MediaType("audio/mpeg", ".mp3");
+ public static final MediaType MP4 = new MediaType("audio/mp4", ".mp4");
+
+ public static final MediaType SMIL = new MediaType("application/smil+xml", ".smil");
public static final MediaType XPGT = new MediaType("application/adobe-page-template+xml", ".xpgt");
- public static final MediaType OPENTYPE = new MediaType("font/opentype", ".otf");
+ public static final MediaType PLS = new MediaType("application/pls+xml", ".pls");
public static MediaType[] mediatypes = new MediaType[] {
- XHTML, EPUB, JPG, PNG, GIF, CSS, SVG, TTF, NCX, XPGT, OPENTYPE
+ XHTML, EPUB, JPG, PNG, GIF, CSS, SVG, TTF, NCX, XPGT, OPENTYPE, WOFF, SMIL, PLS, JAVASCRIPT, MP3, MP4
};
public static Map<String, MediaType> mediaTypesByName = new HashMap<String, MediaType>();
Please sign in to comment.
Something went wrong with that request. Please try again.