Internet Explorer 11 detection for streaming

Forum for questions and support relating to the 1.25.x releases only.
Locked
gdulisse
Posts: 13
Joined: Thu Aug 16, 2012 11:46 am

Internet Explorer 11 detection for streaming

Post by gdulisse »

I have really had alot of issues with the auto browser detect in zoneminder. I don't think I was able to use it since IE 10 came out. So tonight I thought I would try to fix this once and for all.

My fix may not be complete but is better than nothing. I believe it should work for IE 10 but not tested yet.

Change the 1.25 code for includes/functions.php as follows and you will get cambozola to finally load properly

791,796c791
< if ( preg_match( '/Trident\/7.0; rv:11.0/', $_SERVER['HTTP_USER_AGENT'], $logVersion) )
< {
< $version = $logVersion[1];
< $browser = 'ie';
< }
< elseif ( preg_match( '/MSIE ([0-9].[0-9]{1,2})/', $_SERVER['HTTP_USER_AGENT'], $logVersion) )
---
> if ( preg_match( '/MSIE ([0-9].[0-9]{1,2})/', $_SERVER['HTTP_USER_AGENT'], $logVersion) )


Merry Christmas.
:lol: :lol: :D :D :D
gdulisse
Posts: 13
Joined: Thu Aug 16, 2012 11:46 am

Re: Internet Explorer 11 detection for streaming

Post by gdulisse »

So did some tests and to get it to work with IE 10 you need the following changes diff was against 1.25 version

Summary is that you need to use the object class instead of applet since IE 10 does not like it unsigned in the function outputHelperStream()
Then add new definition for IE 11 in function getBrowser()
Modify the MSIE detection so it catches IE 10 as well as older ones in function getBrowser().

393,402c393,401
< <object
< classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
< width="<?= $width ?>"
< height="<?= $height ?>"
< title="<?= $title ?>">
< <param name="code" value="com.charliemouse.cambozola.Viewer">
< <param name="archive" value="<?= ZM_PATH_CAMBOZOLA ?>">
< <param name="accessories" value="none"/>
< <param name="url" value="<?= $src ?>"/>
< </object>
---
> <applet id="<?= $id ?>" code="com.charliemouse.cambozola.Viewer"
> archive="<?= ZM_PATH_CAMBOZOLA ?>"
> align="middle"
> width="<?= $width ?>"
> height="<?= $height ?>"
> title="<?= $title ?>">
> <param name="accessories" value="none"/>
> <param name="url" value="<?= $src ?>"/>
> </applet>
792,797c791
< if ( preg_match( '/Trident\/7.0; rv:11.0/', $_SERVER['HTTP_USER_AGENT'], $logVersion) )
< {
< $version = $logVersion[1];
< $browser = 'ie';
< }
< elseif ( preg_match( '/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $logVersion) )
---
> if ( preg_match( '/MSIE ([0-9].[0-9]{1,2})/', $_SERVER['HTTP_USER_AGENT'], $logVersion) )


cheers
8) 8) 8)
Locked