Added tv banner

This commit is contained in:
ward
2025-06-19 15:38:16 +12:00
parent 926503a58a
commit ada35b3675
10 changed files with 45 additions and 32 deletions
+4
View File
@@ -19,6 +19,7 @@
- [Invidious companion support.](./docs/DOCKER.md#invidious-companion-support)
- [Invidious API extended integration.](https://github.com/Materialious/api-extended)
- [YouTube.js](https://github.com/LuanRT/YouTube.js) fallback if Invidious fails loading videos for Desktop & Android.
- Android TV support
- Support for disabling certificate validation for homelab users.
- Sync your watch progress between Invidious sessions.
- Watch sync parties.
@@ -203,6 +204,9 @@ Help [translate Materialious via Weblate](https://toolate.othing.xyz/projects/ma
## Mobile
<img src="./previews/mobile-preview.png" style="height: 500px"/>
## Android TV
![Preview of subscriptions page on Android TV](./previews/android-tv.png)
## Player
![Preview of player](./previews/player-preview.png)
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

@@ -3,6 +3,7 @@
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:banner="@drawable/banner"
android:label="@string/app_name"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

+12 -12
View File
@@ -1,18 +1,18 @@
import type { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
appId: 'us.materialio.app',
appName: 'Materialious',
webDir: 'build',
plugins: {
CapacitorNodeJS: {
nodeDir: 'nodejs-android',
}
},
server: {
hostname: 'www.youtube.com',
androidScheme: 'https'
}
appId: 'us.materialio.app',
appName: 'Materialious',
webDir: 'build',
plugins: {
CapacitorNodeJS: {
nodeDir: 'nodejs-android'
}
},
server: {
hostname: 'www.youtube.com',
androidScheme: 'https'
}
};
export default config;
@@ -1,9 +1,18 @@
import { registerPlugin } from '@capacitor/core';
import { WebPlugin } from '@capacitor/core';
interface AndroidTV {
isAndroidTv: () => Promise<boolean>;
}
const androidTv = registerPlugin<AndroidTV>('AndroidTv');
export class AndroidTvWeb extends WebPlugin implements AndroidTV {
async isAndroidTv(): Promise<boolean> {
return false;
}
}
const androidTv = registerPlugin<AndroidTV>('AndroidTv', {
web: new AndroidTvWeb()
});
export default androidTv;
@@ -1,28 +1,27 @@
import { registerPlugin } from "@capacitor/core";
import { registerPlugin } from '@capacitor/core';
export interface ColorTheme {
getColorPalette: () => Promise<{
primary: number;
onPrimary: number;
secondary: number;
accent: number;
}>;
getColorPalette: () => Promise<{
primary: number;
onPrimary: number;
secondary: number;
accent: number;
}>;
}
export function convertToHexColorCode(color: number): string {
// Convert the negative number to a positive unsigned integer
const unsignedColor = color < 0 ? color + 0x100000000 : color;
// Convert the negative number to a positive unsigned integer
const unsignedColor = color < 0 ? color + 0x100000000 : color;
// Extract the RGB components
const r = (unsignedColor >> 16) & 0xff;
const g = (unsignedColor >> 8) & 0xff;
const b = unsignedColor & 0xff;
// Extract the RGB components
const r = (unsignedColor >> 16) & 0xff;
const g = (unsignedColor >> 8) & 0xff;
const b = unsignedColor & 0xff;
// Convert to hex format and pad with zeros if necessary
return `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1).toUpperCase()}`;
// Convert to hex format and pad with zeros if necessary
return `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1).toUpperCase()}`;
}
const colorTheme = registerPlugin<ColorTheme>('ColorTheme');
export default colorTheme;
+1 -1
View File
@@ -17,7 +17,7 @@ main.root {
overflow-y: auto;
}
main.root-not-tv {
.root-not-tv {
padding-left: 7em !important;
}
+1 -1
View File
@@ -351,7 +351,7 @@
{/if}
</dialog>
<main class="responsive max root" tabindex="0" role="region" class:main.root-not-tv={!isAndroidTv}>
<main class="responsive max root" tabindex="0" role="region" class:root-not-tv={!isAndroidTv}>
{#if isAndroidTv}
<div class="tabs">
{#each getPages() as navPage}
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 MiB