Igor Zhukov
10 years ago
16 changed files with 270 additions and 356 deletions
@ -1,15 +1,30 @@
@@ -1,15 +1,30 @@
|
||||
<div class="audio_player_wrap" ng-class=""> |
||||
<div class="audio_player_button" ng-click="togglePlay()"> |
||||
<i class="icon audio_player_btn_icon"></i> |
||||
</div> |
||||
<div class="audio_player_title_wrap"> |
||||
<div class="audio_player_title" my-i18n="message_attach_audio_message"></div> |
||||
<div class="audio_player_meta"> |
||||
<span class="audio_player_duration"></span> |
||||
<div class="audio_player_wrap clearfix"> |
||||
<button class="btn btn-primary pull-left audio_player_button" ng-click="togglePlay()"> |
||||
<i class="icon audio_player_btn_icon" ng-class="{audio_player_btn_icon_pause: mediaPlayer.player.playing, audio_player_btn_icon_cancel: audio.progress.enabled}"></i> |
||||
</button> |
||||
<div class="audio_player_title_wrap clearfix"> |
||||
<div class="audio_player_title" ng-switch="::audio.file_name.length > 0"> |
||||
<span ng-switch-when="true" ng-bind="::audio.file_name"></span> |
||||
<span ng-switch-default my-i18n="message_attach_audio_message"></span> |
||||
</div> |
||||
<div class="audio_player_meta" ng-switch="audio.progress.enabled || !mediaPlayer.player.duration && !audio.duration"> |
||||
<span ng-switch-when="true" class="audio_player_size" ng-bind="audio.progress | formatSizeProgress"></span> |
||||
<span ng-switch-default class="audio_player_duration" ng-bind="(mediaPlayer.player.playing || mediaPlayer.player.currentTime > 0) ? mediaPlayer.player.currentTime : (mediaPlayer.player.duration || audio.duration) | duration"></span> |
||||
</div> |
||||
</div> |
||||
<div class="audio_player_progress_wrap"> |
||||
<div class="audio_player_progress" ng-style="{width: audio.progress.percent + '%'}"></div> |
||||
<!-- <i class="icon icon-player-track"></i> --> |
||||
<div class="audio_player_actions" ng-if="!audio.progress.enabled && !audio.url"> |
||||
<a ng-click="togglePlay()" my-i18n="message_attach_audio_play"></a> |
||||
<a ng-if="audio._ == 'document'" ng-click="download()" my-i18n="message_attach_document_download"></a> |
||||
</div> |
||||
<div class="audio_player_progress_wrap" ng-if="audio.progress.enabled || audio.url" ng-switch="audio.progress.enabled"> |
||||
<div ng-switch-when="true" class="progress tg_down_progress"> |
||||
<div class="progress-bar progress-bar-success" ng-style="{width: audio.progress.percent + '%'}"></div> |
||||
</div> |
||||
<div ng-switch-default class="progress tg_play_progress"> |
||||
<div class="progress-bar progress-bar-success" ng-style="{width: mediaPlayer.player.currentTime / (mediaPlayer.player.duration || audio.duration) * 100 + '%'}"></div> |
||||
</div> |
||||
</div> |
||||
<audio ng-if="audio.url" media-player="mediaPlayer.player" autoplay="autoplay"> |
||||
<source ng-src="{{::audio.url}}" type="audio/ogg" /> |
||||
</audio> |
||||
</div> |
@ -1,31 +1,3 @@
@@ -1,31 +1,3 @@
|
||||
<div class="im_message_document im_message_audio" ng-class="{im_message_audio_done: historyMessage.media.audio.url, im_message_audio_progress: historyMessage.media.audio.progress.enabled}"> |
||||
<a href="" ng-click="openAudio(historyMessage.media.audio.id)" ng-if="!historyMessage.media.audio.progress.enabled && !historyMessage.media.audio.url"> |
||||
<i class="icon icon-audio"></i> |
||||
</a> |
||||
<i class="icon icon-audio" ng-if="historyMessage.media.audio.progress.enabled || historyMessage.media.audio.url"></i> |
||||
|
||||
<div class="im_message_audio_info"> |
||||
<div class="im_message_audio_name_wrap" ng-if="!historyMessage.media.audio.url"> |
||||
<span class="im_message_audio_name" my-i18n="message_attach_audio_message"></span> |
||||
<span class="im_message_audio_duration" ng-if="!historyMessage.media.audio.progress.enabled" ng-bind="::historyMessage.media.audio.duration | duration"></span> |
||||
<span class="im_message_audio_size" ng-if="historyMessage.media.audio.progress.enabled" ng-bind="historyMessage.media.audio.progress | formatSizeProgress"></span> |
||||
</div> |
||||
<div class="im_message_audio_actions" ng-if="!historyMessage.media.audio.progress.enabled && !historyMessage.media.audio.url"> |
||||
<a href="" ng-click="openAudio(historyMessage.media.audio.id)" my-i18n="message_attach_audio_play"></a> |
||||
</div> |
||||
<div class="clearfix cancelable_progress_wrap" ng-if="historyMessage.media.audio.progress.enabled"> |
||||
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.audio.progress.cancel()" my-i18n="modal_cancel"></a> |
||||
<div class="im_message_download_progress_wrap"> |
||||
<div class="progress tg_down_progress"> |
||||
<div class="progress-bar progress-bar-success" ng-style="{width: historyMessage.media.audio.progress.percent + '%'}"></div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="im_message_audio_player_wrap" ng-if="historyMessage.media.audio.url"> |
||||
<audio my-audio-autoplay audio="historyMessage.media.audio" controls="controls"> |
||||
<source ng-src="{{::historyMessage.media.audio.url}}" type="audio/ogg" /> |
||||
<embed ng-src="{{::historyMessage.media.audio.url}}" hidden="true" autostart="true" loop="false" /> |
||||
</audio> |
||||
</div> |
||||
</div> |
||||
<div class="im_message_audio"> |
||||
<div my-audio-player audio="historyMessage.media.audio"></div> |
||||
</div> |
||||
|
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
../desktop/audio_player.html |
@ -1,30 +1,3 @@
@@ -1,30 +1,3 @@
|
||||
<div class="im_message_document im_message_audio" ng-class="{im_message_audio_done: historyMessage.media.audio.url, im_message_audio_progress: historyMessage.media.audio.progress.enabled}"> |
||||
<a href="" ng-click="openAudio(historyMessage.media.audio.id)" ng-if="!historyMessage.media.audio.progress.enabled && !historyMessage.media.audio.url"> |
||||
<i class="icon icon-audio"></i> |
||||
</a> |
||||
<i class="icon icon-audio" ng-if="historyMessage.media.audio.progress.enabled || historyMessage.media.audio.url"></i> |
||||
|
||||
<div class="im_message_audio_info"> |
||||
<div class="im_message_audio_name_wrap" ng-if="!historyMessage.media.audio.url"> |
||||
<span class="im_message_audio_name"> |
||||
Voice message |
||||
</span> |
||||
<span class="im_message_audio_duration" ng-if="!historyMessage.media.audio.progress.enabled" ng-bind="::historyMessage.media.audio.duration | duration"></span> |
||||
<span class="im_message_audio_size" ng-if="historyMessage.media.audio.progress.enabled" ng-bind="historyMessage.media.audio.progress | formatSizeProgress"></span> |
||||
</div> |
||||
<div class="clearfix cancelable_progress_wrap" ng-if="historyMessage.media.audio.progress.enabled"> |
||||
<a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.audio.progress.cancel()">Cancel</a> |
||||
<div class="im_message_download_progress_wrap"> |
||||
<div class="progress tg_down_progress"> |
||||
<div class="progress-bar progress-bar-success" ng-style="{width: historyMessage.media.audio.progress.percent + '%'}"></div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="im_message_audio_player_wrap" ng-if="historyMessage.media.audio.url"> |
||||
<audio my-audio-autoplay audio="historyMessage.media.audio" controls="controls"> |
||||
<source ng-src="{{::historyMessage.media.audio.url}}" type="audio/ogg" /> |
||||
<embed ng-src="{{::historyMessage.media.audio.url}}" hidden="true" autostart="true" loop="false" /> |
||||
</audio> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="im_message_audio"> |
||||
<div my-audio-player audio="historyMessage.media.audio"></div> |
||||
</div> |
||||
|
Loading…
Reference in new issue