-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoffline-files.html
37 lines (34 loc) · 968 Bytes
/
offline-files.html
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
31
32
33
34
35
36
37
<head>
<title>offline-files</title>
</head>
<body>
<h1>Offline Files</h1>
{{> files}}
<hr>
{{> player}}
</body>
<template name="files">
<h4>{{#unless connected}}Not {{/unless}}Connected</h4>
{{#each files}}
{{name}} - {{type}} {{#if canLoad}}<button class="load">Load</button>{{/if}} {{#unless downloaded}}{{#if canLoad}}<button class="download">Download</button>{{/if}}{{else}}<button class="delete">Delete</button>{{/unless}}<br>
{{/each}}
</template>
<template name="player">
{{#if file}}
<h4>{{file.name}}</h4>
<small><a href="{{fileUrl}}">{{fileUrl}}</a></small>
{{#if $eq file.type "video"}}
<video id="video" width="320" height="240" controls webkit-playsinline src="{{fileUrl}}">
</video>
{{else}}
{{#if $eq file.type "audio"}}
<audio id="audio" controls="controls" src="{{fileUrl}}">
</audio>
{{else}}
<img src="{{fileUrl}}"/>
{{/if}}
{{/if}}
{{else}}
Select a file to load
{{/if}}
</template>