handle info, edit pages
This commit is contained in:
parent
b2d1c67b02
commit
54b2c3eb6b
|
@ -16,23 +16,17 @@ function setupPadmaLink(videoObj, data) {
|
|||
var $a = $(data.jq);
|
||||
// $a.data("isDisplayed", false);
|
||||
var linkData = data.linkData;
|
||||
if (linkData.type != 'tcRange') {
|
||||
return false;
|
||||
if (linkData.type in ['info', 'editor']) {
|
||||
linkData.tcIn = ms2npt(0);
|
||||
linkData.tcOut = ms2npt(videoObj.video.duration);
|
||||
}
|
||||
//FIXME: put this as a variable, option somewhere?
|
||||
var $container = padmaContainer;
|
||||
videoObj.currentLayers = [];
|
||||
switch (linkData.type) {
|
||||
case "tcRange":
|
||||
var mid_frame_npt = ms2npt(parseInt((npt2ms(linkData.tcIn) + npt2ms(linkData.tcOut)) / 2));
|
||||
// console.log(mid_frame_npt);
|
||||
var thumbUrl = videoObj.getFrame(mid_frame_npt);
|
||||
break;
|
||||
default:
|
||||
var frame_npt = ms2npt(videoObj.video.poster_frame);
|
||||
var thumbUrl = videoObj.getFrame(frame_npt);
|
||||
}
|
||||
|
||||
var mid_frame_npt = ms2npt(parseInt((npt2ms(linkData.tcIn) + npt2ms(linkData.tcOut)) / 2));
|
||||
// console.log(mid_frame_npt);
|
||||
var thumbUrl = videoObj.getFrame(mid_frame_npt);
|
||||
//FIXME: Html may need to be conditional on linkData.type, probably put html in switch case above.
|
||||
var html = tmpl("tmpl_tooltip", {'video': videoObj, 'thumbUrl': thumbUrl, 'linkData': linkData});
|
||||
// $a.attr("title", title);
|
||||
|
|
Loading…
Reference in New Issue
Block a user