feat: add custom piped and invidious embeds
This commit is contained in:
1 parent
74701ffe3f
commit
3721630cc8
4 files changed
+38
-2
No files matched your search
@@ -5,10 +5,10 @@
|
||||
return 'www.youtube-nocookie.com'
|
||||
}
|
||||
case 'invidious': {
|
||||
return 'vid.puffyan.us'
|
||||
return get(userSettings).embeds.invidious || 'yewtu.be'
|
||||
}
|
||||
case 'piped': {
|
||||
return 'piped.video'
|
||||
return get(userSettings).embeds.piped || 'piped.video'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,7 @@
|
||||
} from 'svelte-hero-icons'
|
||||
import { optimizeImageURL, type IframeType, type MediaType } from '../helpers'
|
||||
import { userSettings } from '$lib/settings'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
export let type: IframeType = 'none'
|
||||
export let thumbnail: string | undefined = undefined
|
||||
|
||||
@@ -620,6 +620,11 @@
|
||||
},
|
||||
"youtube": {
|
||||
"description": "The website to embed YouTube content in."
|
||||
},
|
||||
"instance": {
|
||||
"invidious": "Invidious instance",
|
||||
"piped": "Piped instance",
|
||||
"description": "The instance to embed YouTube content in."
|
||||
}
|
||||
},
|
||||
"lemmy": {
|
||||
|
||||
@@ -70,6 +70,8 @@ interface Settings {
|
||||
embeds: {
|
||||
clickToView: boolean
|
||||
youtube: 'youtube' | 'invidious' | 'piped'
|
||||
invidious: string | undefined
|
||||
piped: string | undefined
|
||||
}
|
||||
dock: {
|
||||
noGap: boolean | null
|
||||
@@ -129,6 +131,8 @@ export const defaultSettings: Settings = {
|
||||
embeds: {
|
||||
clickToView: true,
|
||||
youtube: 'youtube',
|
||||
invidious: undefined,
|
||||
piped: undefined,
|
||||
},
|
||||
dock: {
|
||||
noGap: toBool(env.PUBLIC_DOCK_PANEL) ?? null,
|
||||
|
||||
Reference in new issue
Block a user