thrimbletrimmer: Handle null trim in submit

mainly for save draft
pull/163/head
Mike Lang 5 years ago
parent 3086ab73f6
commit 47584821f9

@ -232,9 +232,14 @@ thrimbletrimmerSubmit = function(state) {
document.getElementById('SubmitButton').disabled = true; document.getElementById('SubmitButton').disabled = true;
var discontinuities = mapDiscontinuities(); var discontinuities = mapDiscontinuities();
var start = getRealTimeForPlayerTime(discontinuities, player.trimmingControls().options.startTrim);
if (start) {start = start.replace('Z','');}
var end = getRealTimeForPlayerTime(discontinuities, player.trimmingControls().options.endTrim);
if (end) {end = end.replace('Z','');}
var wubData = { var wubData = {
video_start:getRealTimeForPlayerTime(discontinuities, player.trimmingControls().options.startTrim).replace('Z',''), video_start:start,
video_end:getRealTimeForPlayerTime(discontinuities, player.trimmingControls().options.endTrim).replace('Z',''), video_end:end,
video_title:document.getElementById("VideoTitle").value, video_title:document.getElementById("VideoTitle").value,
video_description:document.getElementById("VideoDescription").value, video_description:document.getElementById("VideoDescription").value,
allow_holes:document.getElementById('AllowHoles').checked, allow_holes:document.getElementById('AllowHoles').checked,

Loading…
Cancel
Save