From a87d193ac440d9d321253d0cc7b0836459cf2cd6 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Fri, 15 Jun 2012 19:50:04 +0000 Subject: [PATCH] fix #847 ( tag in subtitle); test for before looping over it --- source/Ox.UI/js/Video/VideoPlayer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Ox.UI/js/Video/VideoPlayer.js b/source/Ox.UI/js/Video/VideoPlayer.js index b7465bb4..fc1921c1 100644 --- a/source/Ox.UI/js/Video/VideoPlayer.js +++ b/source/Ox.UI/js/Video/VideoPlayer.js @@ -1645,7 +1645,7 @@ Ox.VideoPlayer = function(options, self) { } function hideMarkers() { - Ox.forEach(self.$posterMarker, function(marker) { + self.$posterMarker && Ox.forEach(self.$posterMarker, function(marker) { marker.hide(); }); Ox.forEach(self.$pointMarker, function(markers) { @@ -1932,7 +1932,7 @@ Ox.VideoPlayer = function(options, self) { function setMarkers() { //Ox.Log('Video', 'SET MARKERS', self.options.position, self.options['in'], self.options.out, self.$pointMarker); - Ox.forEach(self.$posterMarker, function(marker) { + self.$posterMarker && Ox.forEach(self.$posterMarker, function(marker) { isEqual(self.options.position, self.options.posterFrame) ? marker.show() : marker.hide(); }); @@ -2079,7 +2079,7 @@ Ox.VideoPlayer = function(options, self) { //Ox.Log('Video', 'setSubTx', self.subtitle, self.options.find) self.$subtitle.html( self.subtitle - ? Ox.highlight(self.subtitle, self.options.find, 'OxHighlight') + ? Ox.highlight(self.subtitle, self.options.find, 'OxHighlight', true) .replace(/\n/g, '
') : ' 
 ' // FIXME: weird bug, only in fullscreen, only in chrome