IE7 Flash Video Troubles -- "Click to Activate"

gdfwilliams

Joined: 2007-03-13
Posts: 20
Posted: Sun, 2007-03-18 00:28

First off, thanks to all who have helped to develop G2. Fantastic work from a great community.

I have the Flash Video module installed and am running into a minor issue in IE7. When I load a video page, the flash player does not activate until the user clicks it -- "Click to activate and use this control". (See attached GIF.)

Sample URL:
http://www.alyandgreg.com/main.php?g2_itemId=3270

The weird piece of this puzzle: I also have the MP3 Audio module installed, and that Flash player loads without having to click to activate it:

http://www.alyandgreg.com/main.php?g2_itemId=3246

Has anyone seen/solved this issue? I have not been able to find a definitive solution in this forum.

Thanks!

GDW

AttachmentSize
click_to_activate.gif21.31 KB
 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2007-03-18 01:37
 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2007-03-18 04:09

You can use SWFObject.
you would need to replace the sprintf in gallery2/modules/flashvideo/classes/FlashVideoRenderer.class

return sprintf(
		'<script type="text/javascript">
		// <![CDATA[
		function divResize(id, nw, nh) {
			var obj = document.getElementById(id);
			obj.style.width = nw + "px";
			obj.style.height = nh + "px";
		}
		// ]]>
		</script>
		<div id="flashvideo" style="align:left;width:525px;height:292px">
		<div id="soContent" style="width: 100%%; height: 100%%">
		You can place alternate content or a message for your users to see if they do not have flashplayer/or the correct version or javascript enabled. This content gets overwritten by SWFObject.</div>
		</div>
		<script type="text/javascript">
		// <![CDATA[
		var so = new SWFObject("%s", "%s", "100%%", "100%%", "8.0", "ffffff");
		so.addParam("flashVars","%s");
		so.addParam("wmode","transparent");
		so.write("soContent");
		// ]]>
		</script>',

		$playerUrl,!empty($params['id']) ? $params['id'] : 'movie', $flashVars);

You would also need to include SWFObject somewhere in the head of your site.
<script type="text/javascript" src="http://www.yoursite.com/swfobject.js"></script>

Hope this helps:)

-s
FlashYourWeb and Your Gallery

 
gdfwilliams

Joined: 2007-03-13
Posts: 20
Posted: Sun, 2007-03-18 03:39

suprsidr -- When I make the change you suggested, things go from bad to worse... The album pages quit rendering any flash entries and the FLV item pages render the following source code:

Quote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8"></HEAD>
<BODY></BODY></HTML>

I have since undone your suggested fix, but can reinstate if you want to see it in action...

Dave -- Thanks for the links. I had tried searching Google and implemented the suggestion at http://www.amarasoftware.com/flash-problem.htm without much luck. When I call ieupdate.js from after </object>, the player loads immediately, but the object source becomes undefined.

Any other thoughts would be much appreciated.

Thanks again.

GDW

 
gdfwilliams

Joined: 2007-03-13
Posts: 20
Posted: Sun, 2007-03-18 03:55

Guys,

I think that the issues described above were due to permissions errors when updating files. Let me continue to futz with this and I'll post my progress if/when I make any. In the meantime, I've just gotten FFMPEG installed, so that will help in the short-term.

Thanks again for your help. I'll post my solution when I figure it out.

GDW

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2007-03-18 04:11

Sorry, I should have tested my code before I submitted, fixed now.
-s
FlashYourWeb and Your Gallery

 
bitjumper

Joined: 2004-09-10
Posts: 9
Posted: Fri, 2007-03-23 00:57

So my site has the same problem. Guests to my site are getting confused, writing to me that they couldn't get the video to work.

Was there a reason this wasn't handled in the Gallery 2.2 release? I feel like maybe something is configured wrong with my site. Is everyone having this problem?

So let's say I need to go in and modify the code. I wasn't clear which of the options described above is best. Nor am I familiar with the Gallery code to know where all I need to edit things. Could I ask nicely for explicit instructions what needs to be edited? (I'm proficient at bash, vi, and getting files to my installation.) Also, what would be the best way to handle this in the future when I upgrade Gallery -- make the changes again?

Thanks,
Erik

p.s. I greatly appreciate the hard work folks are doing with Gallery. My family is really getting into uploading their own pictures. Video is the next big interest of theirs, so I'd like to get it to work nicer.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2007-03-23 03:04

Ok
I've rewritten a FlashVideoRenderer.class with all the required changes, included the proper javascript files, and zipped it all up for you.
just unzip in gallery2/modules
Enjoy :)

