Commit b5c30f0d authored by hadi's avatar hadi
Browse files

separate audio and video settings.

using wb-ui-setting-image, wb-ui.setting-audio and wb-ui-setting-video.
parent 62a60f75
Pipeline #8982928 passed with stage
in 10 minutes and 43 seconds
......@@ -46,10 +46,17 @@ angular.module('ngMaterialWeburgerCommon')
templateUrl : 'views/am-wb-common-settings/features.html'
});
$settings.newPage({
type: 'common-player',
label : 'Player',
description : 'Manage showing video or playing audio in the current widget.',
type: 'common-audio-player',
label : 'Audio Player',
description : 'Manage playing audio in the current widget.',
icon : 'settings',
templateUrl : 'views/am-wb-common-settings/player.html'
templateUrl : 'views/am-wb-common-settings/audio-player.html'
});
$settings.newPage({
type: 'common-video-player',
label : 'Video Player',
description : 'Manage showing video in the current widget.',
icon : 'settings',
templateUrl : 'views/am-wb-common-settings/video-player.html'
});
});
......@@ -90,7 +90,7 @@ angular.module('ngMaterialWeburgerCommon')
description : 'A player to show video contents.',
help : 'https://gitlab.com/weburger/am-wb-common/wikis/video-player',
controller: 'AmWbCommonVideoCtrl',
setting:['common-player'],
setting:['common-video-player'],
});
$widget.newWidget({
type: 'CommonAudioPlayer',
......@@ -99,6 +99,6 @@ angular.module('ngMaterialWeburgerCommon')
description : 'A player to play audio contents.',
help : 'https://gitlab.com/weburger/am-wb-common/wikis/audio-player',
controller: 'AmWbCommonAudioCtrl',
setting:['common-player'],
setting:['common-audio-player'],
});
});
<md-list class="wb-setting-panel">
<!-- SECTION: Source -->
<md-input-container class="md-icon-float md-block">
<label>Source URL</label>
<input ng-model="wbModel.content.url"
type="text"
aria-label="Source URL">
</md-input-container>
<!-- <md-input-container class="md-icon-float md-block"> -->
<!-- <label>Source URL</label> -->
<!-- <input ng-model="wbModel.content.url" -->
<!-- type="text" -->
<!-- aria-label="Source URL"> -->
<!-- </md-input-container> -->
<wb-ui-setting-audio
title="Source"
value="wbModel.content.url">
</wb-ui-setting-audio>
<md-input-container class="md-icon-float md-block">
<label>Type</label>
<input ng-model="wbModel.content.mimeType"
......@@ -14,14 +19,6 @@
aria-label="MIME Type">
</md-input-container>
<!-- SECTION: Settings for Player -->
<md-input-container class="md-icon-float md-block">
<label>Poster</label>
<input ng-model="wbModel.setting.poster"
type="text"
aria-label="Poster">
</md-input-container>
<wb-ui-setting-on-off-switch
title="Autoplay?"
icon="play_arrow"
......
<md-list class="wb-setting-panel">
<!-- SECTION: Source -->
<!-- <md-input-container class="md-icon-float md-block"> -->
<!-- <label>Source URL</label> -->
<!-- <input ng-model="wbModel.content.url" -->
<!-- type="text" -->
<!-- aria-label="Source URL"> -->
<!-- </md-input-container> -->
<wb-ui-setting-video
title="Source"
value="wbModel.content.url">
</wb-ui-setting-video>
<md-input-container class="md-icon-float md-block">
<label>Type</label>
<input ng-model="wbModel.content.mimeType"
type="text"
aria-label="MIME Type">
</md-input-container>
<!-- <md-input-container class="md-icon-float md-block"> -->
<!-- <label>Poster</label> -->
<!-- <input ng-model="wbModel.setting.poster" -->
<!-- type="text" -->
<!-- aria-label="Poster"> -->
<!-- </md-input-container> -->
<wb-ui-setting-image
title="Poster"
value="wbModel.setting.poster">
</wb-ui-setting-image>
<wb-ui-setting-on-off-switch
title="Autoplay?"
icon="play_arrow"
value="wbModel.setting.autoplay">
</wb-ui-setting-on-off-switch>
<wb-ui-setting-on-off-switch
title="Controls?"
icon="swap_horiz"
value="wbModel.setting.controls">
</wb-ui-setting-on-off-switch>
<wb-ui-setting-on-off-switch
title="Loop?"
icon="replay"
value="wbModel.setting.loop">
</wb-ui-setting-on-off-switch>
<wb-ui-setting-dropdown
title="Preload"
icon="cached"
items="[
{'title':'auto','value':'auto'},
{'title':'metadata','value':'metadata'},
{'title':'none','value':'none'}
]"
value="wbModel.setting.preload">
</wb-ui-setting-dropdown>
</md-list>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment