Fix issue with duplicate video frames.
Whenever you had more than one video in a row, it would not clear the old video before showing the next, resulting in multiple video frames being shown, only getting cleared whenever a photo appeared. Big irritation, small fix (-:
This commit is contained in:
parent
05475b6ed0
commit
e4244d086d
@ -187,13 +187,13 @@ $(document).ready(function() {
|
|||||||
height = currentPhoto.size[1];
|
height = currentPhoto.size[1];
|
||||||
|
|
||||||
if (currentPhoto.mediaType == "video") {
|
if (currentPhoto.mediaType == "video") {
|
||||||
|
$("#video-box-inner").empty();
|
||||||
if (!Modernizr.video) {
|
if (!Modernizr.video) {
|
||||||
$('<div id="video-unsupported"><p>Sorry, your browser doesn\'t support the HTML5 <video> element!</p><p>Here\'s a <a href="http://caniuse.com/video">list of which browsers do</a>.</p></div>').appendTo('#video-box-inner');
|
$('<div id="video-unsupported"><p>Sorry, your browser doesn\'t support the HTML5 <video> element!</p><p>Here\'s a <a href="http://caniuse.com/video">list of which browsers do</a>.</p></div>').appendTo('#video-box-inner');
|
||||||
}
|
}
|
||||||
else if (!Modernizr.video.h264) {
|
else if (!Modernizr.video.h264) {
|
||||||
$('<div id="video-unsupported"><p>Sorry, your browser doesn\'t support the H.264 video format!</p></div>').appendTo('#video-box-inner');
|
$('<div id="video-unsupported"><p>Sorry, your browser doesn\'t support the H.264 video format!</p></div>').appendTo('#video-box-inner');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$(window).unbind("resize", scaleVideo);
|
$(window).unbind("resize", scaleVideo);
|
||||||
$(window).unbind("resize", scaleImage);
|
$(window).unbind("resize", scaleImage);
|
||||||
videoSrc = photoFloat.videoPath(currentAlbum, currentPhoto);
|
videoSrc = photoFloat.videoPath(currentAlbum, currentPhoto);
|
||||||
@ -207,8 +207,7 @@ $(document).ready(function() {
|
|||||||
$("#video-box-inner").css('height', height + 'px').css('margin-top', - height / 2);
|
$("#video-box-inner").css('height', height + 'px').css('margin-top', - height / 2);
|
||||||
$("#photo-box").hide();
|
$("#photo-box").hide();
|
||||||
$("#video-box").show();
|
$("#video-box").show();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
width = currentPhoto.size[0];
|
width = currentPhoto.size[0];
|
||||||
height = currentPhoto.size[1];
|
height = currentPhoto.size[1];
|
||||||
if (width > height) {
|
if (width > height) {
|
||||||
|
Loading…
Reference in New Issue
Block a user