Re: MP3 Player and Scriptaculous

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: MP3 Player and Scriptaculous

Lukas Renggli
> I have been looking at this MP3 player that is implemented in
> Javascript <http://digitalmedia.oreilly.com/2005/02/23/
> mp3_embed.html>.  In principle, it seems like it should be fairly
> easy to integrate this with the stuff that you have done with
> Scriptaculous for Seaside.  I have been looking at it, but it's not
> clear what I need to do.  Would you mind helping me to get started
> with this?  Where should I begin?

Have a look at pier (PRViewRenderer>>visitFile), it also does embed a
player for uploaded sound-files. The code for the canvas-framework
looks like:

(html tag: 'embed')
    attributeAt: 'url' put: aFile url;
    with: aFile title

You can do something similar with the old rendering framework. There
is no JavaScript needed, as far as I understand.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: MP3 Player and Scriptaculous

Rick Zaccone

On Mar 18, 2006, at 3:07 AM, Lukas Renggli wrote:

>> I have been looking at this MP3 player that is implemented in
>> Javascript <http://digitalmedia.oreilly.com/2005/02/23/
>> mp3_embed.html>.  In principle, it seems like it should be fairly
>> easy to integrate this with the stuff that you have done with
>> Scriptaculous for Seaside.  I have been looking at it, but it's not
>> clear what I need to do.  Would you mind helping me to get started
>> with this?  Where should I begin?
>
> Have a look at pier (PRViewRenderer>>visitFile), it also does embed a
> player for uploaded sound-files. The code for the canvas-framework
> looks like:
>
> (html tag: 'embed')
>     attributeAt: 'url' put: aFile url;
>     with: aFile title
>
> You can do something similar with the old rendering framework. There
> is no JavaScript needed, as far as I understand.
>
> Lukas

Thanks!  To get this to work I had to change 'url' to 'src'.  This  
example illustrates some of the options that are available:

(html tag: 'embed')
     attributeAt: 'src' put: '/foo.mp3';
     attributeAt: 'autostart' put: 'false';
     attributeAt: 'width' put: 300;
     attributeAt: 'height' put: 42;
     attributeAt: 'controller' put: 'true';
     attributeAt: 'loop' put: 'false';
     with: 'Foo'

Also, according to the link I cited above, the embed tag doesn't work  
in IE.  You need to wrap the embed in an object tag to get this to  
work everywhere.  I didn't try this though.

You were right.  No Javascript is necessary.

Rick

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside