{
  "id": "enwiki-001363122959",
  "slug": "java-media-framework",
  "title": "Java Media Framework",
  "qid": "",
  "lead": "The Java Media Framework (JMF) is a Java library that enables audio, video and other time-based media to be added to Java applications and applets. This optional package, which can capture, play, stream, and transcode multiple media formats, extends the Java Platform, Standard Edition (Java SE) and allows development of cross-platform multimedia applications.",
  "body": "The Java Media Framework (JMF) is a Java library that enables audio, video and other time-based media to be added to Java applications and applets. This optional package, which can capture, play, stream, and transcode multiple media formats, extends the Java Platform, Standard Edition (Java SE) and allows development of cross-platform multimedia applications. package org.wikipedia.examples; import java.awt.Component; import java.awt.FileDialog; import java.awt.Frame; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import javax.media.Manager; import javax.media.Player; import javax.media.MediaException; public class TrivialJMFPlayer extends Frame { public TrivialJMFPlayer() throws IOException, MalformedURLException, MediaException { FileDialog fd = new FileDialog(this, \"TrivialJMFPlayer\", FileDialog.LOAD); fd.setVisible(true); File f = new File(fd.getDirectory(), fd.getFile()); Player p = Manager.createRealizedPlayer(f.toURI().toURL()); Component c = p.getVisualComponent(); add(c); p.start(); } public static void main(String[] args) { try { Frame f = new TrivialJMFPlayer(); f.pack(); f.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } } Much of the example is involved with the building of the AWT GUI. Only two lines touch JMF. Manager.createRealizedPlayer() implicitly creates a javax.media.protocol.DataSource from a URL representation of the file, creates a Player , and realizes it, meaning that all resources necessary for playback are allocated and initialized. The getVisualComponent() asks the javax.media.Player for a java.awt.Component suitable for use in a GUI. If a control component were desired, it would be obtained with getControlPanelComponent() and added to the GUI separately. Note that the developer is not concerned with the format of the media - this code works equally well for any media format that JMF can import and read. ==References==",
  "categories": [
    "23118434",
    "23603337",
    "24623845",
    "36238041",
    "57203313"
  ],
  "license": "CC BY-SA 4.0",
  "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1363122959",
  "content_hash": "",
  "created_at": null,
  "updated_at": 1783479392.0,
  "claims": [],
  "contradictions": [],
  "confidence": 0.6,
  "csl": {
    "id": "enwiki-001363122959",
    "type": "webpage",
    "title": "Java Media Framework",
    "author": [
      {
        "family": "Anticloud FZ LLE",
        "literal": "Anticloud FZ LLE"
      }
    ],
    "container-title": "encyclopegia.org",
    "publisher": "Anticloud FZ LLE",
    "publisher-place": "Dubai, United Arab Emirates",
    "URL": "https://encyclopegia.org/a/java-media-framework",
    "issued": {
      "date-parts": [
        [
          2026,
          11,
          15
        ]
      ]
    },
    "accessed": {
      "date-parts": [
        [
          2026,
          11,
          15
        ]
      ]
    },
    "license": "CC BY-SA 4.0",
    "DOI": "eo1:enwiki-001363122959",
    "isBasedOn": "https://en.wikipedia.org/w/index.php?oldid=1363122959",
    "note": "Immutable snapshot enwiki-001363122959"
  }
}