feat: enhance API and middleware functionality: add public API routes, implement program and course member checks, and improve rate limiting for invite acceptance. Update OpenAPI spec generation to focus on public API endpoints and add new middleware for automation key scopes. Include new documentation for lesson AI features and public API tests.

This commit is contained in:
Rotimi Best
2026-04-12 08:58:41 +01:00
parent 5a8f50f67b
commit d6e812d08b
573 changed files with 31964 additions and 8708 deletions
@@ -12,12 +12,32 @@
let { source, options = {}, class: className = '' }: Props = $props();
const isMuse = $derived.by(() => source.type === 'muse' && source.metadata?.svid);
const isGoogleDrive = $derived(source.type === 'google_drive');
const poster = $derived(source.type === 'upload' ? source.metadata?.thumbnailUrl : undefined);
const iframeTitle = $derived(source.metadata?.title?.trim() || 'Video');
const iframeMaxHeight = $derived(options.maxHeight ?? '400px');
const iframeWidth = $derived(options.width ?? '100%');
</script>
<div class={className}>
{#if isMuse}
<MusePlayer svid={source.metadata?.svid} {options} />
{:else if isGoogleDrive}
<div
class="ui:relative ui:overflow-hidden ui:rounded-md ui:border ui:border-border"
style:max-height={iframeMaxHeight}
style:width={iframeWidth}
>
<iframe
src={source.url}
title={iframeTitle}
class="ui:block ui:h-full ui:min-h-[240px] ui:w-full ui:border-0"
style:aspect-ratio="16 / 9"
allow="autoplay; fullscreen; encrypted-media; picture-in-picture"
allowfullscreen
></iframe>
</div>
{:else}
<PlyrPlayer src={source.url} {poster} {options} />
{/if}
+2 -1
View File
@@ -1,4 +1,4 @@
export type VideoType = 'youtube' | 'generic' | 'upload' | 'muse';
export type VideoType = 'youtube' | 'generic' | 'upload' | 'muse' | 'google_drive';
export interface VideoSource {
type: VideoType;
@@ -6,6 +6,7 @@ export interface VideoSource {
metadata?: {
svid?: string;
thumbnailUrl?: string;
title?: string;
};
}