Click here to register.
      
PBWG Banner


     Web Design, Templates, and Themes > is there a an audio/video gallery wobject?

is there a an audio/video gallery wobject?

User orenshani
Date 10/11/2008 2:36 am
Views 555
Rating 0    Rate [
|
]
Previous · Next
User Message
orenshani

Hi All,


I'm looking for a wobject, similar to the picture gallery that can show/play audio and video files (over an embedded video player like in YouTube, etc.), is there such a wobject that I can download from somewhere? if not, can I maybe modify the picture gallery wobject to support audio/video?


Thanks,

Oren

 

--- (Edited on 10/11/2008 2:36 am [GMT-0500] by orenshani) ---



Back to Top
Rate [
|
]
 
 
preaction

There is a plan to add movies to the Gallery, but I'm not sure on the timeline of it (so if you know Perl, you can feel free to go for it, we'll help you as we can).

Otherwise, the File asset has a "Flash" template, so if you already have .flv or .swf, you can use that template to display them. I believe the WebGUI TV does exactly this.

--- (Edited on 10/11/2008 9:43 am [GMT-0500] by preaction) ---



Back to Top
Rate [
|
]
 
 
orenshani

There is a plan to add movies to the Gallery, but I'm not sure on the timeline of it (so if you know Perl, you can feel free to go for it, we'll help you as we can).

Otherwise, the File asset has a "Flash" template, so if you already have .flv or .swf, you can use that template to display them. I believe the WebGUI TV does exactly this.

--- (Edited on 10/11/2008 9:43 am [GMT-0500] by preaction) ---

Okay, I think I found a simple and elegant way to play audio files, but I need a little help.

What I did was to upload a  flash-based mp3 player into my site and the I created a template to enable using it for audio files. i am using the xspf audio player and I created a template called MP3_file that looks like this:

<tmpl_if session.var.adminOn>
    <tmpl_if controls>
        <p><tmpl_var controls></p>
    </tmpl_if>
</tmpl_if>


<div>
    <object type="application/x-shockwave-flash" data="http://localhost:8082/home/bbjw-sitewide-stuff-images-etc/xspf-mp3-player?&song_url=http://localhost:8082/<tmpl_var fileUrl>&" style="height:auto;min-height:100px;width:100%;display:block;">
        <param name="movie" value="http://localhost:8082/home/bbjw-sitewide-stuff-images-etc/xspf-mp3-player?&song_url=http://localhost:8082/<tmpl_var fileUrl>&" />       
    </object>
</div>

 

That almost works. When I create a file pile wobject and load an mp3 file and define the MP3_file template to be used, the player is displayed but it does not accept the song_url parameter. The reason seem to be that the "&" signes that are requiered, are translated into '&amp;" in the generated HTML code.

Now, I know this is usually something that is quite easy to overcome, but I'd appreciate it if someone can give me a quick answer on how to do fix this problem in the template.

(this may be a good time to comment that the reason some of my questions might seem a little trivial is that this project is pretty much a first for me + I have very little time for it, so I need to try and save trial-and-error time that I would otherwise very much enjoy to spend Cool )

Many thanks,

Oren

--- (Edited on 10/13/2008 1:32 am [GMT-0500] by orenshani) ---

--- (Edited on 10/13/2008 1:34 am [GMT-0500] by orenshani) ---



Back to Top
Rate [
|
]
 
 
fdillon

You'll need to move your object code into a snippet and use an assetProxy to display it.

--- (Edited on 10/13/2008 2:04 pm [GMT-0500] by fdillon) ---



Back to Top
Rate [
|
]
 
 
orenshani

You'll need to move your object code into a snippet and use an assetProxy to display it.

--- (Edited on 10/13/2008 2:04 pm [GMT-0500] by fdillon) ---


Hmmm... That's cool... but still does not help me because  <tmpl_var fileUrl> is not handled correctly - If I check "process as a template" it is replaced with a null, if I don't check "process as a template" it is left as <tmpl_var fileUrl>

So what can I do? is there a way to pass the value of <tmpl_var fileUrl> into the snippet? on another variable maybe?

--- (Edited on 10/14/2008 1:36 am [GMT-0500] by orenshani) ---



Back to Top
Rate [
|
]
 
 
orenshani

Okay, done!


This is how:

1. You need a flash mp3 player that is controlled by JavaScript, not by URL prams like the one I tried to use at first. I used the WordPress plugin (tutorial and link to download here) but there are others.

2. These plugins include a swf file and a js script so I uploaded the swf file to a proper place in my site, and in the same place created a js snippet with the js script.

3. I added an MP3 template to the file templates that has the call to the flash object in the main body:

<tmpl_if session.var.adminOn>
    <tmpl_if controls>
        <p><tmpl_var controls></p>
    </tmpl_if>
</tmpl_if>


<div>
 <p><tmpl_var title></p>
 <object type="application/x-shockwave-flash"
      data="http://localhost:8082/root/tools/audio/player.swf"
      id="audioplayer1"
      height="24" width="290">
   <param name="movie"
      value="http://localhost:8082/root/tools/audio/player.swf">
   <param name="FlashVars"
      value="playerID=1&amp;soundFile=http://localhost:8082<tmpl_var fileUrl>">
   <param name="quality" value="high">
   <param name="menu" value="false">
   <param name="wmode" value="transparent">
 </object>
</div>

And the reference to the javascript in the head block:

<script language="JavaScript"
  src=http://localhost:8082/root/tools/audio/audio-player.js">
</script>

And that's it - It works! (the template syntax may differ somewhat if you use another plugin, of course).

Thanks for your help,


Oren

 

--- (Edited on 10/21/2008 5:01 am [GMT-0500] by orenshani) ---



Back to Top
Rate [
|
]
 
 

Recent Discussions Color Key

Design:

Development:

Et Cetera:

Install/Upgrade:  

Smoketest:

Template Group:


Re: Site paid for by advertizing by Klaus - Fri @ 02:27am

Smoke Test for WebGUI (Stable) (2008-11-21) by botaction - Fri @ 12:37am

Re: Site paid for by advertizing by pwrightson - Thu @ 10:59am

Re: Site paid for by advertizing by JT - Thu @ 08:58am

Re: Regelmäßiger Termin für Usertreffen in der Rhein-Neckar-Region by Klaus - Thu @ 06:11am

Smoke Test for WebGUI (Stable) (2008-11-20) by botaction - Thu @ 12:00am

Smoke Test for SVN (2008-11-20) by botaction - Thu @ 12:00am

Re: Improving page layouts by fdillon - Wed @ 08:38pm

Re: Improving page layouts by knowmad - Wed @ 08:25pm

Re: Site paid for by advertizing by knowmad - Wed @ 08:07pm

Re: SSL Configuration? by knowmad - Wed @ 07:51pm

Re: The Death of the Collaboration System by preaction - Wed @ 07:39pm