Skip to content
Permalink
Browse files

Bump version number and update ytdl-core

  • Loading branch information
PrestonN committed Dec 21, 2019
1 parent ce0576e commit ba85545c6eb110c0e0f4c02f178bc3d5467b0296
Showing with 41 additions and 39 deletions.
  1. +12 −12 package-lock.json
  2. +2 −2 package.json
  3. +27 −25 src/js/player.js

Some generated files are not rendered by default. Learn more.

@@ -1,7 +1,7 @@
{
"name": "FreeTube",
"productName": "FreeTube",
"version": "0.7.1",
"version": "0.7.2",
"description": "An Open Source YouTube app for privacy.",
"main": "src/js/init.js",
"scripts": {
@@ -97,6 +97,6 @@
"nedb": "^1.8.0",
"opml-to-json": "0.0.3",
"vue": "^2.6.10",
"ytdl-core": "^1.0.0"
"ytdl-core": "^1.0.3"
}
}
@@ -122,14 +122,14 @@ function playVideo(videoId, playlistId = '') {
playerView.validLive = false;

// Search through the returned object to get the 360p and 720p video URLs (If available)
Object.keys(videoUrls).forEach((key) => {
switch (videoUrls[key]['itag']) {
case '18':
playerView.video360p = decodeURIComponent(videoUrls[key]['url']);
videoUrls.forEach((video) => {
switch (video.itag) {
case 18:
playerView.video360p = decodeURIComponent(video.url);
// ft.log(playerView.video360p);
break;
case '22':
playerView.video720p = decodeURIComponent(videoUrls[key]['url']);
case 22:
playerView.video720p = decodeURIComponent(video.url);
// ft.log(playerView.video720p);
break;
}
@@ -397,14 +397,14 @@ function playVideo(videoId, playlistId = '') {
let formatUrls = data.adaptiveFormats;

// Search through the returned object to get the 360p and 720p video URLs (If available)
Object.keys(videoUrls).forEach((key) => {
switch (videoUrls[key]['itag']) {
case '18':
playerView.video360p = decodeURIComponent(videoUrls[key]['url']);
videoUrls.forEach((video) => {
switch (video.itag) {
case 18:
playerView.video360p = decodeURIComponent(video.url);
// ft.log(playerView.video360p);
break;
case '22':
playerView.video720p = decodeURIComponent(videoUrls[key]['url']);
case 22:
playerView.video720p = decodeURIComponent(video.url);
// ft.log(playerView.video720p);
break;
}
@@ -1058,15 +1058,16 @@ function clickMiniPlayer(videoId) {

if (getVideosLocally) {
youtubedlGetInfo(videoId, (data) => {
let videoUrls = data.formats;
let videoUrls = data.formats

Object.keys(videoUrls).forEach((key) => {
switch (videoUrls[key]['itag']) {
case '18':
videoData.video360p = videoUrls[key]['url'];
// Search through the returned object to get the 360p and 720p video URLs (If available)
videoUrls.forEach((video) => {
switch (video.itag) {
case 18:
videoData.video360p = decodeURIComponent(video.url);
break;
case '22':
videoData.video720p = videoUrls[key]['url'];
case 22:
videoData.video720p = decodeURIComponent(video.url);
break;
}
});
@@ -1110,13 +1111,14 @@ function clickMiniPlayer(videoId) {
let videoUrls = data.formatStreams;
let formatUrls = data.adaptiveFormats;

Object.keys(videoUrls).forEach((key) => {
switch (videoUrls[key]['itag']) {
case '18':
videoData.video360p = videoUrls[key]['url'];
// Search through the returned object to get the 360p and 720p video URLs (If available)
videoUrls.forEach((video) => {
switch (video.itag) {
case 18:
videoData.video360p = decodeURIComponent(video.url);
break;
case '22':
videoData.video720p = videoUrls[key]['url'];
case 22:
videoData.video720p = decodeURIComponent(video.url);
break;
}
});

0 comments on commit ba85545

Please sign in to comment.
You can’t perform that action at this time.