@shadowtube/tizentube-noanimations 1.15.0 → 1.15.2

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 CHANGED
@@ -1,47 +1,17 @@
1
- # ▶️ TizenTube
1
+ # ▶️ TizenTube ( with Vanced legacy icon in the 3 releases )
2
2
 
3
3
  <p align="center">
4
4
  <img width="600px" src=".github/assets/TizenTube Standalone Banner.png">
5
- <br>
6
- <sub> TizenTube logo, banner and README by <a href="https://github.com/Zyborg777">@Zyborg777</a> </sub>
7
5
  </p>
8
6
 
9
- **TizenTube froked from @foxreis/tizentube ** is a TizenBrew module that enhances your favourite streaming websites viewing experience by removing ads and adding support for Sponsorblock. **Now works as a standalone app!**
7
+ **This is a fork of https://github.com/reisxd/TizenTube repo**
8
+ **This fork made mainly to fix "pause" , "play" , "seeking forward" , "seeking backward" buttons on Tizen 4.0 TV buttons**
10
9
 
11
- ---
10
+ This Standalone verion is forked from 2.0.1 Version.
12
11
 
13
- 🤖 **Looking for an app for Android TVs?** Check out [TizenTube Cobalt](https://github.com/reisxd/TizenTubeCobalt). It offers everything TizenTube has for Android TVs.
12
+ It receives updates from: cdn.jsdelivr.net/npm/@foxreis/tizentube/dist/userScript.js ; so it's up to date with latest patches ( check releases page for more details: https://github.com/peteramir/TizenTubeVancedIcon_-Pause-Play-ButtonsWorkOnTizen-4.0/releases/tag/fixes )
14
13
 
15
- <p align="left">
16
- <a href="https://github.com/reisxd/TizenTubeCobalt/releases/latest">
17
- <picture>
18
- <img width="250px"
19
- src=".github/assets/TizenTube_Cobalt_dl-button.png" />
20
- </picture>
21
- </a>
22
- </p>
23
-
24
- ## ❓ How to install
25
-
26
- 1. Install TizenBrew from [here](https://github.com/reisxd/TizenBrew) and follow the instructions.
27
-
28
- 2. TizenTube is installed to TizenBrew by default. It should be in the home screen. If not, add `@foxreis/tizentube` as a NPM module in TizenBrew module manager.
29
-
30
- ## ✨ Features
31
-
32
- - 📺 **Picture-in-Picture Mode**
33
- - 🛑 **Ad Blocker**: Enjoy your favourite streaming website without interruptions from ads.
34
- - ❗ **SponsorBlock Support**: Automatically skip sponsored segments in videos.
35
- - ⏭️ **Video Speed Control**: Adjust playback speed to your preference.
36
- - 🔺 **[DeArrow](https://dearrow.ajay.app/) Support**: Remove clickbait and misleading video titles.
37
- - ➕ **More to come!** Request features via [issues](https://github.com/reisxd/TizenTube/issues/new).
38
-
39
- ## 🌐 Community and Support
14
+ The exact remote which I fixed: "pause" and "play" buttons on ( the last line from the bottom )
15
+ <img width="300px" src=".github/assets/Samsung_TV_Remote.png">
40
16
 
41
- | Links |
42
- | ------------------------------------------------------------------------------ |
43
- | [r/TizenTube Subreddit](https://www.reddit.com/r/TizenTube/) |
44
- | [Discord Server](https://discord.gg/m2P7v8Y2qR) |
45
- | [Telegram](https://t.me/tizentubeofficial) |
46
- | [Matrix Space](https://matrix.to/#/!BLE5ubNYktI30e8K0j:matrix.6513006.xyz) |
47
- | [Report Issues / Request Features](https://github.com/reisxd/TizenTube/issues) |
17
+ Note: My Samsung TV model is: ua49n5300 49 inch ( this fork only tested on Tizen 4.0 )
@@ -0,0 +1,143 @@
1
+ /*
2
+ * TizenTube - Arrow Key Seeking
3
+ * Target: Tizen 4.0 / Chromium 56
4
+ *
5
+ * LEFT / RIGHT: seek -10s / +10s
6
+ * Hold: repeated seeking without showing the UI
7
+ *
8
+ * Load this file AFTER the original TizenTube userScript.js.
9
+ */
10
+ (function () {
11
+ 'use strict';
12
+
13
+ if (window.__ttArrowSeekInstalled) return;
14
+ window.__ttArrowSeekInstalled = true;
15
+
16
+ var heldKeys = {};
17
+ var SEEK_SECONDS = 10;
18
+
19
+ function isArrow(e) {
20
+ return (
21
+ e.key === 'ArrowLeft' ||
22
+ e.key === 'ArrowRight' ||
23
+ e.keyCode === 37 ||
24
+ e.keyCode === 39
25
+ );
26
+ }
27
+
28
+ function isTyping(target) {
29
+ if (!target) return false;
30
+ if (target.isContentEditable) return true;
31
+
32
+ return /^(INPUT|TEXTAREA|SELECT)$/.test(target.tagName || '');
33
+ }
34
+
35
+ function isHidden(el) {
36
+ while (el && el !== document) {
37
+ var style = window.getComputedStyle(el);
38
+
39
+ if (
40
+ el.getAttribute('aria-hidden') === 'true' ||
41
+ (el.classList && el.classList.contains('zylon-hidden')) ||
42
+ style.display === 'none' ||
43
+ style.visibility === 'hidden'
44
+ ) {
45
+ return true;
46
+ }
47
+
48
+ el = el.parentNode;
49
+ }
50
+
51
+ return false;
52
+ }
53
+
54
+ function isOnRecommendedVideo(el) {
55
+ if (!el || !el.closest) return false;
56
+
57
+ var tile = el.closest('ytlr-tile-renderer');
58
+
59
+ return !!(tile && !isHidden(tile));
60
+ }
61
+
62
+ function isUIVisible() {
63
+ var selectors = [
64
+ 'ytlr-player-page',
65
+ 'ytlr-player-actions-container',
66
+ 'ytlr-progress-bar',
67
+ ];
68
+
69
+ var i;
70
+ var el;
71
+ var style;
72
+
73
+ for (i = 0; i < selectors.length; i++) {
74
+ el = document.querySelector(selectors[i]);
75
+
76
+ if (!el || isHidden(el)) continue;
77
+
78
+ style = window.getComputedStyle(el);
79
+
80
+ if (
81
+ style.visibility !== 'hidden' &&
82
+ parseFloat(style.opacity) > 0 &&
83
+ el.getClientRects().length > 0
84
+ ) {
85
+ return true;
86
+ }
87
+ }
88
+
89
+ return false;
90
+ }
91
+
92
+ function seek(video, direction) {
93
+ var target = video.currentTime + direction * SEEK_SECONDS;
94
+ var duration = video.duration;
95
+
96
+ if (target < 0) target = 0;
97
+
98
+ if (isFinite(duration) && target > duration) {
99
+ target = duration;
100
+ }
101
+
102
+ video.currentTime = target;
103
+ }
104
+
105
+ function handler(e) {
106
+ if (!isArrow(e)) return;
107
+
108
+ var code = e.keyCode || e.which;
109
+ var direction = code === 39 ? 1 : -1;
110
+
111
+ if (e.type === 'keyup') {
112
+ if (!heldKeys[code]) return;
113
+
114
+ e.preventDefault();
115
+ e.stopImmediatePropagation();
116
+
117
+ delete heldKeys[code];
118
+ return;
119
+ }
120
+
121
+ if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return;
122
+ if (isTyping(e.target)) return;
123
+
124
+ var video = document.querySelector('video');
125
+
126
+ if (!video || video.paused || video.ended) return;
127
+
128
+ if (!heldKeys[code]) {
129
+ if (isOnRecommendedVideo(e.target)) return;
130
+ if (isUIVisible()) return;
131
+
132
+ heldKeys[code] = true;
133
+ }
134
+
135
+ e.preventDefault();
136
+ e.stopImmediatePropagation();
137
+
138
+ seek(video, direction);
139
+ }
140
+
141
+ document.addEventListener('keydown', handler, true);
142
+ document.addEventListener('keyup', handler, true);
143
+ })();
package/dist/service.js CHANGED
@@ -50388,7 +50388,7 @@ var corsOptions = {
50388
50388
  optionsSuccessStatus: 204
50389
50389
  };
50390
50390
  app.use(cors(corsOptions));
50391
- var PORT = commonjsGlobal.isTizenTube ? 8095 : 8085;
50391
+ var PORT = commonjsGlobal.isTizenTube ? 8096 : 8086;
50392
50392
  var apps = {
50393
50393
  "YouTube": {
50394
50394
  name: "YouTube",
@@ -50399,7 +50399,7 @@ var apps = {
50399
50399
  launch: function launch(launchData) {
50400
50400
  var tbPackageId = tizen.application.getAppInfo().packageId;
50401
50401
  tizen.application.launchAppControl(new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view", null, null, null, [new tizen.ApplicationControlData("module", [JSON.stringify({
50402
- moduleName: '@foxreis/tizentube',
50402
+ moduleName: '@shadowtube/tizentube-noanimations',
50403
50403
  moduleType: 'npm',
50404
50404
  args: launchData
50405
50405
  })])]), "".concat(tbPackageId, ".").concat(commonjsGlobal.isTizenTube ? 'TizenTubeStandalone' : 'TizenBrewStandalone'));
@@ -50472,8 +50472,15 @@ setInterval(function () {
50472
50472
  }
50473
50473
  });
50474
50474
  }, 5000);
50475
- app.listen(PORT, function () {
50475
+ var __server = app.listen(PORT, function () {
50476
50476
  dialServer.start();
50477
50477
  });
50478
+ __server.on('error', function (err) {
50479
+ if (err && err.code === 'EADDRINUSE') {
50480
+ console.error('TizenTube (fork): port ' + PORT + ' is already in use, DIAL/cast discovery for this instance will be disabled, but the rest of the app will keep working.');
50481
+ } else {
50482
+ console.error('TizenTube (fork): failed to start DIAL server:', err);
50483
+ }
50484
+ });
50478
50485
 
50479
50486
  module.exports = service;
@@ -11485,7 +11485,7 @@
11485
11485
  };
11486
11486
  })());
11487
11487
  var ba,
11488
- ya = 'ytaf-configuration',
11488
+ ya = 'ytaf-configuration-shadowtube',
11489
11489
  ka = {
11490
11490
  enableAdBlock: !0,
11491
11491
  enableSponsorBlock: !0,
@@ -26060,21 +26060,47 @@
26060
26060
  return (console.log('Beacon data:', i), n.apply(this, [e(t), i]));
26061
26061
  };
26062
26062
  }
26063
- (Object.defineProperty(HTMLImageElement.prototype, 'src', {
26064
- set: function (t) {
26065
- Object.getOwnPropertyDescriptor(
26066
- Element.prototype,
26067
- 'setAttribute',
26068
- ).value.call(this, 'src', e(t));
26069
- },
26070
- }),
26071
- Object.defineProperty(HTMLScriptElement.prototype, 'src', {
26072
- set: function (t) {
26073
- Object.getOwnPropertyDescriptor(
26074
- Element.prototype,
26075
- 'setAttribute',
26076
- ).value.call(this, 'src', e(t));
26077
- },
26078
- }));
26063
+ ((function () {
26064
+ try {
26065
+ var __d = Object.getOwnPropertyDescriptor(
26066
+ HTMLImageElement.prototype,
26067
+ 'src',
26068
+ );
26069
+ if (!__d || __d.configurable !== false) {
26070
+ Object.defineProperty(HTMLImageElement.prototype, 'src', {
26071
+ configurable: true,
26072
+ set: function (t) {
26073
+ Object.getOwnPropertyDescriptor(
26074
+ Element.prototype,
26075
+ 'setAttribute',
26076
+ ).value.call(this, 'src', e(t));
26077
+ },
26078
+ });
26079
+ }
26080
+ } catch (err) {
26081
+ console.warn('TizenTube: skipping HTMLImageElement.src patch (already patched by another instance)', err);
26082
+ }
26083
+ })(),
26084
+ (function () {
26085
+ try {
26086
+ var __d2 = Object.getOwnPropertyDescriptor(
26087
+ HTMLScriptElement.prototype,
26088
+ 'src',
26089
+ );
26090
+ if (!__d2 || __d2.configurable !== false) {
26091
+ Object.defineProperty(HTMLScriptElement.prototype, 'src', {
26092
+ configurable: true,
26093
+ set: function (t) {
26094
+ Object.getOwnPropertyDescriptor(
26095
+ Element.prototype,
26096
+ 'setAttribute',
26097
+ ).value.call(this, 'src', e(t));
26098
+ },
26099
+ });
26100
+ }
26101
+ } catch (err) {
26102
+ console.warn('TizenTube: skipping HTMLScriptElement.src patch (already patched by another instance)', err);
26103
+ }
26104
+ })());
26079
26105
  })());
26080
26106
  })();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shadowtube/tizentube-noanimations",
3
3
  "appName": "TizenTube",
4
- "version": "1.15.0",
4
+ "version": "1.15.2",
5
5
  "description": "NoAnimations",
6
6
  "packageType": "mods",
7
7
  "websiteURL": "https://youtube.com/tv?additionalDataUrl=http%3A%2F%2Flocalhost%3A8085%2Fdial%2Fapps%2FYouTube",