using cck formatters with text field with reference to external files on another streaming server
webshocker - May 18, 2009 - 09:05
| Project: | SWF Tools |
| Version: | 6.x-2.5 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | external files |
Description
Hi all,
is it possible to use the swftools cck formatter with text field insted of filefield so that we can reference the path of the file (which is on another streaming server - like http://domainname.co/foo.mp3) in the text field and its get picked up by the swftools and played, if there is a work around for this - to also see the said file in the views also, please tell me, i need to implement this in a project urgentley.
any kind of quick help will be appreciated
Thank You.

#1
In theory, yes it could be done.
In practice, when I (or someone) has time to write it! The filefield formatter is relatively new.
I'm changing the status to normal so it can be tracked with other feature requests. It makes sense to incorporate this, but I'm not sure when I'll be able to do it.
#2
Hi,
I am after exactly the same thing. I am currently having to either use embedded media field, custom_url with flowplayer which doesn't look very good or use swftools and create a node-mycontenttype.tpl.php and then use:
swf($node->field_emb_audio[$i]['value']);
to force the mp3 to use the 1 pixel out player.
Maybe there is a way to override the output of the page in template.php when using emfield, so that instead of the path being output with the embed tag it is passed through the swf() function and therefore output using whatever player is specified in swftools. This is slightly beyond me and I am not sure when these functions are called.
Or maybe you can specify a textfield in cck and then run this through the swf() function?
Any ideas?
#3
subscribing
#4
As part of the work to improve overall playlist support I've been revisiting the CCK formatters. It's not quite ready to commit yet, but what I've done is added support for the SWF Tools formatter for a text field (only single fields at the moment - playlists are more tricky).
Basically you create a text field and assign it the SWF Tools formatter. Type the url for the file you want (it only supports media types as auto-detection fails for swf files) and it will be rendered in the player of your choice.
So
http://some.server.com/media/music.mp3in the text field produces a player.It also supports streaming servers by separating the server and the stream name with a space (so you can't use spaces in the url, but they're not valid urls in any case)
So
rtmp://some.stream.com/vod my_moviewill stream my_movie from the appropriate rtmp source.I don't want to commit the code just yet as there are some glitches in the branch I need to fix, but does the approach above sound useful / match your needs?
I'm not sure if I need to bring support for playlists, nor support for remote thumbnails. It wouldn't be too hard to do. Playlists of remote files are doable, but when the code's ready I'll commit as is with the initial stab at supporting single files.
#5
I think this is a important needed feature. Support for playlists is reasonable as well. We must take into account that some applications require usage of external content. Is there are work around to accomplish this now?
#6
Solution proposed in #4 should be perfect; Playlists could be added later as needed.
#7
I've modified the module to do this, only instead of specifying the URL in a text box I set it to work with the Link CCK type, since that seemed to make more sense. I've attached a simple patch below in case the maintainers or anyone else wants to make use of it.
macho
#8
wow great patch. work fine for me
its working with single mp3s...
what about attaching external xml-playlist in this filed? is it hard to do?