-s
FlashYourWeb and Your Gallery

 
bitjumper

Joined: 2004-09-10
Posts: 9
Posted: Fri, 2007-03-23 05:09

Suprsidr,

Excellent! It worked! Thanks so much! Great job!

A couple of hints for others.

The "just unzip in gallery2/modules" is replacing & adding a few files suprsidr has zipped up in gallery2/modules/flashvideo/. You can use FTP if you copy each of the files in the zipped package into their respective places (mirroring where they are in the zipped file.) I actually did this since it was a tad easier for me (as my Mac unzipped the file already). BTW, I also backed up the old gallery2/modules/flashvideo/ directory beforehand.

At first it didn't work for me (still had the blank box). So I cleared my browser's and Gallery's performance caches and then it worked great.

I'm just so happy. Now I don't have to give any explainations how to play the videos. It just works as it should. Hopefully this will get into the next Gallery release.

Thanks,
Erik

 
mischa

Joined: 2002-08-20
Posts: 20
Posted: Sat, 2007-04-07 22:42

nice :-)

thanks

 
vwpete

Joined: 2007-01-16
Posts: 12
Posted: Fri, 2007-04-20 11:01

welldone! just uploaded it to my site, U rock thanx

 
vwpete

Joined: 2007-01-16
Posts: 12
Posted: Sat, 2007-04-21 03:40

oops no you don't rock, well ya maybe ya do but i am finding that when i apply this the video player box no longer resizes

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2007-04-21 10:50

Did you try this one from 4 posts up?
-s
FlashYourWeb and Your Gallery

 
vwpete

Joined: 2007-01-16
Posts: 12
Posted: Sun, 2007-04-22 04:10

Yes I have. I was thinking maybe the xtreme theme that I am using was causing the prob but changing back to matrix did not help, Wot I have done as a work around is change the default swf player to flvpayer and set the default player width and height to 640 x 640 and it works fine’ish as none or my movies are bigger than this size, it also auto plays but unfortunately the layout gets a bit broken and I don’t think the play back is as good.

you can check this out at http://vwpete.redcloudtech.com.au/photo/main.php?g2_itemId=13937

As a side note neither your modified Flashvideo plug-in or the original can actually use the flowplayer I tried that and it did not work at all

I have posted in the xtreme theme area http://gallery.menalto.com/node/61330?page=2
this has all my server details.
I did try and fix the width and Hieght of the default g2 player to 640 x640 but it seemed to ignore my settings.

cheers

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2007-04-22 11:55

There is no reason the resize should stop working only in xtreme. the flvplayer calls an external js function to resize a specific div which the flv module writes to page.
So the function is there, and the div.
Did you clear gallery's cache (including any performane cache) and your browser's cache as well?
I showed another how to use flowplayer http://gallery.menalto.com/node/61786
-s
FlashYourWeb and Your Gallery

 
vwpete

Joined: 2007-01-16
Posts: 12
Posted: Mon, 2007-04-23 02:34

Cheers for responding

Weird but yes I have removed the browser cache and gallery is/was working with no caching including .tpl files and I even ran all maintenance tools, when I replace your FlashVideoRender.class with the original the G2flv.swf player works fine and resizes fine, but “click to activate” comes back, put your FlashVideoRender.class in place “click to activate” is removed but the G2flv.swf stays at its default size with the large/normal resize buttons not working the video playback does work but just all small and skewed.

I got flowplayer working using your instructions (nice one ) and interestingly the many resize options within the player actually worked with click to activate disabled.

So anyways I just don’t know, I think I will have a look around for an older G2flv.swf maybe that’s me prob.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2007-04-29 02:26

@Wayne:
Are you going to submit the change for review?
We could well use the Eolas fix in the official versions of the flash / mp3 modules.

Are Java applets also affected by the Eolas issue? Can't remember. If so, the JS file could probably part of core or in lib/javascript/ such that not all such modules have to include the same js file everywhere.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2007-04-29 02:51

@valiant
Yes I do plan to submit an update for DP.
Sorry, been busy getting married out of the country past couple weeks - just back today.
There are a couple of things I'm still looking into.
first - The creators of SWFObject and UFO are working on a new concept which (originally anyways)is supposed to work for all embed type objects. I prefer SWFObject myself but if you like UFO...?
Second - with the fullscreen capabilities of flash, I'm considering flash version detection and either scaling the div like current or going true fullscreen depending on the user's flash version.
And I want to get rid of the player's built in dropshadow and square it off. The new fullscreen mode does not allow for wmode=transparent.
AND eliminate some of the unecessary masks we currently use in the player as they eat plenty of resources.
Too much??
-s
FlashYourWeb and Your Gallery

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2007-04-29 12:28

