2020-11-11 23:45:52 +01:00
|
|
|
<script>
|
2020-11-17 23:39:27 +01:00
|
|
|
import { fs_get_file_url } from "../FilesystemAPI.svelte";
|
2020-11-11 23:45:52 +01:00
|
|
|
import { createEventDispatcher } from 'svelte'
|
|
|
|
let dispatch = createEventDispatcher()
|
|
|
|
|
2020-11-17 23:39:27 +01:00
|
|
|
export let state;
|
2020-11-11 23:45:52 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="container">
|
2020-11-17 23:39:27 +01:00
|
|
|
{state.base.name}
|
2020-11-11 23:45:52 +01:00
|
|
|
<br/><br/>
|
|
|
|
<audio
|
|
|
|
class="player"
|
2020-11-17 23:39:27 +01:00
|
|
|
src={fs_get_file_url(state.bucket.id, state.base.path)}
|
2020-11-11 23:45:52 +01:00
|
|
|
autoplay="autoplay"
|
|
|
|
controls="controls"
|
2020-11-17 23:39:27 +01:00
|
|
|
on:ended={() => { dispatch("next") }}>
|
2020-11-11 23:45:52 +01:00
|
|
|
<track kind="captions"/>
|
|
|
|
</audio>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.container {
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
margin: 50px 0 0 0;
|
|
|
|
padding: 0;
|
|
|
|
overflow-y: auto;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
.player {
|
|
|
|
width: 90%;
|
|
|
|
}
|
|
|
|
</style>
|