Merge branch 'hotfix'

This commit is contained in:
PrestonN 2019-04-17 20:54:34 -04:00
commit 757b469215
3 changed files with 3 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "FreeTube",
"version": "0.5.2",
"version": "0.5.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -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": {

View File

@ -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) => {
@ -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);