CC-2430: Preview tracks in the library + better preview (ability to jump around in clip)
- Updated functionality so user can play a track and in jplayer and jump around it.
This commit is contained in:
parent
7d95e4ffa7
commit
aacbac4757
5 changed files with 742 additions and 154 deletions
|
@ -44,22 +44,12 @@ function playlistAudioPreviewEditor(filename, elemIndexString){
|
|||
function open_audio_preview(filename, index) {
|
||||
console.log("hello world 2 "+filename+" help?");
|
||||
url = 'Playlist/audio-preview-player/filename/'+filename+'/index/'+index;
|
||||
|
||||
//$.post(baseUri+'Playlist/audio-preview-player', {fileName: fileName, cueIn: cueIn, cueOut: cueOut, fadeIn: fadeIn, fadeInFileName: fadeInFileName, fadeOut: fadeOut, fadeOutFileName: fadeOutFileName})
|
||||
if (audio_preview_window == null || audio_preview_window.closed){
|
||||
console.log("opening : "+baseUrl+url);
|
||||
|
||||
audio_preview_window = window.open(url, 'Audio Player', 'width=400,height=95');
|
||||
//audio_preview_window.setTitle('Audio Player');
|
||||
//$.post(baseUri+'Playlist/audio-preview-player', {fileName: fileName, cueIn: cueIn, cueOut: cueOut, fadeIn: fadeIn, fadeInFileName: fadeInFileName, fadeOut: fadeOut, fadeOutFileName: fadeOutFileName})
|
||||
/**
|
||||
$.post(url,
|
||||
{format: "json", elementFilename: filename, elementIndex: elemIndexString},
|
||||
function(json){
|
||||
audio_preview_window.document.open();
|
||||
audio_preview_window.document.write(json);
|
||||
audio_preview_window.document.close();
|
||||
});
|
||||
**/
|
||||
|
||||
} else if (!audio_preview_window.closed) {
|
||||
console.log("refreshing : "+baseUrl+url);
|
||||
audio_preview_window.play(filename);
|
||||
|
|
|
@ -37,16 +37,13 @@ function audioPreview(filename, elemID){
|
|||
|
||||
$(document).ready(function(){
|
||||
var filename = $(".filename").text();
|
||||
//var filename = $(".jp_audio_0").attr("src");
|
||||
play(filename);
|
||||
|
||||
|
||||
});
|
||||
|
||||
function play(filename){
|
||||
console.log("in the play function! "+filename);
|
||||
|
||||
var uri = "/api/get-media/file/" + filename+"/api_key/H7CSH1RH1YH2W3KFAKCZ";
|
||||
var uri = "/api/get-media/file/" + filename;
|
||||
var ext = getFileExt(filename);
|
||||
|
||||
|
||||
|
@ -72,53 +69,5 @@ function play(filename){
|
|||
cssSelectorAncestor: '#jp_container_1',
|
||||
wmode: "window"
|
||||
});
|
||||
/**
|
||||
$("#jquery_jplayer_1").jPlayer().bind($.jPlayer.event.play, function(event){
|
||||
console.log("playing xxx");
|
||||
//console.log(this.htmlElement.media.currentTime)
|
||||
//$("#jquery_jplayer_1").jPlayer("playHead", event.jPlayer.status.seekPercent);
|
||||
});
|
||||
$("#jquery_jplayer_1").jPlayer().bind($.jPlayer.event.seeking, function(event){
|
||||
console.log("hello 123");
|
||||
//console.log(this.htmlElement.media.currentTime)
|
||||
//$("#jquery_jplayer_1").jPlayer("playHead", event.jPlayer.status.seekPercent);
|
||||
});
|
||||
$("#jquery_jplayer_1").jPlayer().bind($.jPlayer.event.seeked, function(event){
|
||||
console.log("hello 456");
|
||||
//console.log(this.htmlElement.media.currentTime)
|
||||
//$("#jquery_jplayer_1").jPlayer("playHead", event.jPlayer.status.seekPercent);
|
||||
});
|
||||
$("#jquery_jplayer_1").jPlayer().bind($.jPlayer.event.volumechange, function(event){
|
||||
console.log("hello 666");
|
||||
//console.log(this.htmlElement.media.currentTime)
|
||||
//$("#jquery_jplayer_1").jPlayer("playHead", event.jPlayer.status.seekPercent);
|
||||
});
|
||||
$(".jp-seek-bar").click(function(){
|
||||
console.log("seek bar clicked");
|
||||
console.log($("#currentTime"));
|
||||
//console.log(this.htmlElement.media.seekable)
|
||||
//console.log($(".jp-play-bar").attr("style"));
|
||||
//$("#jquery_jplayer_1").jPlayer("play", 40);
|
||||
});
|
||||
|
||||
$(".jp-seek-bar").click(function(){
|
||||
console.log("hi");
|
||||
//console.log(this.htmlElement.media.seekable)
|
||||
//console.log($(".jp-play-bar").attr("style"));
|
||||
//$("#jquery_jplayer_1").jPlayer("playHead", "50%");
|
||||
});
|
||||
$(".jp-play-bar").click(function(){
|
||||
console.log("bye");
|
||||
});
|
||||
$(".jp-progres").click(function(){
|
||||
console.log("no");
|
||||
});
|
||||
$("#combo-box").change(function(eventObject){
|
||||
var elem = $("#combo-box option:selected");
|
||||
setjPlayer(elem.attr("data-url"), elem.attr("data-type"), elem.attr("server-type"));
|
||||
});
|
||||
**/
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue