From 9bc36f5634833f75247c665580b02c3e379bc733 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 15 Feb 2012 10:36:07 +0000 Subject: [PATCH] deal with two-value (in/out) video span (fixes #442) --- static/js/pandora/URL.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/js/pandora/URL.js b/static/js/pandora/URL.js index 6d5a7938..f19f2619 100644 --- a/static/js/pandora/URL.js +++ b/static/js/pandora/URL.js @@ -91,8 +91,11 @@ pandora.URL = (function() { if (Ox.isArray(state.span)) { set['videoPoints.' + state.item] = { annotation: '', - 'in': state.span[1] || 0, - out: Math.max(state.span[1] || 0, state.span[2] || 0), + 'in': state.span[state.span.length - 2] || 0, + out: state.span.length == 1 ? 0 : Math.max( + state.span[state.span.length - 2], + state.span[state.span.length - 1] + ), position: state.span[0] }; } else {