Both of those scripts look pretty good.
I haven't used either and I don't know what drawbacks UFO has.

What I like about UFO is that it's for all embed/object types, not just for SWF.

I think you should start by adding what ever script you prefer to both modules (video and mp3).
Later, we'll add UFO or any other general purpose embed script to G2 and then we can use that for all object/embed content (swf, applets, embedded non-flash video players, ...).

> Too much??

Smaller, incremental changes make both of our lifes easier, but it doesn't sound like that much. It should be fine for a review.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
kasmoie

Joined: 2007-04-21
Posts: 20
Posted: Sun, 2007-05-06 21:11

I haven't been able to get this to work. Internet exploder just tells me: Javascript required to view this content. And in firefox the video gets compressed again...

I added the java script tag into the header file also, didn't do anything.

aughhh and now that I've put back the old files I'm getting random text on my page:

movie’, $flashVars, $expressInstallUrl); }
}
?>

....so confused. I feel as if I'm being attacked by randomness!

www.iamkosta.org

EDIT: I figured out what the random text was about. Apparently my FTP client likes to MERGE documents that are similar together instead of overwriting them... Strangest thing ever. Unfortunately the IE fix doesn't work for me.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2007-05-06 21:23
bitjumper wrote:
A couple of hints for others.

The "just unzip in gallery2/modules" is replacing & adding a few files suprsidr has zipped up in gallery2/modules/flashvideo/. You can use FTP if you copy each of the files in the zipped package into their respective places (mirroring where they are in the zipped file.) I actually did this since it was a tad easier for me (as my Mac unzipped the file already). BTW, I also backed up the old gallery2/modules/flashvideo/ directory beforehand.

At first it didn't work for me (still had the blank box). So I cleared my browser's and Gallery's performance caches and then it worked great

-s
FlashYourWeb and Your Gallery

 
JamesTX

Joined: 2007-05-08
Posts: 3
Posted: Tue, 2007-05-08 00:51

I am having a issue...
I am vary new this and have looked for an answer for this but I can not find it.
After I have applied the SWFObject fix supplied by superdr my movies are distorted.
At first I thought that I might have the do with the way that they where encoded ffmpeg from avi.
But then I ran flvtool2 in the file to try to correct the issue.
I have fumbled around with the settings in the FlashVideoRenderer.class file and have only made my self more confused.
The movie was encoded at 320X240 and it looks like it is being squeezed in to a much smaller box like 540X120...
I am using the carbon theme but I have changed back to the “Default” and it has not made a deference.
I have also cleared the cache in IE 7 and in the Galley2 Admin page.
Any help would be grand.
Thx,
James

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2007-05-08 00:49

url to a sample video?

-s
FlashYourWeb and Your Gallery

 
JamesTX

Joined: 2007-05-08
Posts: 3
Posted: Tue, 2007-05-08 02:29

FYI: this also fixed the "Large" and "Normal" button issue.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2007-05-08 01:32

Ok, the problem seems to be a cross domain issue.
your gallery is at www.yoursite.com/gallery...
and the player is at gallery.yoursite.com...
try this:
in gallery2/modules/flashvideo/classes/FlashVideoRenderer.class
line 147 directly above:
so.addParam("wmode","transparent");
add:
so.addParam("allowScriptAccess","always");

see it working here.

-s

FlashYourWeb and Your Gallery

 
JamesTX

Joined: 2007-05-08
Posts: 3
Posted: Tue, 2007-05-08 01:54

That works like a charm!
Thanks for you effort and time!!!
-James

 
vwpete

Joined: 2007-01-16
Posts: 12
Posted: Wed, 2007-05-09 11:06
suprsidr wrote:
Ok, the problem seems to be a cross domain issue.
your gallery is at www.yoursite.com/gallery...
and the player is at gallery.yoursite.com...
try this:
in gallery2/modules/flashvideo/classes/FlashVideoRenderer.class
line 147 directly above:
so.addParam("wmode","transparent");
add:
so.addParam("allowScriptAccess","always");

see it working here.

-s

FlashYourWeb and Your Gallery

Nice one that fixed my prob too, as i was using a subdomain

