-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
726b2b4
commit 639ab0a
Showing
5 changed files
with
110 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script lang="ts"> | ||
export let videoUri: string; | ||
let fileName: string; | ||
let input: HTMLInputElement; | ||
const loadSource = async function (file: any): Promise<void> { | ||
console.log(file); | ||
videoUri = window.URL.createObjectURL(file) as string; | ||
fileName = file.name; | ||
}; | ||
</script> | ||
|
||
<input bind:this={input} type="file" on:change={e => loadSource(e.target.files[0])}/> | ||
<button on:click={() => input.click()} class="uk-button uk-button-default"> | ||
{#if fileName} | ||
Click to select another video | ||
{:else} | ||
Click to select video file | ||
{/if} | ||
</button> | ||
{#if fileName} | ||
<span class="uk-margin-left">{fileName}</span> | ||
{/if} | ||
|
||
<style lang="scss"> | ||
input { | ||
display: none; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters