-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new file: app/assets/javascripts/angular/controllers/listen.js renamed: app/assets/javascripts/directives.js -> app/assets/javascripts/angular/directives/directives.js modified: app/assets/javascripts/app.js modified: app/assets/templates/home.html new file: app/assets/templates/listen.html modified: app/assets/templates/recordings.html modified: app/views/layouts/application.html.erb -- added home link modified: config/routes.rb -- added debugging route
- Loading branch information
Showing
7 changed files
with
66 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"use strict"; | ||
/* | ||
The listen controller. Show a spectrogram, listen to audio, annotate the spectrogram. | ||
*/ | ||
function ListenCtrl($scope, $resource, $location) { | ||
|
||
var recordingResource = $resource('/audio_recordings/:recordingId', {recordingId: '@id'}, { | ||
get: { method:'GET', params:{recordingId: '@id'}, isArray: false } | ||
}); | ||
$scope.recording = recordingResource.get({recordingId:1}); | ||
|
||
|
||
var spectrogramResource = $resource('/audio_recordings/:recordingId', {recordingId: '@id'}, { | ||
get: { method:'GET', params:{recordingId: '@id'}, isArray: false } | ||
}); | ||
$scope.spectrogram = recordingResource.get({recordingId:1}); | ||
|
||
|
||
var audioEventResource = $resource('/audio_recordings/:recordingId', {recordingId: '@id'}, { | ||
get: { method:'GET', params:{recordingId: '@id'}, isArray: false } | ||
}); | ||
$scope.recording = recordingResource.get({recordingId:1}); | ||
|
||
|
||
$scope.refresh = function($event) { | ||
//$ngModel.$render(); | ||
}; | ||
|
||
} | ||
|
||
ListenCtrl.$inject = ['$scope', '$resource', '$location'] |
3 changes: 2 additions & 1 deletion
3
app/assets/javascripts/directives.js → ...ascripts/angular/directives/directives.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div id="content" data-ng-controller="ListenCtrl"> | ||
<a href="/listen/1bd0d668-1471-4396-adc3-09ccd8fe949a">demo</a> | ||
<a href="#" ng-click="refresh()">demo</a> | ||
|
||
<h1>Listen</h1> | ||
|
||
<p>Listen and annotate.</p> | ||
|
||
<h3>Spectrogram</h3> | ||
<img src="{{}}"> | ||
|
||
<h3>Audio Controls</h3> | ||
<audio></audio> | ||
|
||
<h3>Annotations</h3> | ||
<table>a</table>ss | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters