Commit 7f8bd609 authored by SpinShare's avatar SpinShare

added mp3 preview support

parent 049e44fd
......@@ -382,6 +382,10 @@
function PlayPreview() {
currentPreviewAudio = new Audio("{{ asset('uploads/audio/' ~ song.fileReference ~ '_0.ogg') }}");
// TODO: This is a quick fix for mp3 support, change with proper code later
currentPreviewAudio.onerror = function() {
currentPreviewAudio = new Audio("{{ asset('uploads/audio/' ~ song.fileReference ~ '_0.mp3') }}");
}
currentPreviewAudio.volume = 0.5;
playerVolume.value = 50;
currentPreviewAudio.play();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment