Skip to content

Commit 404e4a7

Browse files
committed
fix bug record
1 parent 597086f commit 404e4a7

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

js/manage/mErrors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ function reportError(text) {
2020
};
2121

2222
xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
23-
xhr.send('text=' + ((isFirefox) ? '-Firefox-' : '-Chrome-') + ' -' + usernameSession + '- ' + text);
23+
xhr.send('text=' + ((isFirefox) ? '-Firefox-' : '-Chrome-') + ' -' + usernameSession + '- ' + ' -' + ((currentProject) ? currentProject.name : 'No Project') + '- ' + text);
2424
}

js/manage/mRecords.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ stopRecordingbtn.onclick = function () {
202202
console.log("Something traite avec le worker en provenance de videoRecorder")
203203
videoRecorderResult = new Blob([file.data]);
204204
document.getElementById('video').src = window.URL.createObjectURL(videoRecorderResult);
205-
$('#recordAudioOrVideoElement').modal('show');
205+
$('#recordFileModal').modal('show');
206206
});
207207
}
208208
}
@@ -276,7 +276,7 @@ document.getElementById('buttonSaveRecord').onclick = function(){
276276

277277
var reader = new FileReader();
278278
reader.addEventListener("loadend", function() {
279-
$('#recordAudioOrVideoElement').modal('hide');
279+
$('#recordFileModal').modal('hide');
280280
currentProject.tabListFiles.push(new File(fileId, uId(), typeFile, blob.size, newFileName, newFileName.split('.').pop()));
281281
addFileList(fileId, newFileName, typeFile);
282282
sLoadM();
@@ -297,7 +297,7 @@ document.getElementById('buttonSaveRecord').onclick = function(){
297297
currentProject.tabListFiles.push(new File(fileId, uId(), typeFile, videoRecorderResult.size, fileName, fileName.split('.').pop()));
298298
addFileList(fileId, fileName, typeFile);
299299
sLoadM();
300-
uploadFile(fileId, uId(), fileName, videoRecorderResult, typeFile, fileName.split('.').pop());
300+
uploadFile(fileId, uId(), fileName, videoRecorderResult, 'FILE', fileName.split('.').pop());
301301
$('#recordAudioOrVideoElement').modal('hide');
302302
fileProcessing(fileId, arrayBuffer);
303303
}

js/manage/mTracks.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ function mouseMoveTime(x, width) {
273273
var textPxLength = timeBar.canvasContext.measureText(text);
274274

275275

276-
if (x>0 && x< timeBar.canvas.width)
276+
if (x >= 0 && x < timeBar.canvas.width)
277277
{
278278
timeBar.canvasContext.beginPath();
279279
timeBar.canvasContext.moveTo(x, timeBar.canvas.height/2);
@@ -284,13 +284,13 @@ function mouseMoveTime(x, width) {
284284
if(width != null) {
285285
if(((width < 0) ? -width : width) >= 64) {
286286
timeBar.canvasContext.fillText(pixelToTime((width < 0) ? -width : width), (x + (width / 2)), (timeBar.canvas.height - 14), (((width < 0) ? -width : width) - 4));
287-
console.log(width);
288287
}
289288

290289
timeBar.canvasContext.fillStyle = '#ffffff';
291290
timeBar.canvasContext.fillRect(x+width-textPxLength.width/2,2,textPxLength.width+2, 12);
292-
timeBar.canvasContext.fillStyle = "#000000";
293-
timeBar.canvasContext.fillText(pixelToTime(x+width), x+width,3 );
291+
292+
//timeBar.canvasContext.fillStyle = "#000000";
293+
//timeBar.canvasContext.fillText(pixelToTime(x+width), x+width,3 );
294294

295295
timeBar.canvasContext.beginPath();
296296
timeBar.canvasContext.moveTo((x + width), timeBar.canvas.height/2);
@@ -303,15 +303,15 @@ function mouseMoveTime(x, width) {
303303
}
304304
else
305305
{
306-
if (x<0)
306+
if (x < 0)
307307
{
308308
timeBar.canvasContext.beginPath();
309309
timeBar.canvasContext.moveTo(0, timeBar.canvas.height/2);
310310
timeBar.canvasContext.lineTo(0, timeBar.canvas.height);
311311
timeBar.canvasContext.closePath();
312312
timeBar.canvasContext.stroke();
313313
}
314-
else if (x> timeBar.canvas.width)
314+
else if (x > timeBar.canvas.width)
315315
{
316316
timeBar.canvasContext.beginPath();
317317
timeBar.canvasContext.moveTo(timeBar.canvas.width, timeBar.canvas.height/2);

0 commit comments

Comments
 (0)