@oxymoron.13/tizentube-s95b 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -42
- package/S95B-CHANGES.txt +10 -4
- package/UPSTREAM-README.md +42 -0
- package/dist/userScript.js +2 -2
- package/mods/config.js +117 -0
- package/mods/domrect-polyfill.js +104 -0
- package/mods/features/adblock.js +584 -0
- package/mods/features/autoFrameRate.js +42 -0
- package/mods/features/enableFeatures.js +19 -0
- package/mods/features/moreSubtitles.js +378 -0
- package/mods/features/pictureInPicture.js +198 -0
- package/mods/features/preferredVideoQuality.js +101 -0
- package/mods/features/s95bCodec.js +45 -0
- package/mods/features/s95bI18n.js +28 -0
- package/mods/features/s95bMenu.js +142 -0
- package/mods/features/sponsorblock.js +437 -0
- package/mods/features/standaloneUserscript.js +107 -0
- package/mods/features/updater.js +119 -0
- package/mods/features/userAgentSpoofing.js +73 -0
- package/mods/features/videoQueuing.js +64 -0
- package/mods/package-lock.json +2321 -0
- package/mods/package.json +33 -0
- package/mods/resolveCommand.js +376 -0
- package/mods/rollup.config.js +41 -0
- package/mods/spatial-navigation-polyfill.js +1756 -0
- package/mods/tiny-sha256.js +99 -0
- package/mods/translations/i18nResources.js +11 -0
- package/mods/translations/index.js +18 -0
- package/mods/translations/language-names.js +981 -0
- package/mods/translations/resources/ar.json +308 -0
- package/mods/translations/resources/az.json +308 -0
- package/mods/translations/resources/bs.json +308 -0
- package/mods/translations/resources/cs.json +308 -0
- package/mods/translations/resources/de.json +308 -0
- package/mods/translations/resources/dk.json +308 -0
- package/mods/translations/resources/el.json +308 -0
- package/mods/translations/resources/en.json +308 -0
- package/mods/translations/resources/es-419.json +308 -0
- package/mods/translations/resources/es.json +308 -0
- package/mods/translations/resources/fi-FI.json +308 -0
- package/mods/translations/resources/fr.json +311 -0
- package/mods/translations/resources/hr.json +308 -0
- package/mods/translations/resources/hu.json +308 -0
- package/mods/translations/resources/id.json +308 -0
- package/mods/translations/resources/it.json +308 -0
- package/mods/translations/resources/ja.json +308 -0
- package/mods/translations/resources/lt.json +308 -0
- package/mods/translations/resources/lv.json +308 -0
- package/mods/translations/resources/pl.json +308 -0
- package/mods/translations/resources/pt-BR.json +308 -0
- package/mods/translations/resources/pt-PT.json +308 -0
- package/mods/translations/resources/ro.json +310 -0
- package/mods/translations/resources/ru.json +308 -0
- package/mods/translations/resources/sr-Cyrl.json +308 -0
- package/mods/translations/resources/sr-Latn.json +308 -0
- package/mods/translations/resources/tlh.json +308 -0
- package/mods/translations/resources/tr.json +308 -0
- package/mods/translations/resources/uk.json +308 -0
- package/mods/translations/resources/vi.json +309 -0
- package/mods/translations/resources/zh-CN.json +308 -0
- package/mods/translations/resources/zh-TW.json +308 -0
- package/mods/translations/update-translations.js +55 -0
- package/mods/ui/chapters.js +137 -0
- package/mods/ui/clock.js +71 -0
- package/mods/ui/customCommandExecution.js +49 -0
- package/mods/ui/customGuideAction.js +119 -0
- package/mods/ui/customUI.js +192 -0
- package/mods/ui/customYTSettings.js +29 -0
- package/mods/ui/disableWhosWatching.js +48 -0
- package/mods/ui/settings.js +1024 -0
- package/mods/ui/sidebarModification.js +179 -0
- package/mods/ui/speedUI.js +119 -0
- package/mods/ui/theme.js +26 -0
- package/mods/ui/ui.css +157 -0
- package/mods/ui/ui.js +261 -0
- package/mods/ui/ytUI.js +510 -0
- package/mods/userScript.js +28 -0
- package/mods/utils/ASTParser.js +67 -0
- package/mods/utils/innerTubeCalls.js +138 -0
- package/package.json +11 -5
- package/service/package-lock.json +4193 -0
- package/service/package.json +29 -0
- package/service/rollup.config.js +47 -0
- package/service/service.js +118 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
function redirectUrl(originalUrl) {
|
|
2
|
+
if (!originalUrl) return originalUrl;
|
|
3
|
+
|
|
4
|
+
try {
|
|
5
|
+
if (typeof originalUrl === 'string' && originalUrl.startsWith('//')) originalUrl = originalUrl.replace('//', 'https://')
|
|
6
|
+
const url = new URL(originalUrl, window.location.origin);
|
|
7
|
+
const hostname = url.hostname;
|
|
8
|
+
|
|
9
|
+
if (hostname === 'youtube.com' || hostname === 'www.youtube.com') {
|
|
10
|
+
url.protocol = 'http:';
|
|
11
|
+
url.host = 'localhost:8099';
|
|
12
|
+
return url.toString();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (hostname.endsWith('googlevideo.com') || hostname.endsWith('youtube.com')
|
|
16
|
+
|| hostname.endsWith('gstatic.com') || hostname.endsWith('.google.com')
|
|
17
|
+
|| hostname.endsWith('.googleapis.com') || hostname.endsWith('googleusercontent.com')
|
|
18
|
+
|| hostname.endsWith('.ggpht.com')) {
|
|
19
|
+
return 'http://localhost:8099/cors-bypass/' + url.toString();
|
|
20
|
+
}
|
|
21
|
+
} catch (e) {
|
|
22
|
+
console.error('Failed to parse URL during interception:', e);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return originalUrl;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default function () {
|
|
29
|
+
const originalFetch = window.fetch;
|
|
30
|
+
if (originalFetch) {
|
|
31
|
+
window.fetch = function (input, init) {
|
|
32
|
+
let targetUrl = '';
|
|
33
|
+
let isRequestObject = false;
|
|
34
|
+
|
|
35
|
+
if (typeof input === 'string') {
|
|
36
|
+
targetUrl = redirectUrl(input);
|
|
37
|
+
} else if (input instanceof URL) {
|
|
38
|
+
targetUrl = redirectUrl(input.toString());
|
|
39
|
+
input = new URL(targetUrl);
|
|
40
|
+
} else if (input instanceof Request) {
|
|
41
|
+
isRequestObject = true;
|
|
42
|
+
targetUrl = redirectUrl(input.url);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (isRequestObject) {
|
|
46
|
+
if (input.method === 'POST' && targetUrl.indexOf('localhost') !== -1) {
|
|
47
|
+
const modifiedOptions = {
|
|
48
|
+
method: input.method,
|
|
49
|
+
headers: new Headers(input.headers),
|
|
50
|
+
mode: input.mode,
|
|
51
|
+
credentials: input.credentials,
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
if (input.body && !input.bodyUsed) {
|
|
55
|
+
const requestClone = input.clone();
|
|
56
|
+
return input.clone().arrayBuffer().then(function (buffer) {
|
|
57
|
+
modifiedOptions.body = buffer;
|
|
58
|
+
|
|
59
|
+
return originalFetch(targetUrl, modifiedOptions);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return originalFetch(targetUrl, modifiedOptions);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
input = new Request(targetUrl, input);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return originalFetch.apply(this, [targetUrl, init]);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const originalOpen = XMLHttpRequest.prototype.open;
|
|
74
|
+
XMLHttpRequest.prototype.open = function (method, url, async, user, password) {
|
|
75
|
+
const redirectedUrl = redirectUrl(url);
|
|
76
|
+
if (redirectedUrl !== url) {
|
|
77
|
+
async = true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (async === undefined) {
|
|
81
|
+
async = true;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return originalOpen.apply(this, [method, redirectedUrl, async, user, password]);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
if (navigator.sendBeacon) {
|
|
88
|
+
const originalSendBeacon = navigator.sendBeacon;
|
|
89
|
+
navigator.sendBeacon = function (url, data) {
|
|
90
|
+
console.log("Beacon data:", data);
|
|
91
|
+
return originalSendBeacon.apply(this, [redirectUrl(url), data]);
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
Object.defineProperty(HTMLImageElement.prototype, 'src', {
|
|
96
|
+
set: function(value) {
|
|
97
|
+
const descriptor = Object.getOwnPropertyDescriptor(Element.prototype, 'setAttribute');
|
|
98
|
+
descriptor.value.call(this, 'src', redirectUrl(value));
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
Object.defineProperty(HTMLScriptElement.prototype, 'src', {
|
|
102
|
+
set: function(value) {
|
|
103
|
+
const descriptor = Object.getOwnPropertyDescriptor(Element.prototype, 'setAttribute');
|
|
104
|
+
descriptor.value.call(this, 'src', redirectUrl(value));
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// TizenTube Cobalt Update Checker
|
|
2
|
+
|
|
3
|
+
import { buttonItem, showModal, showToast, overlayPanelItemListRenderer, scrollPaneRenderer, overlayMessageRenderer } from '../ui/ytUI.js';
|
|
4
|
+
import { configRead } from '../config.js';
|
|
5
|
+
import { t } from 'i18next';
|
|
6
|
+
|
|
7
|
+
// If TizenTube is not running on Cobalt, do nothing
|
|
8
|
+
// Add a timeout since reloading the home page while the updater pop up is shown causes the pop up to instantly disappear.
|
|
9
|
+
setTimeout(() => {
|
|
10
|
+
if (window.h5vcc && window.h5vcc.tizentube && configRead('enableUpdater')) {
|
|
11
|
+
const currentEpoch = Math.floor(Date.now() / 1000);
|
|
12
|
+
if (configRead('dontCheckUpdateUntil') > currentEpoch) {
|
|
13
|
+
console.info('Skipping update check until', new Date(configRead('dontCheckUpdateUntil') * 1000).toLocaleString());
|
|
14
|
+
} else checkForUpdates();
|
|
15
|
+
}
|
|
16
|
+
}, 2500);
|
|
17
|
+
|
|
18
|
+
function getLatestRelease() {
|
|
19
|
+
return fetch('https://api.github.com/repos/reisxd/TizenTubeCobalt/releases/latest')
|
|
20
|
+
.then(response => {
|
|
21
|
+
if (!response.ok) {
|
|
22
|
+
throw new Error('Network response was not ok');
|
|
23
|
+
}
|
|
24
|
+
return response.json();
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function checkForUpdates(showNoUpdateToast) {
|
|
29
|
+
const currentAppVersion = window.h5vcc.tizentube.GetVersion();
|
|
30
|
+
const currentEpoch = Math.floor(Date.now() / 1000);
|
|
31
|
+
|
|
32
|
+
getLatestRelease()
|
|
33
|
+
.then(release => {
|
|
34
|
+
const latestVersion = release.tag_name.replace('v', '');
|
|
35
|
+
const releaseDate = new Date(release.published_at).getTime() / 1000;
|
|
36
|
+
|
|
37
|
+
let architecture;
|
|
38
|
+
let downloadUrl;
|
|
39
|
+
|
|
40
|
+
if (window.h5vcc.tizentube.GetArchitecture) {
|
|
41
|
+
architecture = window.h5vcc.tizentube.GetArchitecture();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (architecture) {
|
|
45
|
+
if (architecture === 'arm64-v8a') {
|
|
46
|
+
downloadUrl = release.assets.find(asset => asset.name.includes('arm64.apk')).browser_download_url;
|
|
47
|
+
} else {
|
|
48
|
+
downloadUrl = release.assets.find(asset => asset.name.includes('arm.apk')).browser_download_url;
|
|
49
|
+
}
|
|
50
|
+
} else downloadUrl = release.assets[0].browser_download_url;
|
|
51
|
+
|
|
52
|
+
if (latestVersion !== currentAppVersion) {
|
|
53
|
+
console.info(`New version available: ${latestVersion} (current: ${currentAppVersion})`);
|
|
54
|
+
const msg = `${t('settings.options.updater.releaseDate', { date: new Date(releaseDate * 1000).toLocaleString() })}\n${release.body}`.replace(/#/g, '').replace(/\*/g, '').trim();
|
|
55
|
+
|
|
56
|
+
const buttons = [
|
|
57
|
+
buttonItem(
|
|
58
|
+
{ title: t('settings.options.updater.updateNow.title'), subtitle: t('settings.options.updater.updateNow.subtitle') },
|
|
59
|
+
{ icon: 'DOWN_ARROW' },
|
|
60
|
+
[
|
|
61
|
+
{
|
|
62
|
+
customAction: {
|
|
63
|
+
action: 'UPDATE_DOWNLOAD',
|
|
64
|
+
parameters: downloadUrl
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
signalAction: {
|
|
69
|
+
signal: 'POPUP_BACK'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
),
|
|
74
|
+
buttonItem(
|
|
75
|
+
{ title: t('settings.options.updater.remindLater.title'), subtitle: t('settings.options.updater.remindLater.subtitle') },
|
|
76
|
+
{ icon: 'SEARCH_HISTORY' },
|
|
77
|
+
[
|
|
78
|
+
{
|
|
79
|
+
customAction: {
|
|
80
|
+
action: 'UPDATE_REMIND_LATER',
|
|
81
|
+
parameters: currentEpoch + 86400
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
signalAction: {
|
|
86
|
+
signal: 'POPUP_BACK'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
)
|
|
91
|
+
];
|
|
92
|
+
|
|
93
|
+
// Add an empty message so the CSS doesn't get screwed after user input
|
|
94
|
+
buttons.push(overlayMessageRenderer(' '));
|
|
95
|
+
buttons.push(overlayMessageRenderer(msg));
|
|
96
|
+
|
|
97
|
+
showModal(
|
|
98
|
+
{
|
|
99
|
+
title: t('settings.options.updater.updateAvailable.title'),
|
|
100
|
+
subtitle: t('settings.options.updater.updateAvailable.subtitle', { latestVersion, currentVersion: currentAppVersion })
|
|
101
|
+
},
|
|
102
|
+
overlayPanelItemListRenderer(buttons),
|
|
103
|
+
'tt-update-modal',
|
|
104
|
+
false
|
|
105
|
+
)
|
|
106
|
+
} else {
|
|
107
|
+
console.info('You are using the latest version of TizenTube.');
|
|
108
|
+
if (showNoUpdateToast) {
|
|
109
|
+
showToast(t('settings.options.updater.upToDate.title'), t('settings.options.updater.upToDate.subtitle', { version: currentAppVersion }), null);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
.catch(error => {
|
|
114
|
+
console.error('Error fetching the latest release:', error);
|
|
115
|
+
showToast(t('settings.options.updater.checkFailed.title'), t('settings.options.updater.checkFailed.subtitle'), null);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export default checkForUpdates;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const deviceProfiles = [
|
|
2
|
+
{
|
|
3
|
+
architecture: 'Linux arm64-v8a',
|
|
4
|
+
os: 'Android 10',
|
|
5
|
+
rasterizer: 'gles',
|
|
6
|
+
manufacturer: 'Sony',
|
|
7
|
+
deviceType: 'ATV',
|
|
8
|
+
chipsetModel: 'sdm845',
|
|
9
|
+
modelYear: 13140765,
|
|
10
|
+
firmwareVersion: '52.1.C.0.268',
|
|
11
|
+
brand: 'KDDI',
|
|
12
|
+
model: 'SOV38'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
architecture: 'Linux armeabi-v7a',
|
|
16
|
+
os: 'Android 14',
|
|
17
|
+
rasterizer: 'gles',
|
|
18
|
+
manufacturer: 'Google',
|
|
19
|
+
deviceType: 'ATV',
|
|
20
|
+
chipsetModel: 'sabrina',
|
|
21
|
+
modelYear: 2020,
|
|
22
|
+
firmwareVersion: 'UTTC.250917.004',
|
|
23
|
+
brand: 'google',
|
|
24
|
+
model: 'Chromecast'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
architecture: 'Linux armeabi-v7a',
|
|
28
|
+
os: 'Android 12',
|
|
29
|
+
rasterizer: 'gles',
|
|
30
|
+
manufacturer: 'TCL',
|
|
31
|
+
deviceType: 'ATV',
|
|
32
|
+
chipsetModel: 'merak',
|
|
33
|
+
modelYear: 2023,
|
|
34
|
+
firmwareVersion: 'STT2.221228.001',
|
|
35
|
+
brand: 'TCL',
|
|
36
|
+
model: 'Smart TV Pro'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
architecture: 'Linux armeabi-v7a',
|
|
40
|
+
os: 'Android 7.1.2',
|
|
41
|
+
rasterizer: 'gles',
|
|
42
|
+
manufacturer: 'Amazon',
|
|
43
|
+
deviceType: 'ATV',
|
|
44
|
+
chipsetModel: 'mt8695',
|
|
45
|
+
modelYear: 0,
|
|
46
|
+
firmwareVersion: 'NS6294',
|
|
47
|
+
brand: 'Amazon',
|
|
48
|
+
model: 'AFTMM'
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
const cobaltVersion = '25.lts.30.1034958-gold';
|
|
53
|
+
const v8Version = 'v8/8.8.278.17-jit';
|
|
54
|
+
const starboardVersion = '15';
|
|
55
|
+
const auxField = 'com.google.android.youtube.tv/5.30.301';
|
|
56
|
+
|
|
57
|
+
function generateUserAgent(profile) {
|
|
58
|
+
return `Mozilla/5.0 (${profile.architecture}; ${profile.os}) Cobalt/${cobaltVersion} (unlike Gecko) ${v8Version} ${profile.rasterizer} Starboard/${starboardVersion}, ${profile.manufacturer}_${profile.deviceType}_${profile.chipsetModel}_${profile.modelYear}/${profile.firmwareVersion} (${profile.brand}, ${profile.model}) ${auxField}`;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (document.querySelector('.content-container') && window.h5vcc && window.h5vcc.tizentube && window.h5vcc.tizentube.SetUserAgent) {
|
|
62
|
+
const ua = localStorage.getItem('userAgent');
|
|
63
|
+
if (ua) {
|
|
64
|
+
window.h5vcc.tizentube.SetUserAgent(ua);
|
|
65
|
+
location.reload();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const randomProfile = deviceProfiles[Math.floor(Math.random() * deviceProfiles.length)];
|
|
69
|
+
const spoofedUserAgent = generateUserAgent(randomProfile);
|
|
70
|
+
localStorage.setItem('userAgent', spoofedUserAgent);
|
|
71
|
+
window.h5vcc.tizentube.SetUserAgent(spoofedUserAgent);
|
|
72
|
+
location.reload();
|
|
73
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
window.queuedVideos = {
|
|
2
|
+
videos: [],
|
|
3
|
+
lastVideoId: null
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
import resolveCommand from '../resolveCommand.js';
|
|
7
|
+
|
|
8
|
+
function addListener() {
|
|
9
|
+
const videoPlayer = document.querySelector('.html5-video-player');
|
|
10
|
+
if (!videoPlayer) return setTimeout(addListener, 250);
|
|
11
|
+
|
|
12
|
+
videoPlayer.addEventListener('onStateChange', () => {
|
|
13
|
+
const playerStateObject = videoPlayer.getPlayerStateObject();
|
|
14
|
+
const videoData = videoPlayer.getVideoData();
|
|
15
|
+
if (window.queuedVideos.videos.length === 0) return;
|
|
16
|
+
if (playerStateObject.isEnded) {
|
|
17
|
+
const index = window.queuedVideos.videos.findIndex(v =>
|
|
18
|
+
(v.tileRenderer && v.tileRenderer.contentId === videoData.video_id) ||
|
|
19
|
+
(v.lockupViewModel && v.lockupViewModel.contentId === videoData.video_id)
|
|
20
|
+
);
|
|
21
|
+
if (index !== -1) {
|
|
22
|
+
if (index + 1 >= window.queuedVideos.videos.length) {
|
|
23
|
+
resolveCommand({
|
|
24
|
+
customAction: {
|
|
25
|
+
action: 'CLEAR_QUEUE'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const element = window.queuedVideos.videos[index + 1];
|
|
31
|
+
const videoWatchEndpoint = element.tileRenderer ? element.tileRenderer.onSelectCommand : element.lockupViewModel.rendererContext.commandContext.onTap.innertubeCommand;
|
|
32
|
+
setTimeout(() => resolveCommand(videoWatchEndpoint), 500);
|
|
33
|
+
} else if (window.queuedVideos.lastVideoId) {
|
|
34
|
+
const lastIndex = window.queuedVideos.videos.findIndex(v =>
|
|
35
|
+
v.tileRenderer?.contentId === window.queuedVideos.lastVideoId ||
|
|
36
|
+
v.lockupViewModel?.contentId === window.queuedVideos.lastVideoId
|
|
37
|
+
);
|
|
38
|
+
if (lastIndex !== -1 && lastIndex + 1 < window.queuedVideos.videos.length) {
|
|
39
|
+
const element = window.queuedVideos.videos[lastIndex + 1];
|
|
40
|
+
const videoWatchEndpoint = element.tileRenderer ? element.tileRenderer.onSelectCommand : element.lockupViewModel.rendererContext.commandContext.onTap.innertubeCommand;
|
|
41
|
+
setTimeout(() => resolveCommand(videoWatchEndpoint), 500);
|
|
42
|
+
} else {
|
|
43
|
+
resolveCommand({
|
|
44
|
+
customAction: {
|
|
45
|
+
action: 'CLEAR_QUEUE'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
} else {
|
|
51
|
+
const element = window.queuedVideos.videos[0];
|
|
52
|
+
const videoWatchEndpoint = element.tileRenderer ? element.tileRenderer.onSelectCommand : element.lockupViewModel.rendererContext.commandContext.onTap.innertubeCommand;
|
|
53
|
+
setTimeout(() => resolveCommand(videoWatchEndpoint), 500);
|
|
54
|
+
}
|
|
55
|
+
} else if (playerStateObject.isPlaying) {
|
|
56
|
+
document.getElementById('container').style.setProperty('opacity', '1', 'important');
|
|
57
|
+
if (window.queuedVideos.videos.find(v => v.contentId === videoData.video_id)) {
|
|
58
|
+
window.queuedVideos.lastVideoId = videoData.video_id;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
addListener();
|