Skip to content

Commit

Permalink
Merge pull request #27 from rhiaro/feat-audio-dl
Browse files Browse the repository at this point in the history
scribe-tool: Add button to download audio
  • Loading branch information
rhiaro authored Dec 10, 2020
2 parents a1ac5e9 + 1e9b59b commit 51b45c5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scribe-tool/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
.then(res => {
$('#irc-log').val(res);
$('#form-resp').removeClass('error').text('');
$('#btn-audio').removeAttr('disabled');
displayMinutes();
})
.catch(err => {
Expand All @@ -36,6 +37,7 @@
$('#text-markup').val('');
$('#html-markup').val('');
$('#html-output').html('');
$('#btn-audio').prop('disabled', true);
});
};

Expand Down Expand Up @@ -112,6 +114,13 @@
}
}

downloadAudio = function(){
var audioUrl = "https://meet.w3c-ccg.org/archives/w3c-ccg-weekly-";
// get date from date input
audioUrl = audioUrl + $('#date').val() + ".ogg";
window.open(audioUrl, '_blank');
}

// initialize scrawl
$.getJSON( "people.json", function(people) {
scrawl.group = "Credentials Community Group";
Expand Down Expand Up @@ -168,6 +177,8 @@
<p id="form-resp"></p>
<span class="button" onclick="javascript:copyText()">Copy</span>
<span id="btn-resp"></span>

<button id="btn-audio" disabled class="button" onclick="javascript:downloadAudio()">download audio</div>
</span>
</section>

Expand Down

0 comments on commit 51b45c5

Please sign in to comment.