cms/app-client/app/templates/components/player-component.hbs
author ymh <ymh.work@gmail.com>
Tue, 11 Oct 2016 02:49:59 +0200
changeset 326 226d5b17a119
parent 302 973df1349591
child 327 13564bb13ccc
permissions -rw-r--r--
- First implementation of filter for languages. - Language is now an array in the document - various corrections linked to the above change - Simplify the IndexDocumet loop
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
254
a7cf2887e993 Hide/Show video CSS
Chloe Laisne <chloe.laisne@gmail.com>
parents: 253
diff changeset
     1
<div id="audio" class="{{if (if-or player.transcript player.model.video) ' extra'}}{{if (if-and player.transcript player.model.video) ' multiple'}}">
210
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}}
241
da3c6ba8a80b Set time from progress bar - Toggle play plause to actions
Chloe Laisne <chloe.laisne@gmail.com>
parents: 229
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}}
241
da3c6ba8a80b Set time from progress bar - Toggle play plause to actions
Chloe Laisne <chloe.laisne@gmail.com>
parents: 229
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>
241
da3c6ba8a80b Set time from progress bar - Toggle play plause to actions
Chloe Laisne <chloe.laisne@gmail.com>
parents: 229
diff changeset
    13
		<span class="bar" onclick={{action 'setTime'}}><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>
251
ac320de33ec7 Add transcript button to player-component
Chloe Laisne <chloe.laisne@gmail.com>
parents: 242
diff changeset
    16
	<div class="controls extra">
254
a7cf2887e993 Hide/Show video CSS
Chloe Laisne <chloe.laisne@gmail.com>
parents: 253
diff changeset
    17
	{{#if player.model.video}}
a7cf2887e993 Hide/Show video CSS
Chloe Laisne <chloe.laisne@gmail.com>
parents: 253
diff changeset
    18
		{{#if player.videoscreen}}
a7cf2887e993 Hide/Show video CSS
Chloe Laisne <chloe.laisne@gmail.com>
parents: 253
diff changeset
    19
		<i title="Compress" class="fa fa-compress" {{action 'display' 'video'}}>Hide video</i>
a7cf2887e993 Hide/Show video CSS
Chloe Laisne <chloe.laisne@gmail.com>
parents: 253
diff changeset
    20
		{{else}}
a7cf2887e993 Hide/Show video CSS
Chloe Laisne <chloe.laisne@gmail.com>
parents: 253
diff changeset
    21
		<i title="Expand" class="fa fa-expand" {{action 'display' 'video'}}>Show video</i>
a7cf2887e993 Hide/Show video CSS
Chloe Laisne <chloe.laisne@gmail.com>
parents: 253
diff changeset
    22
		{{/if}}
a7cf2887e993 Hide/Show video CSS
Chloe Laisne <chloe.laisne@gmail.com>
parents: 253
diff changeset
    23
	{{/if}}
253
0be9770b09b4 Hide/show transcript button in the player - Do not request transscript when property is null in the document request
Chloe Laisne <chloe.laisne@gmail.com>
parents: 251
diff changeset
    24
	{{#if player.transcript}}
0be9770b09b4 Hide/show transcript button in the player - Do not request transscript when property is null in the document request
Chloe Laisne <chloe.laisne@gmail.com>
parents: 251
diff changeset
    25
		<i title="Transcript" class="fa fa-bars{{if (eq player.window 'transcript') ' active'}}" {{action 'display' 'transcript'}}>Transcript</i>
0be9770b09b4 Hide/show transcript button in the player - Do not request transscript when property is null in the document request
Chloe Laisne <chloe.laisne@gmail.com>
parents: 251
diff changeset
    26
	{{/if}}
251
ac320de33ec7 Add transcript button to player-component
Chloe Laisne <chloe.laisne@gmail.com>
parents: 242
diff changeset
    27
	</div>
210
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    28
	<div class="meta">
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    29
		<p>
302
973df1349591 Animate player text-overflow
Chloe Laisne <chloe.laisne@gmail.com>
parents: 254
diff changeset
    30
			<span title="{{ item.title }}" class="title"><span>{{ item.title }}</span></span>
326
226d5b17a119 - First implementation of filter for languages.
ymh <ymh.work@gmail.com>
parents: 302
diff changeset
    31
      {{#each model.language as |lang index|}}{{if index ", "}}{{doc-language url=lang class="language"}}{{/each}}
210
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    32
		</p>
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    33
		<p>
302
973df1349591 Animate player text-overflow
Chloe Laisne <chloe.laisne@gmail.com>
parents: 254
diff changeset
    34
			<span title="{{item.publishers_disp}}" class="author"><span>{{item.publishers_disp}}</span></span>
210
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    35
			<span class="date">{{short-date item.issued}}</span>
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    36
		</p>
08ad36c693b1 Player design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    37
	</div>
86
15ded106ef1a add a player component to handle sound play/pause
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    38
</div>
15ded106ef1a add a player component to handle sound play/pause
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    39
242
523ca6e73353 Add video player
Chloe Laisne <chloe.laisne@gmail.com>
parents: 241
diff changeset
    40
<div id="video">
523ca6e73353 Add video player
Chloe Laisne <chloe.laisne@gmail.com>
parents: 241
diff changeset
    41
	<video id="popcorn-audio">
523ca6e73353 Add video player
Chloe Laisne <chloe.laisne@gmail.com>
parents: 241
diff changeset
    42
		{{#each player.model.media as |medium|}}
523ca6e73353 Add video player
Chloe Laisne <chloe.laisne@gmail.com>
parents: 241
diff changeset
    43
		<source src="{{ medium.url }}" type="{{ medium.format }}">
523ca6e73353 Add video player
Chloe Laisne <chloe.laisne@gmail.com>
parents: 241
diff changeset
    44
		{{/each}}
523ca6e73353 Add video player
Chloe Laisne <chloe.laisne@gmail.com>
parents: 241
diff changeset
    45
	Your browser does not support the audio element.
523ca6e73353 Add video player
Chloe Laisne <chloe.laisne@gmail.com>
parents: 241
diff changeset
    46
	</video>
523ca6e73353 Add video player
Chloe Laisne <chloe.laisne@gmail.com>
parents: 241
diff changeset
    47
</div>