cheers

 
medstudent

Joined: 2006-12-20
Posts: 4
Posted: Thu, 2007-05-10 08:11

Thanks suprsidr for the fix! However, I'm having problems uploading the new files from dirs "classes" and "lib." I tried replacing them in both cPanel X and also using ftp to either overwrite or delete the files. I'm getting an error that says "Access denied" and "Insufficient Permissions" I tried changing from File Locking to Database Locking, with no avail. Any ideas? Thanks guys.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2007-05-10 11:33

Your files are probably owned by your webserver group, common if you use the preinstaller or some other install script.
try Bharat's Cleanup Script to change the permissions or I think the preinstaller itself has the same functionality.

-s
FlashYourWeb and Your Gallery

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2007-05-10 16:37

Yes the preinstllaer has a tool as well as /lib/support:
http://codex.gallery2.org/Gallery2:FAQ#How_can_I_upload_a_theme_or_module_via_FTP_when_I_used_the_preinstaller.3F

Dave
____________________________________________
Blog & G2 || floridave - Gallery Team

 
medstudent

Joined: 2006-12-20
Posts: 4
Posted: Thu, 2007-05-10 23:36

Thanks suprsidr!

Bharat's Cleanup Script did it. Everything works smoothly now. Thanks again!

 
aloalo

Joined: 2007-05-19
Posts: 2
Posted: Wed, 2007-05-23 15:26

Thanks! It works!

 
DawMatt

Joined: 2007-06-20
Posts: 10
Posted: Fri, 2007-06-29 04:21

Hi,

Not having much luck at all here. As advised in this thread ( http://gallery.menalto.com/node/65945#comment-239941 ) I came here for suggestions on how to make the Flash video player respond to controls. Unfortunately I'm still having inconsistent issues even after applying these suggestions.

Downloaded the zip above and expanded it on my PC, then FTPed to the modules directory, making sure it overwrote the pre-existing files. File permissions ended up as 664, and I don't use the preinstaller.

Cleared my browser cache, used Maintenance functions to clean template caches, database caches and user sessions. Even use shift refresh/ctrl refresh keycombos to try to avoid using any proxy cached material.

In Firefox 2.0.0.4 I can play the video at the following link without issues:
http://photos.dawsons.id.au/v/Family_and_Friends/AlexatPlay/BJD_20070610_133022-Master.flv.html
If I try to access the page in IE 6 SP2:
- it looks like it is loading OK
- displays a modal dialog box stating:
"http://photos.dawsons.id.au/v/Family_and_Friends/AlexatPlay/BJD_20070610_133022-Master.flv.html: Operation aborted"
- redirects to a "Cannot find server or DNS Error" error page
In IE6 SP2 other videos in this same album exhibit the same issues.

After experiencing this issue I tried the cross-site change above "just in case", cleared caches/proxies/etc, then retested. Same problem.

I'm at a bit of a loss as to what to do now. If I can't reliably host videos on my site, and have family consistently able to access them, then there isn't much point in me having the site. Have had to expend a lot of effort to get to this point but still no joy. Would really like to see this problem dead and buried...

Thanks,
Matt

 
mbjr

Joined: 2005-11-03
Posts: 12
Posted: Tue, 2007-07-17 21:35

Thanks all, was very useful! :-)

 
joeshmoe

Joined: 2006-02-06
Posts: 3
Posted: Mon, 2007-08-13 14:30

Worked like a dream. Thanks Suprsidr

 
RandomWhim

Joined: 2006-04-22
Posts: 31
Posted: Wed, 2007-10-10 15:08
suprsidr wrote:
I've rewritten a FlashVideoRenderer.class with all the required changes, included the proper javascript files, and zipped it all up for you.

You're the best suprsidr! Worked for me.

 
islandcastaway
islandcastaway's picture

Joined: 2005-07-19
Posts: 15
Posted: Sun, 2007-10-21 17:02

suprsidr your zip package is excellent!
i cant seem to get it to work with flowplayer thou.
do you have a rewritten FlashVideoRenderer.class for that?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2007-10-21 17:21

Sorry I don't with swfObject.
But I did guide someone else with FP setup here.

-s
FlashYourWeb and Your Gallery

 
islandcastaway
islandcastaway's picture

Joined: 2005-07-19
Posts: 15
Posted: Sun, 2007-10-21 17:48

I got it, found your fix in another post, you should really update ur .zip fixes to replace to old

