Welcome Guest Search | Active Topics | Members | Log In | Register
Cannot view FLV files Options
bobsts
Posted: Wednesday, July 01, 2009 12:02:59 AM
Rank: Member

Joined: 4/19/2009
Posts: 8
Location: Ohio
I did all that was dcoumented in an earlier post titled:
How to get the JW FLV media player working on GSP/w IIS7

My version is: Gallery Server Pro version: v2.3.3432

If I look at my generated source after trying to play the video I get the snippet:

<div id="ctl00_mainContent_gallery1_ctl00_mediaobjectview1_pnlMediaObject" class="moContainer">
<p id='preview'>IE: The player will show in this paragraph</p>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject('player.swf','player','400','300','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=/gs/mediaobjects/david's gallery/Wedding Videos/NewlyWedFirstDance_F8_Lg.flv');
s1.write('preview');
</script>
</div>
<div id="ctl00_mainContent_gallery1_ctl00_mediaobjectview1_pnlMediaObjectTitle" title="Double click to edit" class="editableContentOff" onmouseover="this.className='editableContentOn';" onmouseout="this.className='editableContentOff';" ondblclick="editCaption()">

<div id="ctl00_mainContent_gallery1_ctl00_mediaobjectview1_moTitle" class="mediaObjectTitle">NewlyWedFirstDance_F8_Lg.flv</div>

</div>

The path is correct for my website. The player.swf and swfobject.js have been saved in my bin folder, in my gs folder and in my gs/mediaobjects folder. I don't know where to actually put it but figure it should go in one of these places.

The only thing I see is the text "IE: The player will show in this paragraph" or "DEFAULT: The player will show in this paragraph" depending on which browser I use. In both cases I do see the caption that I have filled in for the video.

What else do I need to do to get this to play my videos?
Roger Martin
Posted: Wednesday, July 01, 2009 8:45:21 AM
Rank: Administration

Joined: 8/3/2007
Posts: 1,698
Location: Fort Atkinson, WI
I believe you need to put swfobject.js and player.swf at the root of the web site, at the same level as default.aspx.

Let me know if that doesn't work, and I'll dig into it a little more.


Roger Martin
Creator and Lead Developer of Gallery Server Pro
bobsts
Posted: Wednesday, July 01, 2009 6:40:48 PM
Rank: Member

Joined: 4/19/2009
Posts: 8
Location: Ohio
Roger,
That did not work to put the player.swf and swfobject.js into the web root; actually I already had it there.

I hardcoded my Galleryserverpro.config to pass the filename in and then I dropped that file into the web root and it worked then.

Is there somewhere that I need to define what the {MediaObjectAbsoluteUrlNoHandler} maps to? Seems as if the file name needs to be a simple name and that it knows to look in the web root.

I don't know if it matters, I am running Flash Player 10.

I created the flash files with Sorensen Squeeze 5.0.

Regards,
Bob


So my modified mediaobject tag looks like what is below (of course all files end up playing the same one I used for test):
<mediaObject
mimeType="video/x-flv">
<browsers>
<browser
id="ie"
htmlOutput="&lt;p id='preview'&gt;IE: The player will show in this paragraph&lt;/p&gt;&#xD;&#xA;&lt;script type=&quot;text/javascript&quot; src=&quot;swfobject.js&quot;&gt;&lt;/script&gt;&#xD;&#xA;&lt;script type=&quot;text/javascript&quot;&gt;&#xD;&#xA;var s1 = new SWFObject('player.swf','player','400','300','9');&#xD;&#xA; s1.addParam('allowfullscreen','true');&#xD;&#xA;s1.addParam('allowscriptaccess','always'); &#xD;&#xA;s1.addParam('flashvars','file=NewlyWedFirstDance_F8_512K.flv');&#xD;&#xA;s1.write('preview');&#xD;&#xA;&lt;/script&gt;" />
<browser
id="default"
htmlOutput="&lt;p id='preview'&gt;DEFAULT: The player will show in this paragraph&lt;/p&gt;&#xD;&#xA;&lt;script type=&quot;text/javascript&quot; src=&quot;swfobject.js&quot;&gt;&lt;/script&gt;&#xD;&#xA;&lt;script type=&quot;text/javascript&quot;&gt;&#xD;&#xA;var s1 = new SWFObject('player.swf','player','400','300','9'); &#xD;&#xA;s1.addParam('allowfullscreen','true');&#xD;&#xA;s1.addParam('allowscriptaccess','always'); &#xD;&#xA;s1.addParam('flashvars','file={MediaObjectAbsoluteUrlNoHandler}');&#xD;&#xA;s1.write('preview');&#xD;&#xA;&lt;/script&gt;" />
</browsers>
</mediaObject>
Roger Martin
Posted: Wednesday, July 01, 2009 8:30:50 PM
Rank: Administration

Joined: 8/3/2007
Posts: 1,698
Location: Fort Atkinson, WI
You said that placing the .flv file in the root of the web app and then specifying the filename in the config file works. What if you place the .flv file at a lower level - like the mediaobjects directory - and then specifying the path to it in the config file? Example: your config might look like this:

...
s1.addParam('flashvars','file=/gs/mediaobjects/NewlyWedFirstDance_F8_512K.flv');
...

Actually, now that I review your original post, I may have spotted the problem. Look closely at this line:

s1.addParam('flashvars','file=/gs/mediaobjects/david's gallery/Wedding Videos/NewlyWedFirstDance_F8_Lg.flv');

The apostrophe in "david's" is messing up the javascript. Try adjusting your album titles to eliminate apostrophes and spaces and see if that makes a difference.

The parameter {MediaObjectAbsoluteUrlNoHandler} doesn't expect to be used in javascript so it is not escaped. Off the top of my head I am not sure of a fix other than to not use invalid characters in your album title.


Roger Martin
Creator and Lead Developer of Gallery Server Pro
bobsts
Posted: Wednesday, July 01, 2009 9:49:37 PM
Rank: Member

Joined: 4/19/2009
Posts: 8
Location: Ohio
Roger,
I didn't notice that I'd even used apostrophe's, but removing them solved the problem.

Thanks!

Bob
Roger Martin
Posted: Thursday, July 02, 2009 11:02:51 AM
Rank: Administration

Joined: 8/3/2007
Posts: 1,698
Location: Fort Atkinson, WI
I am trying to implement this technique for possible inclusion in a future version of GSP, but I keep getting a "SWFObject is undefined" error. I have verified that swfobject.js is loaded in the browser, so I don't understand why it doesn't work.

I searched the forums at http://www.longtailvideo.com and http://code.google.com/p/swfobject/ without success.

Any ideas? Do you have an URL to a working installation I can look at?


Roger Martin
Creator and Lead Developer of Gallery Server Pro
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.2 (NET v2.0) - 9/27/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.