Closed byxiaobai closed 5 months ago
My options are in wrong format. The correct format should be like ":http-referrer=https://whatever.com/" The correct code is
public void playBilibiliVideo(String bvid){
System.out.println("playBilibiliVideo:"+bvid);
BilibiliVideoInfo videoInfo= BilibiliDecoder.INSTANCE.getVideoInfo(bvid);
String downloadUrl=videoInfo.getVideoDownloadUrl();
String option=":http-referrer=https://www.bilibili.com :http-user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36";
getAPI().media().prepare(new String(downloadUrl.getBytes(), StandardCharsets.UTF_8),"http-referrer=https://www.bilibili.com",":http-user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36");
getAPI().audio().setVolume(200);
getAPI().controls().play();
}
thanks a lot for @caprica
I am trying to play steaming video. When I use vcl for windows , it works well.
The url is
The options are
But when I use vlcj, there will be a 403 error message (the referer option does not work)