$playerUrl = $urlGenerator->generateUrl(
array('href' => 'modules/flashvideo/lib/FlowPlayer.swf'),
array('forceFullUrl' => true));
$flashVars = sprintf('baseURL=%s&videoFile=%s%%26x=&autoPlay=true&loop=false',
urlencode(dirname($src)), urlencode(basename($src)));
$extraAttr = ' wmode="transparent"';

with

$playerUrl = $urlGenerator->generateUrl(
array('href' => 'modules/flashvideo/lib/FlowPlayerWhite.swf'),
array('forceFullUrl' => true));
$flashVars = sprintf('config={videoFile: \'%s\'}&autoPlay=true&loop=false',
urlencode($src));
$extraAttr = ' wmode="transparent"';

 
Banta

Joined: 2006-04-18
Posts: 35
Posted: Sat, 2007-12-01 22:29

Suprsidr,

I have not told you this for a while because I have been out of the loop but,

YOU STILL ROCK!!

You still amaze me whenever I need help. Your username is always associated with the answer I was looking for.

I just upgraded my Gallery installation. I still had the FLV player with the bouncing ball animation from way back when!

Your files fixed the issue I was having.

Did I read somehwere that there is an FFMPEG upgrade that works with On2 VP6? That would be the next thing I would like to tackle.

Thanks again! Three Cheers for you!

Banta

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2007-12-01 22:46

Thanks :)
The upcoming G2.3 release includes this fix as well.
Also I have several ffmpeg versions on mysite that may work for you depending on your OS.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
Banta

Joined: 2006-04-18
Posts: 35
Posted: Sat, 2007-12-01 23:16

You're welcome. It is well deserved.

I have a question for you. I am trying to follow this thread...

http://gallery.menalto.com/node/66745

about getting the rss feeds to spit out the media content format.

What is the easiest way to replace the default rss feeds with this?

Your help is greatly appreciated.

Banta

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2007-12-01 23:32

Last check, the latest version of the rss module contained some mediaRss, but it was incomplete. But you may want to try it.
I've switched my flash apps over to mediaRss though.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
Banta

Joined: 2006-04-18
Posts: 35
Posted: Sat, 2007-12-01 23:55

So, not to be ignorant,

Just install one of your apps, like E2. How would I then access the media Rss then?

Sorry this is new to me.

Thank you

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2007-12-02 00:04

E2 includes mediaRss.php which is an external app that uses G2's embed api to access your gallery.
mediaRss.php is used like my xml.php so its not actually part of gallery.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
patriquepagano

Joined: 2008-06-29
Posts: 4
Posted: Wed, 2008-07-02 14:44

hello friend! I want setup my family photo album but dont get work jw flvplayer4 a read many times in forum.. I try your explanations but I think are old to version4..

please see: http://www.suprematecnologia.com/gallery/v/get_video-video_id_bysgyg_30vg.flv.html

my FlashVideoRenderer.class is here for download:

www.suprematecnologia.com/FlashVideoRenderer.class

With your FlashVideoRenderer.class only works very old jwflplayer... the new v4 only show the flash but dont play the video..

thanks!

 
JT101

Joined: 2010-02-06
Posts: 48
Posted: Tue, 2010-02-09 16:04

Hi guys

I have uploaded the zip folder from suprsidr (THANKS!), and resized my video. [i]I have also downloaded and installed the latest flash player, and yet i am still getting errors.

You can see here: http://www.thebreadcrumbtrail.org/gallery

The first image is ok as this links to an album.

The second image as you can see links to an FLV video which plays fine (But how do I resize the frame to fit the video size?)

The third video is still looking for some plugin. This is an MP4 video

Finally I have uploaded an MP3 as a link and it doesn't show anything

Any ideas anyone?

Thanks so much

James

 
JT101

Joined: 2010-02-06
Posts: 48
Posted: Tue, 2010-02-09 16:16

Incidently, the MP4 video works in IE, but not Firefox.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2010-02-09 16:27

What a mess that page is.
How are you posting those gallery items to that page?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
JT101

Joined: 2010-02-06
Posts: 48
Posted: Tue, 2010-02-09 16:51

Ok, I had a nextgen gallery in there aswell which didn't help. Just got rid of that.

I have an MP3, an MP4, and an FLV uploaded to my gallery

I'm simply using the TInyMCE button in the page editor in wordpress to insert a thumbnail of each of the items

THanks

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2010-02-09 17:03

But its not inserting thumbnails its trying to embed the whole object and poorly at that.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2