From 689479eb21103e3a7baa81ee57720f73673d4472 Mon Sep 17 00:00:00 2001 From: Preston Date: Fri, 30 Apr 2021 17:18:45 -0400 Subject: [PATCH] Channel Fixes and finish quality change logic --- package-lock.json | 280 +++++++++++++----- package.json | 6 +- .../components/ft-list-video/ft-list-video.js | 2 + .../ft-video-player/ft-video-player.js | 90 +++++- src/renderer/components/top-nav/top-nav.js | 14 +- src/renderer/components/top-nav/top-nav.vue | 3 + src/renderer/videoJS.css | 6 +- src/renderer/views/Channel/Channel.js | 2 +- src/renderer/views/Watch/Watch.js | 9 +- static/locales/en-US.yaml | 1 + 10 files changed, 322 insertions(+), 91 deletions(-) diff --git a/package-lock.json b/package-lock.json index fac212cb..f9a96970 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3989,28 +3989,60 @@ } }, "@videojs/http-streaming": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.2.4.tgz", - "integrity": "sha512-gzT46RpAEegOhMId/zZ6uXCVGDMPOv8qmoTykBuvd6/4lVM3lZ1ZJCq0kytAkisDuDKipy93gP46oZEtonlc/Q==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.7.1.tgz", + "integrity": "sha512-e7I5zHtTklNlBXhWnl2Nla+8hqjXzKXauAVK8cmcN0b6keqwW3WQDfAAnAzzAGf3CvxDUVudRcWGQqtNrXYjmQ==", "requires": { - "@babel/runtime": "^7.5.5", - "@videojs/vhs-utils": "^2.2.1", - "aes-decrypter": "3.1.0", - "global": "^4.3.2", - "m3u8-parser": "4.5.0", - "mpd-parser": "0.14.0", - "mux.js": "5.6.7", + "@babel/runtime": "^7.12.5", + "@videojs/vhs-utils": "^3.0.0", + "aes-decrypter": "3.1.2", + "global": "^4.4.0", + "m3u8-parser": "4.6.0", + "mpd-parser": "0.16.0", + "mux.js": "5.11.0", "video.js": "^6 || ^7" + }, + "dependencies": { + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + } } }, "@videojs/vhs-utils": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-2.3.0.tgz", - "integrity": "sha512-ThSmm91S7tuIJ757ON50K4y7S/bvKN4+B0tu303gCOxaG57PoP1UvPfMQZ90XGhxwNgngexVojOqbBHhTvXVHQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.0.tgz", + "integrity": "sha512-HPgiaVB8/g7DooYFQ20uTinq4eNRHmIXGHHttK/Xwyvn19MfIpg9BfMNr9ywCvgHh0IUGrxt6P8AcmMO4xvxIA==", "requires": { - "@babel/runtime": "^7.5.5", - "global": "^4.3.2", - "url-toolkit": "^2.1.6" + "@babel/runtime": "^7.12.5", + "global": "^4.4.0", + "url-toolkit": "^2.2.1" + }, + "dependencies": { + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + } } }, "@videojs/xhr": { @@ -4350,14 +4382,30 @@ "dev": true }, "aes-decrypter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.0.tgz", - "integrity": "sha512-wL1NFwP2yNrJG4InpXYFhhYe9TfonnDyhyxMq2+K9/qt+SrZzUieOpviN6pkDly7GawTqw5feehk0rn5iYo00g==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.2.tgz", + "integrity": "sha512-42nRwfQuPRj9R1zqZBdoxnaAmnIFyDi0MNyTVhjdFOd8fifXKKRfwIHIZ6AMn1or4x5WONzjwRTbTWcsIQ0O4A==", "requires": { - "@babel/runtime": "^7.5.5", - "@videojs/vhs-utils": "^2.2.1", - "global": "^4.3.2", + "@babel/runtime": "^7.12.5", + "@videojs/vhs-utils": "^3.0.0", + "global": "^4.4.0", "pkcs7": "^1.0.4" + }, + "dependencies": { + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + } } }, "agent-base": { @@ -8459,6 +8507,11 @@ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==" + }, "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -12335,13 +12388,29 @@ } }, "m3u8-parser": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-4.5.0.tgz", - "integrity": "sha512-RGm/1WVCX3o1bSWbJGmJUu4zTbtJy8lImtgHM4CESFvJRXYztr1j6SW/q9/ghYOrUjgH7radsIar+z1Leln0sA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-4.6.0.tgz", + "integrity": "sha512-dKhhpMcPqDM/KzULVrNyDZ/z766peQjwUghDTcl6TE7DQKAt/vm74/IMUAxpO34f6LDpM+OH/dYGQwW1eM4yWw==", "requires": { - "@babel/runtime": "^7.5.5", - "@videojs/vhs-utils": "^2.2.1", - "global": "^4.3.2" + "@babel/runtime": "^7.12.5", + "@videojs/vhs-utils": "^3.0.0", + "global": "^4.4.0" + }, + "dependencies": { + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + } } }, "m3u8stream": { @@ -12365,6 +12434,14 @@ } } }, + "magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, "makeerror": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", @@ -12644,14 +12721,35 @@ "integrity": "sha1-mi3sg4Bvuy2XXyK+7IWcoms5OqE=" }, "mpd-parser": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.14.0.tgz", - "integrity": "sha512-HqXQS3WLofcnYFcxv5oWdlciddUaEnN3NasXLVQ793mdnZRrinjz2Yk1DsUYPDYOUWf6ZBBqbFhaJT5LiT2ouA==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.16.0.tgz", + "integrity": "sha512-/pOFsDbOxXFAla47rYMdIypBZVtsQ9q3OHNuKtW2CJMaCGtNDtUcLS+B2TToYmB20rgi3XIgkyc2EsIvIAS4NA==", "requires": { - "@babel/runtime": "^7.5.5", - "@videojs/vhs-utils": "^2.2.1", - "global": "^4.3.2", - "xmldom": "^0.1.27" + "@babel/runtime": "^7.12.5", + "@videojs/vhs-utils": "^3.0.0", + "global": "^4.4.0", + "xmldom": "^0.5.0" + }, + "dependencies": { + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "xmldom": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.5.0.tgz", + "integrity": "sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA==" + } } }, "ms": { @@ -12676,9 +12774,12 @@ "dev": true }, "mux.js": { - "version": "5.6.7", - "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-5.6.7.tgz", - "integrity": "sha512-YSr6B8MUgE4S18MptbY2XM+JKGbw9JDkgs7YkuE/T2fpDKjOhZfb/nD6vmsVxvLYOExWNaQn1UGBp6PGsnTtew==" + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-5.11.0.tgz", + "integrity": "sha512-Q/iLfohHh5Pp6lW7EFtcxNuaCNJ3Ruywfy46pWLsY+yIxR1kXXImYY1wOhg8jLdBMs1kRaZqsiB4Zncsiw0a2Q==", + "requires": { + "@babel/runtime": "^7.11.2" + } }, "nan": { "version": "2.14.2", @@ -13902,23 +14003,37 @@ } }, "plist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz", - "integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.2.tgz", + "integrity": "sha512-MSrkwZBdQ6YapHy87/8hDU8MnIcyxBKjeF+McXnr5A9MtffPewTs7G3hlpodT5TacyfIyFTaJEhh3GGcmasTgQ==", "dev": true, "optional": true, "requires": { - "base64-js": "^1.2.3", + "base64-js": "^1.5.1", "xmlbuilder": "^9.0.7", - "xmldom": "0.1.x" + "xmldom": "^0.5.0" }, "dependencies": { + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "optional": true + }, "xmlbuilder": { "version": "9.0.7", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", "dev": true, "optional": true + }, + "xmldom": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.5.0.tgz", + "integrity": "sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA==", + "dev": true, + "optional": true } } }, @@ -14780,6 +14895,23 @@ "sprintf-js": "^1.1.2" } }, + "rollup-plugin-replace": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-replace/-/rollup-plugin-replace-2.2.0.tgz", + "integrity": "sha512-/5bxtUPkDHyBJAKketb4NfaeZjL5yLZdeUihSfbF2PQMz+rSTEb8ARKoOl3UBT4m7/X+QOXJo3sLTcq+yMMYTA==", + "requires": { + "magic-string": "^0.25.2", + "rollup-pluginutils": "^2.6.0" + } + }, + "rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "requires": { + "estree-walker": "^0.6.1" + } + }, "rss-parser": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/rss-parser/-/rss-parser-3.12.0.tgz", @@ -15575,6 +15707,11 @@ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", "dev": true }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" + }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -16754,9 +16891,9 @@ } }, "url-toolkit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/url-toolkit/-/url-toolkit-2.2.1.tgz", - "integrity": "sha512-8+DzgrtDZYZGhHaAop5WGVghMdCfOLGbhcArsJD0qDll71FXa7EeKxi2hilPIscn2nwMz4PRjML32Sz4JTN0Xw==" + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/url-toolkit/-/url-toolkit-2.2.2.tgz", + "integrity": "sha512-l25w6Sy+Iy3/IbogunxhWwljPaDnqpiKvrQRoLBm6DfISco7NyRIS7Zf6+Oxhy1T8kHxWdwLND7ZZba6NjXMug==" }, "use": { "version": "3.1.1", @@ -16860,18 +16997,19 @@ } }, "video.js": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/video.js/-/video.js-7.10.2.tgz", - "integrity": "sha512-kJTTrqcQn2MhPzWR8zQs6W3HPJWpowO/ZGZcKt2dcJeJdJT0dEDLYtiFdjV37SylCmu66V0flRnV8cipbthveQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/video.js/-/video.js-7.12.1.tgz", + "integrity": "sha512-0Owl7q4Zbm6YHX94P9WVqQ2vnpfeNyOtTNwuTEEoKovZogoqV2McOUmsQGM4Edtg4vGTiP74Fv6HVa1V6FeRfg==", "requires": { "@babel/runtime": "^7.9.2", - "@videojs/http-streaming": "2.2.4", + "@videojs/http-streaming": "2.7.1", "@videojs/xhr": "2.5.1", "global": "4.3.2", "keycode": "^2.2.0", + "rollup-plugin-replace": "^2.2.0", "safe-json-parse": "4.0.0", "videojs-font": "3.2.0", - "videojs-vtt.js": "^0.15.2" + "videojs-vtt.js": "^0.15.3" } }, "videojs-abloop": { @@ -16880,9 +17018,9 @@ "integrity": "sha512-6/hvtB5gNQUr5FJ969UhXVg5H+3wxhOzh9AVftlezOXlhzzaWfNfiOJYqNKo01Gc/eSQOvfttrOX7jH+aHpwrw==" }, "videojs-contrib-quality-levels": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/videojs-contrib-quality-levels/-/videojs-contrib-quality-levels-2.0.9.tgz", - "integrity": "sha512-HJeaJJQdSufi9Y5T7jlyyhkeq+mWPCog86q6ypoTi66boBMMJTo2abiOSHS9KaOGAJjH72gfvrjVY5FRdjlxYA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/videojs-contrib-quality-levels/-/videojs-contrib-quality-levels-2.1.0.tgz", + "integrity": "sha512-dqGQGbL9AFhucxki7Zh0c3kIhH0PAPcHEh6jUdRyaFCVeOuqnJrOYs/3wNtsokDdBdRf2Du2annpu4Z2XaSZRg==", "requires": { "global": "^4.3.2", "video.js": "^6 || ^7" @@ -16901,6 +17039,17 @@ "global": "^4.3.2", "video.js": "^7.0.0", "videojs-contrib-quality-levels": "^2.0.4" + }, + "dependencies": { + "videojs-contrib-quality-levels": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/videojs-contrib-quality-levels/-/videojs-contrib-quality-levels-2.1.0.tgz", + "integrity": "sha512-dqGQGbL9AFhucxki7Zh0c3kIhH0PAPcHEh6jUdRyaFCVeOuqnJrOYs/3wNtsokDdBdRf2Du2annpu4Z2XaSZRg==", + "requires": { + "global": "^4.3.2", + "video.js": "^6 || ^7" + } + } } }, "videojs-ie8": { @@ -17027,9 +17176,9 @@ } }, "videojs-vtt.js": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/videojs-vtt.js/-/videojs-vtt.js-0.15.2.tgz", - "integrity": "sha512-kEo4hNMvu+6KhPvVYPKwESruwhHC3oFis133LwhXHO9U7nRnx0RiJYMiqbgwjgazDEXHR6t8oGJiHM6wq5XlAw==", + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/videojs-vtt.js/-/videojs-vtt.js-0.15.3.tgz", + "integrity": "sha512-5FvVsICuMRx6Hd7H/Y9s9GDeEtYcXQWzGMS+sl4UX3t/zoHp3y+isSfIPRochnTH7h+Bh1ILyC639xy9Z6kPag==", "requires": { "global": "^4.3.1" } @@ -18226,11 +18375,6 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, - "xmldom": { - "version": "0.1.31", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", - "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==" - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -18302,9 +18446,9 @@ } }, "yt-channel-info": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/yt-channel-info/-/yt-channel-info-2.1.0.tgz", - "integrity": "sha512-e7rDJUw+GoOMojQYLG/SlD4gwXiRChmRj+tMzfLyoHUuvELZKq3bayTkepFDNls/0dLwc/vU6Xr9uAIXRGLvBw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/yt-channel-info/-/yt-channel-info-2.1.1.tgz", + "integrity": "sha512-oiTSuEGCMFMpgZYYDZhxskPoUnhkFY2DukkTy90wsQdHNfAIjPsqitHYBm75rXDkL2ubLX+nogzf3ZHa9U1e6A==", "requires": { "axios": "^0.21.1", "querystring": "^0.2.0" @@ -18319,9 +18463,9 @@ } }, "follow-redirects": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz", - "integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==" + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.0.tgz", + "integrity": "sha512-0vRwd7RKQBTt+mgu87mtYeofLFZpTas2S9zY+jIeuLJMNvudIgF52nr19q40HOwH5RrhWIPuj9puybzSJiRrVg==" } } }, diff --git a/package.json b/package.json index 03156b1c..9defd220 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,9 @@ "opml-to-json": "^1.0.1", "rss-parser": "^3.12.0", "socks-proxy-agent": "^5.0.0", - "video.js": "7.10.2", + "video.js": "^7.12.1", "videojs-abloop": "^1.2.0", - "videojs-contrib-quality-levels": "^2.0.9", + "videojs-contrib-quality-levels": "^2.1.0", "videojs-http-source-selector": "^1.1.6", "videojs-overlay": "^2.1.4", "videojs-replay": "^1.1.0", @@ -47,7 +47,7 @@ "xml2json": "^0.12.0", "youtube-chat": "git+https://github.com/IcedCoffeee/youtube-chat.git", "youtube-suggest": "^1.1.2", - "yt-channel-info": "^2.1.0", + "yt-channel-info": "^2.1.1", "yt-comment-scraper": "^4.0.1", "yt-dash-manifest-generator": "1.1.0", "yt-trending-scraper": "^1.1.3", diff --git a/src/renderer/components/ft-list-video/ft-list-video.js b/src/renderer/components/ft-list-video/ft-list-video.js index 9ec57bce..c18fc419 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.js +++ b/src/renderer/components/ft-list-video/ft-list-video.js @@ -42,6 +42,7 @@ export default Vue.extend({ isLive: false, isFavorited: false, isUpcoming: false, + isPremium: false, hideViews: false, optionsValues: [ 'history', @@ -321,6 +322,7 @@ export default Vue.extend({ this.description = this.data.description this.isLive = this.data.liveNow || this.data.lengthSeconds === 'undefined' this.isUpcoming = this.data.isUpcoming || this.data.premiere + this.isPremium = this.data.premium || false this.viewCount = this.data.viewCount if (typeof (this.data.premiereTimestamp) !== 'undefined') { diff --git a/src/renderer/components/ft-video-player/ft-video-player.js b/src/renderer/components/ft-video-player/ft-video-player.js index 004fac5d..cb0130d5 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.js +++ b/src/renderer/components/ft-video-player/ft-video-player.js @@ -74,6 +74,7 @@ export default Vue.extend({ useHls: false, selectedDefaultQuality: '', selectedQuality: '', + using60Fps: false, maxFramerate: 0, activeSourceList: [], mouseTimeout: null, @@ -416,7 +417,11 @@ export default Vue.extend({ } this.player.qualityLevels().levels_.sort((a, b) => { - return a.height - b.height + if (a.height === b.height) { + return a.bitrate - b.bitrate + } else { + return a.height - b.height + } }).forEach((ql, index, arr) => { const height = ql.height const width = ql.width @@ -427,14 +432,16 @@ export default Vue.extend({ upperLevel = arr[index + 1] } - if (this.defaultQuality === quality) { - this.setDashQualityLevel(height) + if (this.defaultQuality === quality && upperLevel === null) { + this.setDashQualityLevel(height, true) } else if (upperLevel !== null) { const upperHeight = upperLevel.height const upperWidth = upperLevel.width const upperQuality = upperWidth < upperHeight ? upperWidth : upperHeight - if (this.defaultQuality >= quality && this.defaultQuality < upperQuality) { + if (this.defaultQuality >= quality && this.defaultQuality === upperQuality) { + this.setDashQualityLevel(height, true) + } else if (this.defaultQuality >= quality && this.defaultQuality < upperQuality) { this.setDashQualityLevel(height) } } else if (index === 0 && quality > this.defaultQuality) { @@ -445,23 +452,65 @@ export default Vue.extend({ }) }, - setDashQualityLevel: function (qualityLevel) { - if (this.selectedQuality === qualityLevel) { + setDashQualityLevel: function (qualityLevel, is60Fps = false) { + if (this.selectedQuality === qualityLevel && this.using60Fps === is60Fps) { return } + let foundSelectedQuality = false + this.using60Fps = is60Fps this.player.qualityLevels().levels_.sort((a, b) => { - return a.height - b.height + if (a.height === b.height) { + return a.bitrate - b.bitrate + } else { + return a.height - b.height + } }).forEach((ql, index, arr) => { - if (qualityLevel === 'auto' || ql.height === qualityLevel) { + if (foundSelectedQuality) { + ql.enabled = false + ql.enabled_(false) + } else if (qualityLevel === 'auto') { ql.enabled = true ql.enabled_(true) + } else if (ql.height === qualityLevel) { + ql.enabled = true + ql.enabled_(true) + foundSelectedQuality = true + + let lowerQuality + let higherQuality + + if ((index - 1) !== -1) { + lowerQuality = arr[index - 1] + } + + if ((index + 1) < arr.length) { + higherQuality = arr[index + 1] + } + + if (typeof (lowerQuality) !== 'undefined' && lowerQuality.height === ql.height && lowerQuality.bitrate < ql.bitrate && !is60Fps) { + ql.enabled = false + ql.enabled_(false) + foundSelectedQuality = false + } + + if (typeof (higherQuality) !== 'undefined' && higherQuality.height === ql.height && higherQuality.bitrate > ql.bitrate && is60Fps) { + ql.enabled = false + ql.enabled_(false) + foundSelectedQuality = false + } } else { ql.enabled = false ql.enabled_(false) } }) - const selectedQuality = qualityLevel === 'auto' ? 'auto' : qualityLevel + 'p' + let selectedQuality = qualityLevel + + if (selectedQuality !== 'auto' && is60Fps) { + selectedQuality = selectedQuality + 'p60' + } else if (selectedQuality !== 'auto') { + selectedQuality = selectedQuality + 'p' + } const qualityElement = document.getElementById('vjs-current-quality') qualityElement.innerText = selectedQuality @@ -677,9 +726,9 @@ export default Vue.extend({ }, handleClick: function(event) { const selectedQuality = event.target.innerText - const quality = selectedQuality === 'auto' ? 'auto' : parseInt(selectedQuality.replace('p', '')) - v.setDashQualityLevel(quality) - // console.log(this.player().qualityLevels()) + const quality = selectedQuality === 'auto' ? 'auto' : parseInt(selectedQuality.replace('p(60)?', '')) + const is60Fps = selectedQuality.includes('p60') + v.setDashQualityLevel(quality, is60Fps) }, createControlTextEl: function (button) { const beginningHtml = `
@@ -695,10 +744,21 @@ export default Vue.extend({ ` levels.levels_.sort((a, b) => { - return b.height - a.height - }).forEach((quality) => { + if (b.height === a.height) { + return b.bitrate - a.bitrate + } else { + return b.height - a.height + } + }).forEach((quality, index, array) => { + let is60Fps = false + if (index < array.length - 1 && array[index + 1].height === quality.height) { + if (array[index + 1].bitrate < quality.bitrate) { + is60Fps = true + } + } + const qualityText = is60Fps ? quality.height + 'p60' : quality.height + 'p' qualityHtml = qualityHtml + `
  • - ${quality.height}p + ${qualityText}
  • ` }) diff --git a/src/renderer/components/top-nav/top-nav.js b/src/renderer/components/top-nav/top-nav.js index 1688454f..ab155a5a 100644 --- a/src/renderer/components/top-nav/top-nav.js +++ b/src/renderer/components/top-nav/top-nav.js @@ -49,6 +49,18 @@ export default Vue.extend({ backendPreference: function () { return this.$store.getters.getBackendPreference + }, + + forwardText: function () { + return this.$t('Forward') + }, + + backwardText: function () { + return this.$t('Backward') + }, + + newWindowText: function () { + return this.$t('Open New Window') } }, mounted: function () { @@ -124,7 +136,7 @@ export default Vue.extend({ case 'hashtag': { // TODO: Implement a hashtag related view let message = 'Hashtags have not yet been implemented, try again later' - if (this.$te(message) && this.$t(message) !== '') { + if (this.$t(message) && this.$t(message) !== '') { message = this.$t(message) } diff --git a/src/renderer/components/top-nav/top-nav.vue b/src/renderer/components/top-nav/top-nav.vue index 6079f9f7..e71b4c21 100644 --- a/src/renderer/components/top-nav/top-nav.vue +++ b/src/renderer/components/top-nav/top-nav.vue @@ -19,6 +19,7 @@ tabindex="0" @click="historyBack" @keypress="historyBack" + :title="forwardText" />