2dea3ba0 by Tom Johnson

Fix for try catch on Flash element

1 parent b6773f6f
...@@ -109,9 +109,7 @@ var ...@@ -109,9 +109,7 @@ var
109 return 1; // HAVE_METADATA 109 return 1; // HAVE_METADATA
110 }; 110 };
111 111
112 if(player.ha === "Flash") 112 player.currentTime = function(value) {
113 {
114 player.currentTime = function(value) {
115 if(value) { 113 if(value) {
116 try { 114 try {
117 player.el().getElementsByClassName('vjs-tech')[0].vjs_setProperty('currentTime', 0); 115 player.el().getElementsByClassName('vjs-tech')[0].vjs_setProperty('currentTime', 0);
...@@ -127,8 +125,7 @@ var ...@@ -127,8 +125,7 @@ var
127 return 0; 125 return 0;
128 } 126 }
129 } 127 }
130 }; 128 };
131 }
132 129
133 player.hls.selectSegmentByTime = function(time) { 130 player.hls.selectSegmentByTime = function(time) {
134 var index, currentSegment; 131 var index, currentSegment;
...@@ -245,12 +242,10 @@ var ...@@ -245,12 +242,10 @@ var
245 // update the duration 242 // update the duration
246 player.duration(parser.manifest.totalDuration); 243 player.duration(parser.manifest.totalDuration);
247 // Notify the flash layer 244 // Notify the flash layer
248 if (player.ha === "Flash") { 245 try {
249 try { 246 player.el().getElementsByClassName('vjs-tech')[0].vjs_setProperty('duration',parser.manifest.totalDuration);
250 player.el().getElementsByClassName('vjs-tech')[0].vjs_setProperty('duration',parser.manifest.totalDuration); 247 } catch (err) {
251 } catch (err) {
252 248
253 }
254 } 249 }
255 } 250 }
256 player.trigger('loadedmanifest'); 251 player.trigger('loadedmanifest');
......