Play a Youtube video using JavaFX

后端 未结 2 2028
盖世英雄少女心
盖世英雄少女心 2020-11-29 11:35

I\'m trying to play a video from youtube using javaFX. Here is my code

public class Main extends Application {

public static void main(String[] args) {
             


        
2条回答
  •  一个人的身影
    2020-11-29 11:55

    JavaFX can't play youtube video just with the video url. you need to specify the file of your video, not just a random youtube link. Try with this URL : http://download.oracle.com/otndocs/products/javafx/oow2010-2.flv your code works fine

提交回复
热议问题