Search code examples
javavideovideo-streamingmedia-playerflash

Playing streaming video using default media player


I have a link like http://..../video.mp4. The task is run a video using the installed on OS media player or flash player in full screen mode.

Please give me a link where I can read about this or maybe we have some code examples.


Solution

  • There is a class called Desktop. It should contain a method called Desktop.open().

    With this class you can also open a link in the systems default browser (Desktop.browse(url);)

    File f = new File("/path/to/video.avi");
    Desktop.open(f);