Search code examples
javajwplayerjwplayer6jwplayer7

Java add external video url


How can we external add video url to Jw player through API using Java.

If possible then please give example also so that i can understand better & it would be very helpful to me.

Thanks.


Solution

  • For java first you need to use BOTR API (Bits On The Run) :

    Code :

    Map<String, String> map = new HashMap<String,String>();
    Map<String, String> sourceType = new HashMap<String,String>();
    BotrAPI api = new BotrAPI("API KEY", "API SECRET");
    map.put("title", "Yureka..!!");
    map.put("sourcetype", "url");
    map.put("sourceformat", "youtube");
    map.put("sourceurl", "https://www.youtube.com/watch?v=jebJ9itYTJE");
    String output = api.makeRequest("videos/create", map); //OXm5HcGA