cms/app-client/app/templates/components/player-component.hbs
author ymh <ymh.work@gmail.com>
Wed, 06 Jul 2016 14:22:24 +0200
changeset 229 744379451219
parent 215 82878d132784
child 241 da3c6ba8a80b
permissions -rw-r--r--
add publisher and duration_ms to model
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
210
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
     1
<div id="audio">
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
     2
	<div class="controls">
212
f2c6080a73aa Player backward/forward design logic
Chloe Laisne <chloe.laisne@gmail.com>
parents: 211
diff changeset
     3
		<i title="Backward" class="fa fa-backward{{if isFirst ' disabled'}}" {{action 'backward'}}>Backward</i>
214
9bff007eb03c Reflect player-component actions on playlist-component
Chloe Laisne <chloe.laisne@gmail.com>
parents: 213
diff changeset
     4
		{{#if player.playing}}
215
82878d132784 Play/Pause/Reset events from player/playlist-components
Chloe Laisne <chloe.laisne@gmail.com>
parents: 214
diff changeset
     5
		<i title="Pause" class="fa fa-pause" {{action toggle}}>Pause</i>
211
7451203a1321 Setup progress bar
Chloe Laisne <chloe.laisne@gmail.com>
parents: 210
diff changeset
     6
		{{else}}
215
82878d132784 Play/Pause/Reset events from player/playlist-components
Chloe Laisne <chloe.laisne@gmail.com>
parents: 214
diff changeset
     7
		<i title="Play" class="fa fa-play" {{action toggle}}>Play</i>
211
7451203a1321 Setup progress bar
Chloe Laisne <chloe.laisne@gmail.com>
parents: 210
diff changeset
     8
		{{/if}}
212
f2c6080a73aa Player backward/forward design logic
Chloe Laisne <chloe.laisne@gmail.com>
parents: 211
diff changeset
     9
		<i title="Forward" class="fa fa-forward{{if isLast ' disabled'}}" {{action 'forward'}}>Forward</i>
210
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    10
	</div>
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    11
	<div class="progress">
211
7451203a1321 Setup progress bar
Chloe Laisne <chloe.laisne@gmail.com>
parents: 210
diff changeset
    12
		<span class="head">{{to-minutes head}}</span>
210
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    13
		<span class="bar"><span class="value"></span></span>
211
7451203a1321 Setup progress bar
Chloe Laisne <chloe.laisne@gmail.com>
parents: 210
diff changeset
    14
		<span class="remaining">- {{to-minutes remaining}}</span>
86
15ded106ef1a add a player component to handle sound play/pause
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    15
	</div>
210
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    16
	<div class="meta">
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    17
		<p>
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    18
			<span title="{{ item.title }}" class="title">{{ item.title }}</span>
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    19
			{{doc-language class="language" url=item.language}}
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    20
		</p>
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    21
		<p>
229
744379451219 add publisher and duration_ms to model
ymh <ymh.work@gmail.com>
parents: 215
diff changeset
    22
			<span title="{{item.publishers_disp}}" class="author">{{item.publishers_disp}}</span>
210
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    23
			<span class="date">{{short-date item.issued}}</span>
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    24
		</p>
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    25
	</div>
86
15ded106ef1a add a player component to handle sound play/pause
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    26
</div>
15ded106ef1a add a player component to handle sound play/pause
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    27
210
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    28
<audio id="popcorn-audio">
213
e914f250ca7f Fix item property to model
Chloe Laisne <chloe.laisne@gmail.com>
parents: 212
diff changeset
    29
	{{#each player.model.mediaList as |media|}}
210
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    30
	<source src="{{ media.url }}" type="{{ media.format }}">
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    31
	{{/each}}
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    32
Your browser does not support the audio element.
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    33
</audio>