forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: Nerd3D on August 05, 2010, 07:02:28 am

Title: This version does not play Quicktime gallery entries
Post by: Nerd3D on August 05, 2010, 07:02:28 am
I've tried in IE 8 and FireFox 3.6.8. Neither will play quicktime movies that worked in the 1.4 version of CPG. The problem in firefox is that the embed is totally missing. Firefox still uses the Embed within the object tag. I suspect the mime type is wrong too. In the past it was always "video/quicktime", not "video/x-quicktime" Changing the mime type gets it to at least stop asking to install the plugin that is already installed but it still doesn't work. Probably because of the missing embed.

I suspect this is probably already fixed but I just failed to search in the right spot.

Title: Re: This version does not play Quicktime gallery entries
Post by: Nerd3D on August 05, 2010, 07:39:28 am
Massing around, feeling brave I hacked a bit of code from the 1.4 themes.inc.php into the same file from 1.5 and it seems to have fixed the problem. At line 3435 I found this:
Code: [Select]
            $pic_html  = '<object id="'.$player['id'].'" '.$player['classid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
            $pic_html .= "<param name=\"autostart\" value=\"$autostart\" /><param name=\"src\" value=\"". $picture_url . "\" />";
            $pic_html .= '</object><br />' . $LINEBREAK;

I changed it to this:
Code: [Select]
            $pic_html  = '<object id="'.$player['id'].'" '.$player['classid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
            $pic_html .= "<param name=\"autostart\" value=\"$autostart\" /><param name=\"src\" value=\"". $picture_url . "\" />";
            $pic_html .= '<embed '.$image_size['whole'].' src="'. $picture_url . '" autostart="'.$autostart.'" '.$player['mime'].'></embed>';
            $pic_html .= '</object><br />' . $LINEBREAK;
Which came right out of the older file. Was the embed line removed for a reason? I just don't want to break something else.
Title: Re: This version does not play Quicktime gallery entries
Post by: Nerd3D on August 05, 2010, 09:03:33 am
Nope there's more wrong here. The classid is not getting into the page. If you look at the source of a rendered page there is no classid. That's going to break most everything.
Title: Re: This version does not play Quicktime gallery entries
Post by: Nerd3D on August 06, 2010, 10:27:45 am
After a bit more poking I found the problem with the ClassID not being included. The array element is wrong. $player['classid'] does not exist. I was probably supposed to be $player['clsid'] which is where the class ID was stored.

Line 3435 in themes.inc.php needs to be changed to
Code: [Select]
$pic_html  = '<object id="'.$player['id'].'" '.$player['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
With this fix and the addition of the "embed" line from 1.4 I think I have all the media types working again and it's stopped constantly asking for plugins.
Title: Re: This version does not play Quicktime gallery entries
Post by: Αndré on September 03, 2010, 02:40:26 pm
Thank you. Committed in r7878 (http://coppermine.svn.sourceforge.net/viewvc/coppermine?revision=7878&view=revision).