diff --git a/src/lib/element_manage_hosted_file_li.svelte b/src/lib/element_manage_hosted_file_li.svelte index 480586e4..3f7c38ed 100644 --- a/src/lib/element_manage_hosted_file_li.svelte +++ b/src/lib/element_manage_hosted_file_li.svelte @@ -27,6 +27,9 @@ interface Props { display_mode?: string; // 'default', 'compact', 'minimal', 'launcher' max_file_count?: number; file_type?: string; // 'image', 'video', 'audio', 'document', 'other' + slct_hosted_file_kv?: key_val; + slct_hosted_file_id?: any; + slct_hosted_file_obj?: any; } let { @@ -38,7 +41,10 @@ let { link_to_id, display_mode = 'default', max_file_count = 19, - file_type = 'all' + file_type = 'all', + slct_hosted_file_kv = $bindable({}), + slct_hosted_file_id = $bindable(null), + slct_hosted_file_obj = $bindable(null) }: Props = $props(); // export let show_convert_btn: null|boolean = null; @@ -146,9 +152,21 @@ ae_tmp.show__direct_download = $ae_loc.core?.show__direct_download ?? false; if ($ae_loc.files.uploaded_file_kv[hosted_file_obj.hosted_file_id]) { delete $ae_loc.files.uploaded_file_kv[hosted_file_obj.hosted_file_id]; $ae_loc.files.uploaded_file_kv = {...$ae_loc.files.uploaded_file_kv}; + + delete slct_hosted_file_kv[hosted_file_obj.hosted_file_id]; + slct_hosted_file_id = null; + slct_hosted_file_obj = null; } else { $ae_loc.files.uploaded_file_kv[hosted_file_obj.hosted_file_id] = hosted_file_obj; lq__hosted_file_obj_li[hosted_file_obj.hosted_file_id] = hosted_file_obj; + + slct_hosted_file_kv[hosted_file_obj.hosted_file_id] = hosted_file_obj; + slct_hosted_file_id = hosted_file_obj.hosted_file_id; + slct_hosted_file_obj = hosted_file_obj; + } + log_lvl = 1; + if (log_lvl) { + console.log(`slct_hosted_file_kv:`, slct_hosted_file_kv); } }} class="btn btn-sm variant-soft-secondary hover:variant-filled-secondary" diff --git a/src/lib/element_manage_hosted_file_li_all.svelte b/src/lib/element_manage_hosted_file_li_all.svelte index 99dbd429..1a98a7fe 100644 --- a/src/lib/element_manage_hosted_file_li_all.svelte +++ b/src/lib/element_manage_hosted_file_li_all.svelte @@ -25,6 +25,9 @@ interface Props { allow_basic?: boolean; // Not used yet allow_moderator?: boolean; // Not used yet display_mode?: string; // 'default', 'compact', 'minimal', 'launcher' + slct_hosted_file_kv?: key_val; + slct_hosted_file_id?: any; + slct_hosted_file_obj?: any; } let { @@ -34,7 +37,10 @@ let { link_to_id, allow_basic = false, allow_moderator = false, - display_mode = 'default' + display_mode = 'default', + slct_hosted_file_kv = $bindable({}), + slct_hosted_file_id = $bindable(null), + slct_hosted_file_obj = $bindable(null) }: Props = $props(); console.log(`HERE HERE HERE HERE: link_to_type: ${link_to_type} link_to_id: ${link_to_id}`); @@ -95,6 +101,9 @@ let lq__hosted_file_obj_li = $derived(liveQuery(async () => { class_li_default={class_li_default} class_li={class_li} display_mode={display_mode} + bind:slct_hosted_file_kv={slct_hosted_file_kv} + bind:slct_hosted_file_id={slct_hosted_file_id} + bind:slct_hosted_file_obj={slct_hosted_file_obj} /> diff --git a/src/routes/hosted_files/+page.svelte b/src/routes/hosted_files/+page.svelte index e37e5e6f..1a885a69 100644 --- a/src/routes/hosted_files/+page.svelte +++ b/src/routes/hosted_files/+page.svelte @@ -1,6 +1,4 @@ + + +
+ +
+

Clip and Scale Video Files

+

This AV utility will take an mp4 video file and create a clipped mp4 video file. By default, videos will be scaled down to 1920x1080. This process takes at least 30 seconds, but it can easily take a handful of minutes. The scaling option requires that the video be re-encoded. Please be patient while it is processing.

+ +

+ Step 1: Upload Video File or Select from Hosted Files + + +

+ +
+ + {#snippet label()} + +
+ + Upload video files +
+ + Aether hosted files only
+ Recommended: video (mp4, mkv)
+
+
+ {/snippet} +
+
+ +
+ +
+ +
+ +

+ Step 2: Clip Video + + +

+ {#if $ae_loc.files.uploaded_file_kv && Object.entries($ae_loc.files.uploaded_file_kv).length > 0} + + + {:else} +

Upload a video file to clip first.

+ {/if} + + +

+ Step 3: Download Recently Processed Video Clips + + +

+ {#if $ae_loc.files.video_clip_file_kv && Object.entries($ae_loc.files.video_clip_file_kv).length > 0} + + + {:else} +

Clip a video file first.

+ {/if} + + + + + + + + + + + + + + + + + + + + + + +
+ + +{#if 1===2} + + + +{/if} + + + + + + + + + +
+ + + diff --git a/src/routes/hosted_files/video_util/video_util.svelte b/src/routes/hosted_files/video_util/video_util.svelte new file mode 100644 index 00000000..a9e93092 --- /dev/null +++ b/src/routes/hosted_files/video_util/video_util.svelte @@ -0,0 +1,302 @@ + + + + +
+ +
+

Clip and Scale Video Files

+

This AV utility will take an mp4 video file and create a clipped mp4 video file. By default, videos will be scaled down to 1920x1080. This process takes at least 30 seconds, but it can easily take a handful of minutes. The scaling option requires that the video be re-encoded. Please be patient while it is processing.

+ +

+ Step 1: Upload Video File or Select from Hosted Files + + +

+ +
+ + {#snippet label()} + +
+ + Upload video files +
+ + Aether hosted files only
+ Recommended: video (mp4, mkv)
+
+
+ {/snippet} +
+
+ +
+ +
+ +
+ +

+ Step 2: Clip Video + + +

+ {#if $ae_loc.files.uploaded_file_kv && Object.entries($ae_loc.files.uploaded_file_kv).length > 0} + + + {:else} +

Upload a video file to clip first.

+ {/if} + + +

+ Step 3: Download Recently Processed Video Clips + + +

+ {#if $ae_loc.files.video_clip_file_kv && Object.entries($ae_loc.files.video_clip_file_kv).length > 0} + + + {:else} +

Clip a video file first.

+ {/if} + + + + + + + + + + + + + + + + + + + + + + +
+ + +{#if 1===2} + + + +{/if} + + + + + + + + + +
+ + + diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_id_edit.svelte b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_id_edit.svelte index c733b8f1..5769d2dc 100644 --- a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_id_edit.svelte +++ b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_id_edit.svelte @@ -1,5 +1,6 @@
-
+ {#await prom_api__archive_content_obj}
Saving...
@@ -402,6 +443,26 @@ async function handle_hosted_files_uploaded(hosted_file_id_li: string[], hosted_ No file uploaded yet. {#if $ae_loc.trusted_access} + + +
- -
- - Upload archive files -
- - Aether hosted files only
- Recommended: PowerPoint (pptx) or Keynote (key) or Adobe PDF
- Media: audio (mp3, m4a) and video (mp4, mkv)
- Supplemental files: Word Doc, Excel, txt, etc + {#snippet label()} + +
+ + Upload archive files +
+ + Aether hosted files only
+ Recommended: PowerPoint (pptx) or Keynote (key) or Adobe PDF
+ Media: audio (mp3, m4a) and video (mp4, mkv)
+ Supplemental files: Word Doc, Excel, txt, etc +
-
+ {/snippet}
+
+ +
+ +
{/if} {:else} @@ -431,7 +511,7 @@ async function handle_hosted_files_uploaded(hosted_file_id_li: string[], hosted_