需要vlcj播放来自url的视频,它可以处理磁盘上的文件,但是当它占用网络时-它不起作用。
测试视频: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();