-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from MTG/iss127
New audio player - Review of iss127
- Loading branch information
Showing
59 changed files
with
4,747 additions
and
59 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 |
---|---|---|
|
@@ -15,7 +15,6 @@ dist/ | |
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
|
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,13 @@ | ||
from django.core.management.base import BaseCommand | ||
from datasets.tasks import refresh_sound_extra_data | ||
|
||
|
||
class Command(BaseCommand): | ||
help = 'Refresh the extra_data field in Sound model' \ | ||
|
||
|
||
def add_arguments(self, parser): | ||
pass | ||
|
||
def handle(self, *args, **options): | ||
refresh_sound_extra_data() |
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
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,7 @@ | ||
{% load staticfiles %} | ||
|
||
{% block extra_head %} | ||
<link rel="stylesheet" type="text/css" href="{% static "audio-annotator/css/player.css" %}"/> | ||
<script src="{% static "audio-annotator/js/lib/wavesurfer.min.js" %}" type="text/javascript"></script> | ||
<script src="{% static "audio-annotator/js/src/player.js" %}" type="text/javascript"></script> | ||
{% endblock %} |
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,28 @@ | ||
<div class="player_container"> | ||
|
||
<div class="soundplayer {{ player_size }}" id="s{{ freesound_id }}_{{ player_id }}"> | ||
<div class="ui active dimmer"> | ||
<div class="ui loader"></div> | ||
</div> | ||
<div class="wavesurfer"></div> | ||
<div class="playbar"></div> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
var playerOptions = { | ||
size: "{{ player_size }}", | ||
player_id: "{{ player_id }}", | ||
freesound_id: "{{ freesound_id }}", | ||
sound_url: "{{ sound_url }}", | ||
waveform_url: "{{ waveform_url }}", | ||
spectrogram_url: "{{ spectrogram_url }}", | ||
}; | ||
|
||
var player = new Player(playerOptions); | ||
if (typeof(window.players) === "undefined") { | ||
window.players = []; | ||
} | ||
window.players.push(player); | ||
</script> | ||
|
||
</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
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
Oops, something went wrong.