fix #847 (<i> tag in subtitle); test for before looping over it

This commit is contained in:
rlx 2012-06-15 19:50:04 +00:00
parent 2a58661c9a
commit a87d193ac4

View file

@ -1645,7 +1645,7 @@ Ox.VideoPlayer = function(options, self) {
} }
function hideMarkers() { function hideMarkers() {
Ox.forEach(self.$posterMarker, function(marker) { self.$posterMarker && Ox.forEach(self.$posterMarker, function(marker) {
marker.hide(); marker.hide();
}); });
Ox.forEach(self.$pointMarker, function(markers) { Ox.forEach(self.$pointMarker, function(markers) {
@ -1932,7 +1932,7 @@ Ox.VideoPlayer = function(options, self) {
function setMarkers() { function setMarkers() {
//Ox.Log('Video', 'SET MARKERS', self.options.position, self.options['in'], self.options.out, self.$pointMarker); //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) isEqual(self.options.position, self.options.posterFrame)
? marker.show() : marker.hide(); ? marker.show() : marker.hide();
}); });
@ -2079,7 +2079,7 @@ Ox.VideoPlayer = function(options, self) {
//Ox.Log('Video', 'setSubTx', self.subtitle, self.options.find) //Ox.Log('Video', 'setSubTx', self.subtitle, self.options.find)
self.$subtitle.html( self.$subtitle.html(
self.subtitle self.subtitle
? Ox.highlight(self.subtitle, self.options.find, 'OxHighlight') ? Ox.highlight(self.subtitle, self.options.find, 'OxHighlight', true)
.replace(/\n/g, '<br/>') .replace(/\n/g, '<br/>')
: '&nbsp;<br/>&nbsp;' : '&nbsp;<br/>&nbsp;'
// FIXME: weird bug, only in fullscreen, only in chrome // FIXME: weird bug, only in fullscreen, only in chrome