unified-video-framework 1.4.175 → 1.4.177
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unified-video-framework",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.177",
|
|
4
4
|
"description": "Cross-platform video player framework supporting iOS, Android, Web, Smart TVs (Samsung/LG), Roku, and more",
|
|
5
5
|
"main": "packages/core/dist/index.js",
|
|
6
6
|
"types": "packages/core/dist/index.d.ts",
|
|
@@ -54,6 +54,21 @@ export declare class WebPlayer extends BasePlayer {
|
|
|
54
54
|
private hasTriedButtonFallback;
|
|
55
55
|
private lastUserInteraction;
|
|
56
56
|
private showTimeTooltip;
|
|
57
|
+
private tapStartTime;
|
|
58
|
+
private tapStartX;
|
|
59
|
+
private tapStartY;
|
|
60
|
+
private lastTapTime;
|
|
61
|
+
private lastTapX;
|
|
62
|
+
private tapCount;
|
|
63
|
+
private longPressTimer;
|
|
64
|
+
private isLongPressing;
|
|
65
|
+
private longPressPlaybackRate;
|
|
66
|
+
private tapResetTimer;
|
|
67
|
+
private fastBackwardInterval;
|
|
68
|
+
private handleSingleTap;
|
|
69
|
+
private handleDoubleTap;
|
|
70
|
+
private handleLongPress;
|
|
71
|
+
private handleLongPressEnd;
|
|
57
72
|
private autoplayCapabilities;
|
|
58
73
|
private autoplayRetryPending;
|
|
59
74
|
private autoplayRetryAttempts;
|
|
@@ -141,6 +156,8 @@ export declare class WebPlayer extends BasePlayer {
|
|
|
141
156
|
private isIOSDevice;
|
|
142
157
|
private isAndroidDevice;
|
|
143
158
|
private isFullscreenSupported;
|
|
159
|
+
private lockOrientationLandscape;
|
|
160
|
+
private unlockOrientation;
|
|
144
161
|
private handleVolumeChange;
|
|
145
162
|
private handleProgressChange;
|
|
146
163
|
private formatTime;
|
|
@@ -148,6 +165,9 @@ export declare class WebPlayer extends BasePlayer {
|
|
|
148
165
|
private showControls;
|
|
149
166
|
private hideControls;
|
|
150
167
|
private scheduleHideControls;
|
|
168
|
+
private setupAdvancedTapHandling;
|
|
169
|
+
private startFastBackward;
|
|
170
|
+
private stopFastBackward;
|
|
151
171
|
private isFullscreen;
|
|
152
172
|
private setupFullscreenListeners;
|
|
153
173
|
private showShortcutIndicator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebPlayer.d.ts","sourceRoot":"","sources":["../src/WebPlayer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAOL,OAAO,EACP,cAAc,EACf,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,aAAa,EACb,aAAa,EACb,YAAY,EAEb,MAAM,+BAA+B,CAAC;AAGvC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,GAAG,EAAE,GAAG,CAAC;QACT,MAAM,EAAE,GAAG,CAAC;QACZ,IAAI,CAAC,EAAE,GAAG,CAAC;QACX,MAAM,CAAC,EAAE,GAAG,CAAC;QACb,qBAAqB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;KACxD;CACF;AAED,qBAAa,SAAU,SAAQ,UAAU;IACvC,SAAS,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAChD,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,mBAAmB,CAAc;IACzC,OAAO,CAAC,WAAW,CAAiB;IACpC,OAAO,CAAC,iBAAiB,CAAiB;IAC1C,OAAO,CAAC,iBAAiB,CAA4B;IACrD,OAAO,CAAC,iBAAiB,CAA+B;IACxD,OAAO,CAAC,mBAAmB,CAA+B;IAC1D,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,kBAAkB,CAA6C;IACvE,OAAO,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;IAezB,OAAO,CAAC,gBAAgB;IAgCxB,OAAO,CAAC,kBAAkB;IAyB1B,OAAO,CAAC,qBAAqB;IAoH7B,OAAO,CAAC,wBAAwB;IA+ChC,OAAO,CAAC,wBAAwB;IA6BhC,OAAO,CAAC,2BAA2B;IAqDnC,OAAO,CAAC,sBAAsB;IAwB9B,OAAO,CAAC,gBAAgB;IAsBxB,OAAO,CAAC,6BAA6B;IA0BrC,OAAO,CAAC,0BAA0B;IAgBlC,OAAO,CAAC,2BAA2B;IAWnC,OAAO,CAAC,sBAAsB;IA4B9B,OAAO,CAAC,WAAW;IAgCnB,OAAO,CAAC,uBAAuB;IAqB/B,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,WAAW;YAoBL,QAAQ;YAqGR,UAAU;IAqBxB,OAAO,CAAC,gBAAgB;IA2CxB,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,YAAY;IA6BpB,OAAO,CAAC,sBAAsB;IA6B9B,OAAO,CAAC,sBAAsB;IAiF9B,OAAO,CAAC,uBAAuB;IAuB/B,OAAO,CAAC,4BAA4B;IAoDpC,OAAO,CAAC,oBAAoB;IA+BrB,aAAa,IAAI,IAAI;IAarB,aAAa,IAAI,IAAI;IAYrB,UAAU,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;IAe9B,kBAAkB,IAAI,OAAO;YAKtB,OAAO;IAgBf,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAqD/B"}
|
|
@@ -52,6 +52,21 @@ export class WebPlayer extends BasePlayer {
|
|
|
52
52
|
this.hasTriedButtonFallback = false;
|
|
53
53
|
this.lastUserInteraction = 0;
|
|
54
54
|
this.showTimeTooltip = false;
|
|
55
|
+
this.tapStartTime = 0;
|
|
56
|
+
this.tapStartX = 0;
|
|
57
|
+
this.tapStartY = 0;
|
|
58
|
+
this.lastTapTime = 0;
|
|
59
|
+
this.lastTapX = 0;
|
|
60
|
+
this.tapCount = 0;
|
|
61
|
+
this.longPressTimer = null;
|
|
62
|
+
this.isLongPressing = false;
|
|
63
|
+
this.longPressPlaybackRate = 1;
|
|
64
|
+
this.tapResetTimer = null;
|
|
65
|
+
this.fastBackwardInterval = null;
|
|
66
|
+
this.handleSingleTap = () => { };
|
|
67
|
+
this.handleDoubleTap = () => { };
|
|
68
|
+
this.handleLongPress = () => { };
|
|
69
|
+
this.handleLongPressEnd = () => { };
|
|
55
70
|
this.autoplayCapabilities = {
|
|
56
71
|
canAutoplay: false,
|
|
57
72
|
canAutoplayMuted: false,
|
|
@@ -1057,12 +1072,14 @@ export class WebPlayer extends BasePlayer {
|
|
|
1057
1072
|
await this.video.webkitEnterFullscreen();
|
|
1058
1073
|
this.playerWrapper.classList.add('uvf-fullscreen');
|
|
1059
1074
|
this.emit('onFullscreenChanged', true);
|
|
1075
|
+
await this.lockOrientationLandscape();
|
|
1060
1076
|
return;
|
|
1061
1077
|
}
|
|
1062
1078
|
else if (this.video.webkitRequestFullscreen) {
|
|
1063
1079
|
await this.video.webkitRequestFullscreen();
|
|
1064
1080
|
this.playerWrapper.classList.add('uvf-fullscreen');
|
|
1065
1081
|
this.emit('onFullscreenChanged', true);
|
|
1082
|
+
await this.lockOrientationLandscape();
|
|
1066
1083
|
return;
|
|
1067
1084
|
}
|
|
1068
1085
|
}
|
|
@@ -1122,11 +1139,7 @@ export class WebPlayer extends BasePlayer {
|
|
|
1122
1139
|
if (fullscreenSuccess) {
|
|
1123
1140
|
this.playerWrapper.classList.add('uvf-fullscreen');
|
|
1124
1141
|
this.emit('onFullscreenChanged', true);
|
|
1125
|
-
|
|
1126
|
-
setTimeout(() => {
|
|
1127
|
-
this.showShortcutIndicator('Rotate device to landscape for best experience');
|
|
1128
|
-
}, 1000);
|
|
1129
|
-
}
|
|
1142
|
+
await this.lockOrientationLandscape();
|
|
1130
1143
|
}
|
|
1131
1144
|
else {
|
|
1132
1145
|
this.debugWarn('All fullscreen methods failed');
|
|
@@ -1155,6 +1168,7 @@ export class WebPlayer extends BasePlayer {
|
|
|
1155
1168
|
this.playerWrapper.classList.remove('uvf-fullscreen');
|
|
1156
1169
|
}
|
|
1157
1170
|
this.emit('onFullscreenChanged', false);
|
|
1171
|
+
await this.unlockOrientation();
|
|
1158
1172
|
return;
|
|
1159
1173
|
}
|
|
1160
1174
|
}
|
|
@@ -1208,6 +1222,7 @@ export class WebPlayer extends BasePlayer {
|
|
|
1208
1222
|
this.playerWrapper.classList.remove('uvf-fullscreen');
|
|
1209
1223
|
}
|
|
1210
1224
|
this.emit('onFullscreenChanged', false);
|
|
1225
|
+
await this.unlockOrientation();
|
|
1211
1226
|
}
|
|
1212
1227
|
else {
|
|
1213
1228
|
this.debugWarn('All exit fullscreen methods failed');
|
|
@@ -5357,24 +5372,11 @@ export class WebPlayer extends BasePlayer {
|
|
|
5357
5372
|
});
|
|
5358
5373
|
centerPlay?.addEventListener('click', () => this.togglePlayPause());
|
|
5359
5374
|
playPauseBtn?.addEventListener('click', () => this.togglePlayPause());
|
|
5360
|
-
this.
|
|
5361
|
-
|
|
5362
|
-
e.stopPropagation();
|
|
5363
|
-
const wrapper = this.container?.querySelector('.uvf-player-wrapper');
|
|
5364
|
-
if (wrapper?.classList.contains('controls-visible')) {
|
|
5365
|
-
this.hideControls();
|
|
5366
|
-
}
|
|
5367
|
-
else {
|
|
5368
|
-
this.showControls();
|
|
5369
|
-
if (this.state.isPlaying) {
|
|
5370
|
-
this.scheduleHideControls();
|
|
5371
|
-
}
|
|
5372
|
-
}
|
|
5373
|
-
}
|
|
5374
|
-
else {
|
|
5375
|
+
if (!this.isMobileDevice()) {
|
|
5376
|
+
this.video.addEventListener('click', (e) => {
|
|
5375
5377
|
this.togglePlayPause();
|
|
5376
|
-
}
|
|
5377
|
-
}
|
|
5378
|
+
});
|
|
5379
|
+
}
|
|
5378
5380
|
this.video.addEventListener('play', () => {
|
|
5379
5381
|
const playIcon = document.getElementById('uvf-play-icon');
|
|
5380
5382
|
const pauseIcon = document.getElementById('uvf-pause-icon');
|
|
@@ -5851,19 +5853,7 @@ export class WebPlayer extends BasePlayer {
|
|
|
5851
5853
|
this.playerWrapper?.focus();
|
|
5852
5854
|
this.lastUserInteraction = Date.now();
|
|
5853
5855
|
});
|
|
5854
|
-
this.
|
|
5855
|
-
const target = e.target;
|
|
5856
|
-
if (!target.closest('.uvf-controls')) {
|
|
5857
|
-
e.preventDefault();
|
|
5858
|
-
this.debugLog('Double-click detected - attempting fullscreen');
|
|
5859
|
-
if (!document.fullscreenElement) {
|
|
5860
|
-
this.triggerFullscreenButton();
|
|
5861
|
-
}
|
|
5862
|
-
else {
|
|
5863
|
-
this.exitFullscreen();
|
|
5864
|
-
}
|
|
5865
|
-
}
|
|
5866
|
-
});
|
|
5856
|
+
this.setupAdvancedTapHandling();
|
|
5867
5857
|
}
|
|
5868
5858
|
if (this.video) {
|
|
5869
5859
|
this.video.addEventListener('keydown', handleKeydown);
|
|
@@ -6182,6 +6172,56 @@ export class WebPlayer extends BasePlayer {
|
|
|
6182
6172
|
document.mozFullScreenEnabled ||
|
|
6183
6173
|
document.msFullscreenEnabled);
|
|
6184
6174
|
}
|
|
6175
|
+
async lockOrientationLandscape() {
|
|
6176
|
+
try {
|
|
6177
|
+
if (!this.isMobileDevice()) {
|
|
6178
|
+
this.debugLog('Skipping orientation lock - not a mobile device');
|
|
6179
|
+
return;
|
|
6180
|
+
}
|
|
6181
|
+
const screenOrientation = screen.orientation;
|
|
6182
|
+
if (screenOrientation && typeof screenOrientation.lock === 'function') {
|
|
6183
|
+
try {
|
|
6184
|
+
await screenOrientation.lock('landscape');
|
|
6185
|
+
this.debugLog('Screen orientation locked to landscape');
|
|
6186
|
+
}
|
|
6187
|
+
catch (error) {
|
|
6188
|
+
this.debugWarn('Failed to lock orientation to landscape:', error.message);
|
|
6189
|
+
if (this.isAndroidDevice()) {
|
|
6190
|
+
this.showShortcutIndicator('Please rotate device to landscape');
|
|
6191
|
+
}
|
|
6192
|
+
}
|
|
6193
|
+
}
|
|
6194
|
+
else {
|
|
6195
|
+
this.debugLog('Screen Orientation API not supported');
|
|
6196
|
+
if (this.isMobileDevice()) {
|
|
6197
|
+
this.showShortcutIndicator('Rotate device to landscape for best experience');
|
|
6198
|
+
}
|
|
6199
|
+
}
|
|
6200
|
+
}
|
|
6201
|
+
catch (error) {
|
|
6202
|
+
this.debugWarn('Orientation lock error:', error.message);
|
|
6203
|
+
}
|
|
6204
|
+
}
|
|
6205
|
+
async unlockOrientation() {
|
|
6206
|
+
try {
|
|
6207
|
+
const screenOrientation = screen.orientation;
|
|
6208
|
+
if (screenOrientation && typeof screenOrientation.unlock === 'function') {
|
|
6209
|
+
try {
|
|
6210
|
+
screenOrientation.unlock();
|
|
6211
|
+
this.debugLog('Screen orientation unlocked');
|
|
6212
|
+
}
|
|
6213
|
+
catch (error) {
|
|
6214
|
+
this.debugWarn('Failed to unlock orientation:', error.message);
|
|
6215
|
+
}
|
|
6216
|
+
}
|
|
6217
|
+
else {
|
|
6218
|
+
this.debugLog('Screen Orientation API not supported for unlock');
|
|
6219
|
+
}
|
|
6220
|
+
}
|
|
6221
|
+
catch (error) {
|
|
6222
|
+
this.debugWarn('Orientation unlock error:', error.message);
|
|
6223
|
+
}
|
|
6224
|
+
}
|
|
6185
6225
|
handleVolumeChange(e) {
|
|
6186
6226
|
const slider = document.getElementById('uvf-volume-slider');
|
|
6187
6227
|
if (!slider)
|
|
@@ -6286,6 +6326,176 @@ export class WebPlayer extends BasePlayer {
|
|
|
6286
6326
|
}
|
|
6287
6327
|
}, timeout);
|
|
6288
6328
|
}
|
|
6329
|
+
setupAdvancedTapHandling() {
|
|
6330
|
+
if (!this.video || !this.playerWrapper)
|
|
6331
|
+
return;
|
|
6332
|
+
const DOUBLE_TAP_DELAY = 300;
|
|
6333
|
+
const LONG_PRESS_DELAY = 500;
|
|
6334
|
+
const TAP_MOVEMENT_THRESHOLD = 10;
|
|
6335
|
+
const SKIP_SECONDS = 10;
|
|
6336
|
+
const FAST_PLAYBACK_RATE = 2;
|
|
6337
|
+
const videoElement = this.video;
|
|
6338
|
+
const wrapper = this.playerWrapper;
|
|
6339
|
+
const handleTouchStart = (e) => {
|
|
6340
|
+
const target = e.target;
|
|
6341
|
+
if (target.closest('.uvf-controls')) {
|
|
6342
|
+
return;
|
|
6343
|
+
}
|
|
6344
|
+
const touch = e.touches[0];
|
|
6345
|
+
this.tapStartTime = Date.now();
|
|
6346
|
+
this.tapStartX = touch.clientX;
|
|
6347
|
+
this.tapStartY = touch.clientY;
|
|
6348
|
+
this.longPressTimer = setTimeout(() => {
|
|
6349
|
+
this.isLongPressing = true;
|
|
6350
|
+
this.handleLongPress(this.tapStartX);
|
|
6351
|
+
}, LONG_PRESS_DELAY);
|
|
6352
|
+
};
|
|
6353
|
+
const handleTouchMove = (e) => {
|
|
6354
|
+
const touch = e.touches[0];
|
|
6355
|
+
const deltaX = Math.abs(touch.clientX - this.tapStartX);
|
|
6356
|
+
const deltaY = Math.abs(touch.clientY - this.tapStartY);
|
|
6357
|
+
if (deltaX > TAP_MOVEMENT_THRESHOLD || deltaY > TAP_MOVEMENT_THRESHOLD) {
|
|
6358
|
+
if (this.longPressTimer) {
|
|
6359
|
+
clearTimeout(this.longPressTimer);
|
|
6360
|
+
this.longPressTimer = null;
|
|
6361
|
+
}
|
|
6362
|
+
}
|
|
6363
|
+
};
|
|
6364
|
+
const handleTouchEnd = (e) => {
|
|
6365
|
+
if (this.longPressTimer) {
|
|
6366
|
+
clearTimeout(this.longPressTimer);
|
|
6367
|
+
this.longPressTimer = null;
|
|
6368
|
+
}
|
|
6369
|
+
if (this.isLongPressing) {
|
|
6370
|
+
this.handleLongPressEnd();
|
|
6371
|
+
this.isLongPressing = false;
|
|
6372
|
+
return;
|
|
6373
|
+
}
|
|
6374
|
+
const target = e.target;
|
|
6375
|
+
if (target.closest('.uvf-controls')) {
|
|
6376
|
+
return;
|
|
6377
|
+
}
|
|
6378
|
+
const touch = e.changedTouches[0];
|
|
6379
|
+
const touchEndX = touch.clientX;
|
|
6380
|
+
const touchEndY = touch.clientY;
|
|
6381
|
+
const tapDuration = Date.now() - this.tapStartTime;
|
|
6382
|
+
const deltaX = Math.abs(touchEndX - this.tapStartX);
|
|
6383
|
+
const deltaY = Math.abs(touchEndY - this.tapStartY);
|
|
6384
|
+
if (deltaX > TAP_MOVEMENT_THRESHOLD || deltaY > TAP_MOVEMENT_THRESHOLD) {
|
|
6385
|
+
return;
|
|
6386
|
+
}
|
|
6387
|
+
if (tapDuration > LONG_PRESS_DELAY) {
|
|
6388
|
+
return;
|
|
6389
|
+
}
|
|
6390
|
+
const now = Date.now();
|
|
6391
|
+
const timeSinceLastTap = now - this.lastTapTime;
|
|
6392
|
+
if (timeSinceLastTap < DOUBLE_TAP_DELAY && Math.abs(touchEndX - this.lastTapX) < 100) {
|
|
6393
|
+
this.tapCount = 2;
|
|
6394
|
+
if (this.tapResetTimer) {
|
|
6395
|
+
clearTimeout(this.tapResetTimer);
|
|
6396
|
+
this.tapResetTimer = null;
|
|
6397
|
+
}
|
|
6398
|
+
this.handleDoubleTap(touchEndX);
|
|
6399
|
+
}
|
|
6400
|
+
else {
|
|
6401
|
+
this.tapCount = 1;
|
|
6402
|
+
this.lastTapTime = now;
|
|
6403
|
+
this.lastTapX = touchEndX;
|
|
6404
|
+
if (this.tapResetTimer) {
|
|
6405
|
+
clearTimeout(this.tapResetTimer);
|
|
6406
|
+
}
|
|
6407
|
+
this.tapResetTimer = setTimeout(() => {
|
|
6408
|
+
if (this.tapCount === 1) {
|
|
6409
|
+
this.handleSingleTap();
|
|
6410
|
+
}
|
|
6411
|
+
this.tapCount = 0;
|
|
6412
|
+
}, DOUBLE_TAP_DELAY);
|
|
6413
|
+
}
|
|
6414
|
+
};
|
|
6415
|
+
const handleSingleTap = () => {
|
|
6416
|
+
this.debugLog('Single tap detected - toggling controls');
|
|
6417
|
+
const wrapper = this.container?.querySelector('.uvf-player-wrapper');
|
|
6418
|
+
if (wrapper?.classList.contains('controls-visible')) {
|
|
6419
|
+
this.hideControls();
|
|
6420
|
+
}
|
|
6421
|
+
else {
|
|
6422
|
+
this.showControls();
|
|
6423
|
+
if (this.state.isPlaying) {
|
|
6424
|
+
this.scheduleHideControls();
|
|
6425
|
+
}
|
|
6426
|
+
}
|
|
6427
|
+
};
|
|
6428
|
+
const handleDoubleTap = (tapX) => {
|
|
6429
|
+
if (!this.video || !wrapper)
|
|
6430
|
+
return;
|
|
6431
|
+
const wrapperRect = wrapper.getBoundingClientRect();
|
|
6432
|
+
const tapPosition = tapX - wrapperRect.left;
|
|
6433
|
+
const wrapperWidth = wrapperRect.width;
|
|
6434
|
+
const isLeftSide = tapPosition < wrapperWidth / 2;
|
|
6435
|
+
if (isLeftSide) {
|
|
6436
|
+
const newTime = Math.max(0, this.video.currentTime - SKIP_SECONDS);
|
|
6437
|
+
this.seek(newTime);
|
|
6438
|
+
this.showShortcutIndicator(`-${SKIP_SECONDS}s`);
|
|
6439
|
+
this.debugLog('Double tap left - skip backward');
|
|
6440
|
+
}
|
|
6441
|
+
else {
|
|
6442
|
+
const newTime = Math.min(this.video.duration, this.video.currentTime + SKIP_SECONDS);
|
|
6443
|
+
this.seek(newTime);
|
|
6444
|
+
this.showShortcutIndicator(`+${SKIP_SECONDS}s`);
|
|
6445
|
+
this.debugLog('Double tap right - skip forward');
|
|
6446
|
+
}
|
|
6447
|
+
};
|
|
6448
|
+
const handleLongPress = (tapX) => {
|
|
6449
|
+
if (!this.video || !wrapper)
|
|
6450
|
+
return;
|
|
6451
|
+
const wrapperRect = wrapper.getBoundingClientRect();
|
|
6452
|
+
const tapPosition = tapX - wrapperRect.left;
|
|
6453
|
+
const wrapperWidth = wrapperRect.width;
|
|
6454
|
+
const isLeftSide = tapPosition < wrapperWidth / 2;
|
|
6455
|
+
this.longPressPlaybackRate = this.video.playbackRate;
|
|
6456
|
+
if (isLeftSide) {
|
|
6457
|
+
this.showShortcutIndicator(`⏪ 2x`);
|
|
6458
|
+
this.debugLog('Long press left - fast backward');
|
|
6459
|
+
this.startFastBackward();
|
|
6460
|
+
}
|
|
6461
|
+
else {
|
|
6462
|
+
this.video.playbackRate = FAST_PLAYBACK_RATE;
|
|
6463
|
+
this.showShortcutIndicator(`⏩ 2x`);
|
|
6464
|
+
this.debugLog('Long press right - fast forward');
|
|
6465
|
+
}
|
|
6466
|
+
};
|
|
6467
|
+
const handleLongPressEnd = () => {
|
|
6468
|
+
if (!this.video)
|
|
6469
|
+
return;
|
|
6470
|
+
this.stopFastBackward();
|
|
6471
|
+
this.video.playbackRate = this.longPressPlaybackRate || 1;
|
|
6472
|
+
this.debugLog('Long press ended - restored playback rate');
|
|
6473
|
+
};
|
|
6474
|
+
this.handleSingleTap = handleSingleTap.bind(this);
|
|
6475
|
+
this.handleDoubleTap = handleDoubleTap.bind(this);
|
|
6476
|
+
this.handleLongPress = handleLongPress.bind(this);
|
|
6477
|
+
this.handleLongPressEnd = handleLongPressEnd.bind(this);
|
|
6478
|
+
videoElement.addEventListener('touchstart', handleTouchStart, { passive: true });
|
|
6479
|
+
videoElement.addEventListener('touchmove', handleTouchMove, { passive: true });
|
|
6480
|
+
videoElement.addEventListener('touchend', handleTouchEnd, { passive: true });
|
|
6481
|
+
this.debugLog('Advanced tap handling initialized');
|
|
6482
|
+
}
|
|
6483
|
+
startFastBackward() {
|
|
6484
|
+
if (!this.video || this.fastBackwardInterval)
|
|
6485
|
+
return;
|
|
6486
|
+
this.fastBackwardInterval = setInterval(() => {
|
|
6487
|
+
if (this.video) {
|
|
6488
|
+
const newTime = Math.max(0, this.video.currentTime - 0.1);
|
|
6489
|
+
this.video.currentTime = newTime;
|
|
6490
|
+
}
|
|
6491
|
+
}, 50);
|
|
6492
|
+
}
|
|
6493
|
+
stopFastBackward() {
|
|
6494
|
+
if (this.fastBackwardInterval) {
|
|
6495
|
+
clearInterval(this.fastBackwardInterval);
|
|
6496
|
+
this.fastBackwardInterval = null;
|
|
6497
|
+
}
|
|
6498
|
+
}
|
|
6289
6499
|
isFullscreen() {
|
|
6290
6500
|
return !!(document.fullscreenElement ||
|
|
6291
6501
|
document.webkitFullscreenElement ||
|