Skip to content

Commit

Permalink
Merge pull request #50 from atomjack/decryption-error-fix
Browse files Browse the repository at this point in the history
Get correct url for decryption js when it doesn't include https://you…
  • Loading branch information
ram-on authored Jan 31, 2017
2 parents 798ab40 + f60f2c5 commit 59e9b68
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ public String init(String videoId) throws Exception {
JSONObject ytAssets = jsonObj.getJSONObject("assets");
String playerUrl = ytAssets.getString("js");


if(!playerUrl.contains("youtube.com")) {
playerUrl = "https://youtube.com" + playerUrl;
}
if (playerUrl.startsWith("//")) {
playerUrl = "https:" + playerUrl;
}
Expand Down

0 comments on commit 59e9b68

Please sign in to comment.