Skip to content

Commit

Permalink
Merge branch 'hotfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
PrestonN committed Apr 18, 2019
2 parents b206f4c + 1e2a528 commit 757b469
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "FreeTube",
"productName": "FreeTube",
"version": "0.5.2",
"version": "0.5.3",
"description": "An Open Source YouTube app for privacy.",
"main": "src/js/init.js",
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ function playVideo(videoId, playlistId = '') {
console.log(data);

let videoUrls = data.formats;
let formatUrls = data.player_response.streamingData.adaptiveFormats;

// Search through the returned object to get the 480p and 720p video URLs (If available)
Object.keys(videoUrls).forEach((key) => {
Expand All @@ -79,7 +78,7 @@ function playVideo(videoId, playlistId = '') {
});

// Last adaptive format will be best the quality audio stream (migrate fully to adaptive formats later)
playerView.videoAudio = decodeURIComponent(formatUrls[formatUrls.length - 1]['url']);
playerView.videoAudio = decodeURIComponent(videoUrls[videoUrls.length - 1]['url']);

if (typeof (playerView.videoAudio) === 'undefined') {
console.log(playerView.videoAudio);
Expand Down

0 comments on commit 757b469

Please sign in to comment.