@@ -7,8 +7,8 @@ android {
|
||||
applicationId "us.materialio.app"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 64
|
||||
versionName "1.6.13"
|
||||
versionCode 65
|
||||
versionName "1.6.14"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Materialious",
|
||||
"version": "1.6.13",
|
||||
"version": "1.6.14",
|
||||
"description": "Modern material design for Invidious.",
|
||||
"author": {
|
||||
"name": "Ward Pearce",
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "materialious",
|
||||
"version": "1.6.10",
|
||||
"version": "1.6.14",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "materialious",
|
||||
"version": "1.6.10",
|
||||
"version": "1.6.14",
|
||||
"dependencies": {
|
||||
"@capacitor-community/electron": "^5.0.1",
|
||||
"@capacitor/android": "6.1.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "materialious",
|
||||
"version": "1.6.13",
|
||||
"version": "1.6.14",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
@@ -76,4 +76,4 @@
|
||||
"vidstack": "^1.12.9",
|
||||
"youtubei.js": "^10.5.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,7 +381,11 @@
|
||||
|
||||
const audioPlayerTime = await AudioPlayer.getCurrentTime(audioId);
|
||||
|
||||
player.currentTime = Math.round(audioPlayerTime.currentTime);
|
||||
const audioPlayerTimeRounded = Math.round(audioPlayerTime.currentTime);
|
||||
if (audioPlayerTimeRounded > player.currentTime) {
|
||||
player.currentTime = audioPlayerTimeRounded;
|
||||
}
|
||||
|
||||
await player.play();
|
||||
});
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"cancel": "Cancel",
|
||||
"create": "Create",
|
||||
"title": "Title",
|
||||
"searchPlaceholder": "Search (ctrl + k)",
|
||||
"searchPlaceholder": "Search",
|
||||
"delete": "Delete",
|
||||
"donate": "Donate",
|
||||
"deleteAllHistory": "Delete all history",
|
||||
@@ -65,6 +65,8 @@
|
||||
"player": {
|
||||
"audioOnly": "Audio only",
|
||||
"theatreMode": "Theatre mode",
|
||||
"pauseTimer": "Pause timer",
|
||||
"pauseVideoIn": "Pause video in ",
|
||||
"share": {
|
||||
"title": "Share",
|
||||
"materialiousLink": "Copy Materialious link",
|
||||
|
||||
@@ -160,6 +160,25 @@ function convertToSeconds(time: string): number {
|
||||
return seconds;
|
||||
}
|
||||
|
||||
export function humanizeSeconds(totalSeconds: number): string {
|
||||
const secondsInMinute = 60;
|
||||
const secondsInHour = 3600;
|
||||
|
||||
const hours = Math.floor(totalSeconds / secondsInHour);
|
||||
const minutes = Math.floor((totalSeconds % secondsInHour) / secondsInMinute);
|
||||
|
||||
const parts: string[] = [];
|
||||
|
||||
if (hours > 0) {
|
||||
parts.push(`${hours} hour${hours > 1 ? 's' : ''}`);
|
||||
}
|
||||
if (minutes > 0) {
|
||||
parts.push(`${minutes} minute${minutes > 1 ? 's' : ''}`);
|
||||
}
|
||||
|
||||
return parts.join(', ');
|
||||
}
|
||||
|
||||
export function proxyVideoUrl(source: string): string {
|
||||
const rawSrc = new URL(source);
|
||||
rawSrc.host = get(instanceStore).replace('http://', '').replace(
|
||||
|
||||
@@ -85,8 +85,6 @@ export async function patchYoutubeJs(videoId: string): Promise<VideoPlay> {
|
||||
|
||||
const video = await youtube.getInfo(videoId);
|
||||
|
||||
console.log(video);
|
||||
|
||||
if (!video.primary_info || !video.secondary_info) {
|
||||
throw new Error('Unable to pull video info from youtube.js');
|
||||
}
|
||||
|
||||
@@ -11,13 +11,10 @@
|
||||
} from '$lib/Api/index.js';
|
||||
import type { Comments, PlaylistPage, PlaylistPageVideo } from '$lib/Api/model.js';
|
||||
import Comment from '$lib/Comment.svelte';
|
||||
import Player from '$lib/Player.svelte';
|
||||
import ShareVideo from '$lib/ShareVideo.svelte';
|
||||
import Thumbnail from '$lib/Thumbnail.svelte';
|
||||
import Transcript from '$lib/Transcript.svelte';
|
||||
import {
|
||||
cleanNumber,
|
||||
getBestThumbnail,
|
||||
humanizeSeconds,
|
||||
letterCase,
|
||||
numberWithCommas,
|
||||
proxyGoogleImage,
|
||||
@@ -25,6 +22,8 @@
|
||||
unsafeRandomItem
|
||||
} from '$lib/misc';
|
||||
import type { PlayerEvents } from '$lib/player';
|
||||
import Player from '$lib/Player.svelte';
|
||||
import ShareVideo from '$lib/ShareVideo.svelte';
|
||||
import {
|
||||
activePageStore,
|
||||
authStore,
|
||||
@@ -40,7 +39,10 @@
|
||||
syncPartyConnectionsStore,
|
||||
syncPartyPeerStore
|
||||
} from '$lib/store';
|
||||
import Thumbnail from '$lib/Thumbnail.svelte';
|
||||
import Transcript from '$lib/Transcript.svelte';
|
||||
import { mergeMediaFromDASH } from '$lib/videoDownload';
|
||||
import ui from 'beercss';
|
||||
import type { DataConnection } from 'peerjs';
|
||||
import { type Segment } from 'sponsorblock-api';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
@@ -78,6 +80,8 @@
|
||||
|
||||
let segments: Segment[] = [];
|
||||
|
||||
let pauseTimerSeconds: number = -1;
|
||||
|
||||
let showTranscript = false;
|
||||
|
||||
playlistSettingsStore.subscribe((playlistSetting) => {
|
||||
@@ -296,6 +300,10 @@
|
||||
// Reset title when page left.
|
||||
document.title = 'Materialious';
|
||||
|
||||
if (pauseTimeout) {
|
||||
clearTimeout(pauseTimeout);
|
||||
}
|
||||
|
||||
if (
|
||||
get(playerMiniPlayerStore) &&
|
||||
!player.paused &&
|
||||
@@ -393,10 +401,24 @@
|
||||
subscribed = !subscribed;
|
||||
}
|
||||
|
||||
async function toggleTheatreMode() {
|
||||
function toggleTheatreMode() {
|
||||
theatreMode = !theatreMode;
|
||||
}
|
||||
|
||||
let pauseTimeout: NodeJS.Timeout;
|
||||
function setPauseTimer() {
|
||||
if (pauseTimeout) {
|
||||
clearTimeout(pauseTimeout);
|
||||
}
|
||||
pauseTimeout = setTimeout(() => {
|
||||
player.pause();
|
||||
pauseTimerSeconds = 0;
|
||||
clearTimeout(pauseTimeout);
|
||||
}, pauseTimerSeconds * 1000);
|
||||
|
||||
ui('#pause-timer');
|
||||
}
|
||||
|
||||
let downloadStage: string | undefined;
|
||||
let downloadProgress: number = 0;
|
||||
|
||||
@@ -553,6 +575,21 @@
|
||||
<i>width_wide</i>
|
||||
<div class="tooltip">{$_('player.theatreMode')}</div>
|
||||
</button>
|
||||
{#if data.video.lengthSeconds > 60 && !data.video.hlsUrl}
|
||||
<button
|
||||
on:click={() => {
|
||||
if (pauseTimeout) {
|
||||
clearTimeout(pauseTimeout);
|
||||
}
|
||||
pauseTimerSeconds = 0;
|
||||
ui('#pause-timer');
|
||||
}}
|
||||
class:border={pauseTimerSeconds < 1}
|
||||
>
|
||||
<i>schedule</i>
|
||||
<div class="tooltip">{$_('player.pauseTimer')}</div>
|
||||
</button>
|
||||
{/if}
|
||||
<button
|
||||
on:click={() => ((showTranscript = !showTranscript), (theatreMode = false))}
|
||||
class:border={!showTranscript}
|
||||
@@ -795,6 +832,38 @@
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<dialog class="modal" id="pause-timer">
|
||||
{#if player}
|
||||
<div class="field middle-align">
|
||||
<label class="slider">
|
||||
<input
|
||||
type="range"
|
||||
bind:value={pauseTimerSeconds}
|
||||
min="0"
|
||||
step="60"
|
||||
max={data.video.lengthSeconds - player.currentTime - 60}
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
{#if pauseTimerSeconds > 0}
|
||||
<span class="helper">{$_('player.pauseVideoIn')} {humanizeSeconds(pauseTimerSeconds)}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<nav class="right-align no-space">
|
||||
<button
|
||||
class="transparent link"
|
||||
on:click={() => {
|
||||
ui('#pause-timer');
|
||||
pauseTimerSeconds = 0;
|
||||
}}>Cancel</button
|
||||
>
|
||||
<button disabled={pauseTimerSeconds < 1} class="transparent link" on:click={setPauseTimer}
|
||||
>Confirm</button
|
||||
>
|
||||
</nav>
|
||||
</dialog>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--plyr-color-main: var(--primary);
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import json
|
||||
import os
|
||||
import re
|
||||
|
||||
LATEST_VERSION = "1.6.13"
|
||||
LATEST_VERSION = "1.6.14"
|
||||
WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious")
|
||||
|
||||
ROOT_PACKAGE = os.path.join(WORKING_DIR, "package.json")
|
||||
|
||||
Reference in New Issue
Block a user