modified : timecomments updtae
This commit is contained in:
parent
a403bfbd0e
commit
166db42642
1 changed files with 9 additions and 6 deletions
|
@ -36,13 +36,11 @@ TimeComments.prototype.AddComment = function(){
|
||||||
var commentBoxForm = "";
|
var commentBoxForm = "";
|
||||||
|
|
||||||
var commentTimeDisplay = function(){
|
var commentTimeDisplay = function(){
|
||||||
/*console.log(mouseDisplay);
|
|
||||||
console.log(mouseDisplay.dataset.currentTime);*/
|
|
||||||
cTimeDisplay = document.createElement('div');
|
cTimeDisplay = document.createElement('div');
|
||||||
cTimeDisplay.className = "cb-vjs-comments-display";
|
cTimeDisplay.className = "cb-vjs-comments-display";
|
||||||
cTimeDisplay.innerHTML = "Add";
|
|
||||||
cTimeDisplay.style.position = 'absolute';
|
cTimeDisplay.style.position = 'absolute';
|
||||||
cTimeDisplay.style.width = '100px';
|
cTimeDisplay.style.width = '2px';
|
||||||
cTimeDisplay.style.height = '100%';
|
cTimeDisplay.style.height = '100%';
|
||||||
progressControl.firstChild.insertBefore(cTimeDisplay, mouseDisplay);
|
progressControl.firstChild.insertBefore(cTimeDisplay, mouseDisplay);
|
||||||
}
|
}
|
||||||
|
@ -54,6 +52,10 @@ TimeComments.prototype.AddComment = function(){
|
||||||
var newTime = val.toFixed(2);
|
var newTime = val.toFixed(2);
|
||||||
mouseDisplay_time = newTime;
|
mouseDisplay_time = newTime;
|
||||||
|
|
||||||
|
if (mouseDisplay_time > timecomments.player.duration() || mouseDisplay_time == 0){
|
||||||
|
hideAddComment();
|
||||||
|
}
|
||||||
|
|
||||||
dataSetTime = mouseDisplay.dataset.currentTime;
|
dataSetTime = mouseDisplay.dataset.currentTime;
|
||||||
mouseDisplay.style.display = "none";
|
mouseDisplay.style.display = "none";
|
||||||
cTimeDisplay.innerHTML = "<span class='cb-vjs-addcomment-clicker'>"+dataSetTime+" | Add Comment "+"</span>";
|
cTimeDisplay.innerHTML = "<span class='cb-vjs-addcomment-clicker'>"+dataSetTime+" | Add Comment "+"</span>";
|
||||||
|
@ -130,8 +132,9 @@ TimeComments.prototype.AddComment = function(){
|
||||||
setCommentBox();
|
setCommentBox();
|
||||||
commentTimeDisplay();
|
commentTimeDisplay();
|
||||||
cTimeDisplay.addEventListener('click',showCommentBox);
|
cTimeDisplay.addEventListener('click',showCommentBox);
|
||||||
progressControl.addEventListener("mouseenter", showAddComment);
|
progressControl.addEventListener("mouseover", showAddComment);
|
||||||
progressControl.addEventListener("mouseleave", hideAddComment);
|
progressControl.addEventListener("mouseout", hideAddComment);
|
||||||
|
/*cTimeDisplay.addEventListener('mouseleave',hideAddComment);*/
|
||||||
progressControl.addEventListener("mousemove", setCommentTime);
|
progressControl.addEventListener("mousemove", setCommentTime);
|
||||||
document.getElementById('timecomment-box-dismiss').addEventListener('click',dismissCommentBox);
|
document.getElementById('timecomment-box-dismiss').addEventListener('click',dismissCommentBox);
|
||||||
document.getElementById('add-timecomment').addEventListener('click',sendComment);
|
document.getElementById('add-timecomment').addEventListener('click',sendComment);
|
||||||
|
|
Loading…
Add table
Reference in a new issue