Skip to content

Commit

Permalink
CS-494 Request spectrogram tiles from Media API for audios from RFCx …
Browse files Browse the repository at this point in the history
…streams
  • Loading branch information
rassokhin-s committed Feb 12, 2021
1 parent 17ad7a9 commit 35a8ab0
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Arbimon Release Notes

## v3.0.10

New features:
- ([CS-494](https://jira.rfcx.org/browse/CS-494)) Request spectrogram tiles from Media API for audios from RFCx streams

## v3.0.9 - Feb 12, 2021

New features:
Expand Down
4 changes: 4 additions & 0 deletions DEPLOYMENT_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Arbimon Deployment Notes

## v3.0.10

_None_

## v3.0.9

- Run migration 006-project-table-add-aed-clustering-enabled-colums.sql
Expand Down
1 change: 1 addition & 0 deletions app/model/recordings.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ var Recordings = {
projection = "R.recording_id AS id, \n"+
"SUBSTRING_INDEX(R.uri,'/',-1) as file, \n"+
"S.name as site, \n"+
"S.legacy as legacy, \n"+
"R.uri, \n"+
"R.datetime, \n"+
"R.mic, \n"+
Expand Down
13 changes: 10 additions & 3 deletions assets/app/app/visualizer/visobjects/recording.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ angular.module('a2.visobjects.recording', [
})
.service('VisualizerObjectRecordingTypeLoader', function ($q, Project) {
var khz_format = function(v){return (v/1000) | 0; };

var recording = function(data, extra){
for(var i in data){ this[i] = data[i]; }
this.sampling_rate = this.sample_rate;
Expand All @@ -37,12 +37,19 @@ angular.module('a2.visobjects.recording', [
}
};
// set it to the scope
var streamId = data.uri.split('/')[3]
this.tiles.set.forEach((function(tile){
tile.src="/api/project/"+Project.getUrl()+"/recordings/tiles/"+this.id+"/"+tile.i+"/"+tile.j;
if (!!data.legacy) {
tile.src="/api/project/"+Project.getUrl()+"/recordings/tiles/"+this.id+"/"+tile.i+"/"+tile.j;
} else {
var start = new Date(new Date(data.datetime).valueOf() + Math.round(tile.s * 1000)).toISOString()
var end = new Date(new Date(data.datetime).valueOf() + Math.round((tile.s + tile.ds) * 1000)).toISOString()
tile.src = '/api/ingest/recordings/' + streamId + '_t' + start.replace(/-|:|\./g, '') + '.' + end.replace(/-|:|\./g, '') + '_z95_wdolph_g1_fspec_mtrue_d1023.255.png'
}
}).bind(this));
};
recording.layers=[

];
recording.fetch = function(visobject){
var d = $q.defer();
Expand Down
2 changes: 1 addition & 1 deletion config/rfcx.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"coreAPIEnabled": false,
"apiBaseUrl": "https://api.rfcx.org",
"mediaBaseUrl": "https://media.rfcx.org"
"mediaBaseUrl": "https://media-api.rfcx.org"
}

0 comments on commit 35a8ab0

Please sign in to comment.