Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- Camera Usage Description
- homebrew
- mac os
- OpenCV-4.1.0
- pkg-config
- OpenCV로 배우는 영상처리 및 응용
- OpenCV
- Info.plist
- stackoverflow
- NSCameraUsageDescription
- WebAssembly in Action
- 예제 실행 시 에러 관련_
- VAE
- VisualCapture
- xcode
- 영상처리
- AutoEncoder
- 웹어셈블리 인 액션
Archives
- Today
- Total
DEV.log
sharing-code 본문
<!-- App.svelte -->
<script>
import AudioPlayer from './AudioPlayer.svelte';
</script>
<!-- https://musopen.org/music/9862-the-blue-danube-op-314/ -->
<AudioPlayer
src="https://sveltejs.github.io/assets/music/strauss.mp3"
title="The Blue Danube Waltz"
composer="Johann Strauss"
performer="European Archive"
/>
<!-- https://musopen.org/music/43775-the-planets-op-32/ -->
<AudioPlayer
src="https://sveltejs.github.io/assets/music/holst.mp3"
title="Mars, the Bringer of War"
composer="Gustav Holst"
performer="USAF Heritage of America Band"
/>
<!-- https://musopen.org/music/8010-3-gymnopedies/ -->
<AudioPlayer
src="https://sveltejs.github.io/assets/music/satie.mp3"
title="Gymnopédie no. 1"
composer="Erik Satie"
performer="Prodigal Procrastinator"
/>
<!-- https://musopen.org/music/2567-symphony-no-5-in-c-minor-op-67/ -->
<AudioPlayer
src="https://sveltejs.github.io/assets/music/beethoven.mp3"
title="Symphony no. 5 in Cm, Op. 67 - I. Allegro con brio"
composer="Ludwig van Beethoven"
performer="European Archive"
/>
<!-- https://musopen.org/music/43683-requiem-in-d-minor-k-626/ -->
<AudioPlayer
src="https://sveltejs.github.io/assets/music/mozart.mp3"
title="Requiem in D minor, K. 626 - III. Sequence - Lacrymosa"
composer="Wolfgang Amadeus Mozart"
performer="Markus Staab"
/>
<!-- AudioPlayer.svelte -->
<script context="module">
let current;
</script>
<script>
export let src;
export let title;
export let composer;
export let performer;
let audio;
let paused = true;
function stopOthers() {
if (current && current !== audio) current.pause();
current = audio;
}
</script>
<article class:playing={!paused}>
<h2>{title}</h2>
<p><strong>{composer}</strong> / performed by {performer}</p>
<audio
bind:this={audio}
bind:paused
on:play={stopOthers}
controls
{src}
></audio>
</article>
<style>
article {
margin: 0 0 1em 0; max-width: 800px;
}
h2, p {
margin: 0 0 0.3em 0;
}
audio {
width: 100%; margin: 0.5em 0 1em 0;
}
.playing {
color: #ff3e00;
}
</style>
https://svelte.dev/tutorial/sharing-code
Module context / Sharing code • Svelte Tutorial
Module context / Sharing code a. Basicsb. Adding datac. Dynamic attributesd. Stylinge. Nested componentsf. HTML tagsg. Making an appa. Assignmentsb. Declarationsc. Statementsd. Updating arrays and objectsa. Declaring propsb. Default valuesc. Spread propsa.
svelte.dev
'Svelte > tutorial' 카테고리의 다른 글
context-api (0) | 2022.02.01 |
---|---|
slot-props (0) | 2022.02.01 |
optional-slots (0) | 2022.02.01 |
named-slots (0) | 2022.02.01 |
slots (0) | 2022.02.01 |
Comments