audio with controls

This commit is contained in:
Sanj 2011-12-22 18:06:55 +05:30
parent 75762b115e
commit 87167dd716

View File

@ -14,7 +14,7 @@ $(function() {
$.get(srtFilename, {}, function(srt) { $.get(srtFilename, {}, function(srt) {
var txt = srtToTxt(srt, 'tc'); var txt = srtToTxt(srt, 'tc');
var $txtContainer = $('<div />').addClass("srtContainer").data("srt", srt).hide() var $txtContainer = $('<div />').addClass("srtContainer").data("srt", srt).hide()
var $audio = $('<audio />').attr("src", audioFilename).appendTo($txtContainer); var $audio = $('<audio />').attr("src", audioFilename).attr("controls", "controls").appendTo($txtContainer);
var $btnsContainer = $('<div />').addClass("btnsContainer").appendTo($txtContainer); var $btnsContainer = $('<div />').addClass("btnsContainer").appendTo($txtContainer);
var $padmaBtn = $('<button />').addClass("padmaBtn").text("View on pad.ma").appendTo($btnsContainer); var $padmaBtn = $('<button />').addClass("padmaBtn").text("View on pad.ma").appendTo($btnsContainer);
var $srtBtn = $('<button />').addClass("srtBtn").text("View SRT").data("fmt", "srt").appendTo($btnsContainer); var $srtBtn = $('<button />').addClass("srtBtn").text("View SRT").data("fmt", "srt").appendTo($btnsContainer);