vlcj从url播放视频



需要vlcj从url播放视频,它可以处理磁盘上的文件,但当它访问web时,它不起作用。测试视频:http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4

在错误中,我有这个filesystem access error: cannot open file /home/progsmile/Documents/dev/java/trying2/http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4 (No such file or directory) [0x7f9c4801ad18] main access error: File reading failed

//here is part of code
MediaPlayerFactory mediaPlayerFactory = new MediaPlayerFactory();
EmbeddedMediaPlayer mediaPlayer = mediaPlayerFactory.newEmbeddedMediaPlayer();
//...
String filePath = "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4";
mediaPlayer.playMedia(filePath);

请帮助)

你试过先准备mrl吗?

mediaPlayer.prepareMedia(filePath);
//mediaPlayer.setPlaySubItems(true);
mediaPlayer.play();

相关内容

  • 没有找到相关文章

最新更新