forked from openlp/openlp
reduced overlap time; renamed variable
This commit is contained in:
parent
c016067a4f
commit
5acac7976c
@ -164,8 +164,8 @@ sup {
|
|||||||
text.innerHTML = new_text;
|
text.innerHTML = new_text;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Fade text out. 0.2 to minimize the time "nothing" is shown on the screen.
|
// Fade text out. 0.1 to minimize the time "nothing" is shown on the screen.
|
||||||
text.style.opacity = '0.2';
|
text.style.opacity = '0.1';
|
||||||
// Fade new text in after the old text has finished fading out.
|
// Fade new text in after the old text has finished fading out.
|
||||||
timer = window.setTimeout(function(){_show_text(text, new_text)}, 400);
|
timer = window.setTimeout(function(){_show_text(text, new_text)}, 400);
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ VIDEO_JS = u"""
|
|||||||
break;
|
break;
|
||||||
case 'length':
|
case 'length':
|
||||||
return video.duration;
|
return video.duration;
|
||||||
case 'currentTime':
|
case 'current_time':
|
||||||
return video.currentTime;
|
return video.currentTime;
|
||||||
case 'seek':
|
case 'seek':
|
||||||
video.currentTime = variable_value;
|
video.currentTime = variable_value;
|
||||||
@ -154,7 +154,7 @@ FLASH_JS = u"""
|
|||||||
break;
|
break;
|
||||||
case 'length':
|
case 'length':
|
||||||
return flashMovie.TotalFrames();
|
return flashMovie.TotalFrames();
|
||||||
case 'currentTime':
|
case 'current_time':
|
||||||
return flashMovie.CurrentFrame();
|
return flashMovie.CurrentFrame();
|
||||||
case 'seek':
|
case 'seek':
|
||||||
// flashMovie.GotoFrame(variable_value);
|
// flashMovie.GotoFrame(variable_value);
|
||||||
@ -385,25 +385,25 @@ class WebkitPlayer(MediaPlayer):
|
|||||||
"""
|
"""
|
||||||
controller = display.controller
|
controller = display.controller
|
||||||
if controller.media_info.is_flash:
|
if controller.media_info.is_flash:
|
||||||
currentTime = display.frame.evaluateJavaScript(u'show_flash("currentTime");')
|
current_time = display.frame.evaluateJavaScript(u'show_flash("current_time");')
|
||||||
length = display.frame.evaluateJavaScript(u'show_flash("length");')
|
length = display.frame.evaluateJavaScript(u'show_flash("length");')
|
||||||
else:
|
else:
|
||||||
if display.frame.evaluateJavaScript(u'show_video("isEnded");'):
|
if display.frame.evaluateJavaScript(u'show_video("isEnded");'):
|
||||||
self.stop(display)
|
self.stop(display)
|
||||||
currentTime = display.frame.evaluateJavaScript(u'show_video("currentTime");')
|
current_time = display.frame.evaluateJavaScript(u'show_video("current_time");')
|
||||||
# check if conversion was ok and value is not 'NaN'
|
# check if conversion was ok and value is not 'NaN'
|
||||||
if currentTime and currentTime != float('inf'):
|
if current_time and current_time != float('inf'):
|
||||||
currentTime = int(currentTime * 1000)
|
current_time = int(current_time * 1000)
|
||||||
length = display.frame.evaluateJavaScript(u'show_video("length");')
|
length = display.frame.evaluateJavaScript(u'show_video("length");')
|
||||||
# check if conversion was ok and value is not 'NaN'
|
# check if conversion was ok and value is not 'NaN'
|
||||||
if length and length != float('inf'):
|
if length and length != float('inf'):
|
||||||
length = int(length * 1000)
|
length = int(length * 1000)
|
||||||
if currentTime > 0:
|
if current_time > 0:
|
||||||
controller.media_info.length = length
|
controller.media_info.length = length
|
||||||
controller.seekSlider.setMaximum(length)
|
controller.seekSlider.setMaximum(length)
|
||||||
if not controller.seekSlider.isSliderDown():
|
if not controller.seekSlider.isSliderDown():
|
||||||
controller.seekSlider.blockSignals(True)
|
controller.seekSlider.blockSignals(True)
|
||||||
controller.seekSlider.setSliderPosition(currentTime)
|
controller.seekSlider.setSliderPosition(current_time)
|
||||||
controller.seekSlider.blockSignals(False)
|
controller.seekSlider.blockSignals(False)
|
||||||
|
|
||||||
def get_info(self):
|
def get_info(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user