|
|
|
|
@ -104,11 +104,11 @@ margin-bottom: 1px; }
|
|
|
|
|
|
|
|
|
|
<section layout="row" layout-sm="column" layout-align="center center" layout-wrap>
|
|
|
|
|
<div class="label">Skip</div>
|
|
|
|
|
<md-button class="md-fab" aria-label="Back 1 min" ng-click="back()">
|
|
|
|
|
<md-button class="md-fab" aria-label="Back" ng-click="back()">
|
|
|
|
|
<
|
|
|
|
|
</md-button>
|
|
|
|
|
|
|
|
|
|
<md-button class="md-fab" aria-label="Forward 1 min" ng-click="forward()">
|
|
|
|
|
<md-button class="md-fab" aria-label="Forward" ng-click="forward()">
|
|
|
|
|
>
|
|
|
|
|
</md-button>
|
|
|
|
|
</section>
|
|
|
|
|
@ -126,10 +126,10 @@ margin-bottom: 1px; }
|
|
|
|
|
|
|
|
|
|
<section layout="row" layout-sm="column" layout-align="center center" layout-wrap>
|
|
|
|
|
<div class="label">Volume</div>
|
|
|
|
|
<md-button class="md-fab" aria-label="">
|
|
|
|
|
<md-button class="md-fab" aria-label="Volume down" ng-click="volumeDown()">
|
|
|
|
|
-
|
|
|
|
|
</md-button>
|
|
|
|
|
<md-button class="md-fab" aria-label="">
|
|
|
|
|
<md-button class="md-fab" aria-label="Volume up" ng-click="volumeUp()">
|
|
|
|
|
+
|
|
|
|
|
</md-button>
|
|
|
|
|
</section>
|
|
|
|
|
@ -161,21 +161,39 @@ var showStatus = function(text) {
|
|
|
|
|
$timeout(function() {$scope.status = ''; }, 2000);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var seek = function(seconds) {
|
|
|
|
|
var direction = seconds < 0 ? "Back" : "Forward";
|
|
|
|
|
$http({
|
|
|
|
|
method: 'GET',
|
|
|
|
|
url: '/seek/' + seconds
|
|
|
|
|
}).then(function successCallback(response) {
|
|
|
|
|
showStatus(direction + ": Success");
|
|
|
|
|
}, function errorCallback(response) {
|
|
|
|
|
showStatus(direction + ": Error");
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var volume = function(delta) {
|
|
|
|
|
var direction = delta < 0 ? "down" : "up";
|
|
|
|
|
$http({
|
|
|
|
|
method: 'GET',
|
|
|
|
|
url: '/volume/' + delta
|
|
|
|
|
}).then(function successCallback(response) {
|
|
|
|
|
showStatus("Volume " + direction + ": Success");
|
|
|
|
|
}, function errorCallback(response) {
|
|
|
|
|
showStatus("Volume " + direction + ": Error");
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$scope.status = '';
|
|
|
|
|
|
|
|
|
|
$scope.alert = '';
|
|
|
|
|
$scope.back = function() {}
|
|
|
|
|
$scope.pause = function() {}
|
|
|
|
|
$scope.forward = function() {
|
|
|
|
|
$http({
|
|
|
|
|
method: 'GET',
|
|
|
|
|
url: '/seek/10'
|
|
|
|
|
}).then(function successCallback(response) {
|
|
|
|
|
showStatus("Forward: Success");
|
|
|
|
|
}, function errorCallback(response) {
|
|
|
|
|
showStatus("Forward: Error");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
$scope.back = function() { seek(-10) };
|
|
|
|
|
$scope.pause = function() {};
|
|
|
|
|
$scope.forward = function() { seek(10) };
|
|
|
|
|
$scope.volumeUp = function() { volume(5) };
|
|
|
|
|
$scope.volumeDown = function() { volume(-5) };
|
|
|
|
|
|
|
|
|
|
$scope.showListBottomSheet = function($event) {
|
|
|
|
|
$scope.alert = '';
|
|
|
|
|
$mdBottomSheet.show({
|
|
|
|
|
|