diff --git a/materialious/android/app/build.gradle b/materialious/android/app/build.gradle index 148758fd..54d6a7a1 100644 --- a/materialious/android/app/build.gradle +++ b/materialious/android/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "us.materialio.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 179 - versionName "1.12.7" + versionCode 180 + versionName "1.12.8" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/materialious/electron/materialious.metainfo.xml b/materialious/electron/materialious.metainfo.xml index a58770e5..47507260 100644 --- a/materialious/electron/materialious.metainfo.xml +++ b/materialious/electron/materialious.metainfo.xml @@ -76,7 +76,11 @@ - + + + https://github.com/Materialious/Materialious/releases/tag/1.12.8 + + https://github.com/Materialious/Materialious/releases/tag/1.12.7 diff --git a/materialious/electron/package-lock.json b/materialious/electron/package-lock.json index 74fb94ff..5226577c 100644 --- a/materialious/electron/package-lock.json +++ b/materialious/electron/package-lock.json @@ -1,12 +1,12 @@ { "name": "Materialious", - "version": "1.12.7", + "version": "1.12.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "Materialious", - "version": "1.12.7", + "version": "1.12.8", "license": "MIT", "dependencies": { "@capacitor-community/electron": "^5.0.0", diff --git a/materialious/electron/package.json b/materialious/electron/package.json index bd9f030f..91a7e468 100644 --- a/materialious/electron/package.json +++ b/materialious/electron/package.json @@ -1,6 +1,6 @@ { "name": "Materialious", - "version": "1.12.7", + "version": "1.12.8", "description": "Modern material design for Invidious.", "author": { "name": "Ward Pearce", diff --git a/materialious/package.json b/materialious/package.json index b5db1c46..12b4765b 100644 --- a/materialious/package.json +++ b/materialious/package.json @@ -1,6 +1,6 @@ { "name": "materialious", - "version": "1.12.7", + "version": "1.12.8", "private": true, "scripts": { "dev": "vite dev", diff --git a/materialious/src/lib/components/Player.svelte b/materialious/src/lib/components/Player.svelte index b03a256b..7e130eee 100644 --- a/materialious/src/lib/components/Player.svelte +++ b/materialious/src/lib/components/Player.svelte @@ -886,10 +886,43 @@ playerTimelineTooltipVisible = true; } - function handleMouseLeave(): void { + function handleMouseLeave() { playerTimelineTooltipVisible = false; } + function onVideoClick( + event: MouseEvent & { + currentTarget: EventTarget & HTMLDivElement; + } + ) { + if ( + event.target && + event.target instanceof HTMLElement && + event.target.id === 'player-center' && + playerElement + ) { + const container = event.currentTarget; + + const rect = container.getBoundingClientRect(); + const clickX = event.clientX - rect.left; + const width = rect.width; + + if (clickX < width / 3) { + // Left third, back 10s + playerElement.currentTime = Math.max(0, playerElement.currentTime - 10); + } else if (clickX < (2 * width) / 3) { + // Middle third, toggle play/pause + toggleVideoPlaybackStatus(); + } else { + // Right third, forward 10s + playerElement.currentTime = Math.min( + playerElement.duration, + playerElement.currentTime + 10 + ); + } + } + } + onDestroy(async () => { if (Capacitor.getPlatform() === 'android') { if (!$isAndroidTvStore) { @@ -932,15 +965,7 @@ class:tv-contain-video={$isAndroidTvStore} class:hide={showVideoRetry} role="presentation" - onclick={(event) => { - if ( - event.target && - event.target instanceof HTMLElement && - event.target.id === 'player-center' - ) { - toggleVideoPlaybackStatus(); - } - }} + onclick={onVideoClick} >