|
|
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?
|
|
Rank: Administration
Joined: 8/3/2007 Posts: 1,993 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
|
|
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="<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=NewlyWedFirstDance_F8_512K.flv');
s1.write('preview');
</script>" /> <browser id="default" htmlOutput="<p id='preview'>DEFAULT: 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={MediaObjectAbsoluteUrlNoHandler}');
s1.write('preview');
</script>" /> </browsers> </mediaObject>
|
|
Rank: Administration
Joined: 8/3/2007 Posts: 1,993 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
|
|
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
|
|
Rank: Administration
Joined: 8/3/2007 Posts: 1,993 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
|
|
|
Guest |