var audioElementGrid = document.createElement('audio');
$("#profileGrid").on("click", ".btn-play", function () { audioElementGrid.setAttribute('src', $(this).attr("data-url")); audioElementGrid.pause(); audioElementGrid.play(); $("a.btn-play").html("">"); $(".lightbox-playBtn").addClass("lightbox-stopBtn"); audioElementGrid.addEventListener('ended', function () { $("a.btn-play").html("^__i class="fa fa-play-circle-o fa-2">"); $('.lightbox-playBtn').removeClass("lightbox-stopBtn"); $(".audio-btn").addClass("btn-play"); $(".audio-btn").removeClass("btn-stop"); }, false); });
public FileResult GetAudio(string key) { Stream file = new MemoryStream(); try { GetObjectResponse r = s3Client.GetObject(new GetObjectRequest() { BucketName = bucketName, Key = key }); try { return File(r.ResponseStream, "audio/wav"); } finally { } } catch (AmazonS3Exception) { //Show exception } return null; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)