Is there a way to create a block that shows a playlist of the last 5 videos using Views?

I have a team of editors who upload videos to my site using filefield, and those are displayed using Views in a block, but so far I can only get the most recent to show, or if I show 5, it shows them one after another in a long block, but not in a playlist.

Any suggestions? I'm using FlowPlayer 3 for the player, and I know they can't handle editing an XML playlist every time a video is uploaded.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Stuart Greenfield’s picture

Category: support » feature
Status: Active » Postponed

Is there a way to create a block that shows a playlist of the last 5 videos using Views?

Not directly from SWF Tools. You would need to write some custom code to make this work that compiles the list of videos and then passes it directly to a call to the swf() function to place the player on the page.

Another possibility might be to generate an rss feed of the movies. The more recent FlowPlayers support rss as a playlist definition (see http://flowplayer.org/demos/configuration/rss-playlist.html), so if you can generate a feed you might be able to use that. That would still need some custom code though - without testing it you may need to pass a proper configuration string to generate the player, again with a call to swf().

The idea is nice though, so I'm getting to set this is a postponed feature request. I am starting to think about neat stuff for SWF Tools 7, and one thought is to somehow make a pluggable system so people can develop very small modules that can interact with content and spit out players. I can imagine a plug-in that lets you choose a playlist made up of the last n items of a specific type of content could be good...

Rob_Feature’s picture

Let me just second this idea with a HUGE thumbs up. Views plugins are the future of Drupal, for sure, and a playlist coming right out of views, similar to the way we can have slideshows (such as the http://drupal.org/project/views_rotator or http://drupal.org/project/views_slideshow modules), would be absolutely awesome.

I'd imagine "SWF Playlist" as a Views display (instead of feed, or page, or block) and you can then choose the number of items, add a single field to the fields list which contains a link to the file and: BOOM! SwfTools playlist.

Now the hard part...coding it :) I'm a designer so I'll be no help. But, I just wanted to emphasize how useful this would be.

Stuart Greenfield’s picture

Noted, and I'll probably open this back up to active shortly. I'm working on an overhaul of the playlisting functions with stuff like ID3 integration; and an overhaul of the the output mechanisms.

Adding this seems a logical next step, and I have some ideas that might become doable once that's all sorted.

Rob_Feature’s picture

Stuart, awesome man, glad to hear this could be in the future.

Another thought based on a lesson learned when building http://drupal.org/project/ffpc : We origially did what I said in #2 (had a new display type that you'd choose instead of block or page). It was refined later to use existing display types, but instead have a custom Row Style. So, rather than having a "SWF Tools" display type...you have an "SWF Tools Playlist" row style. So, you'd:

-Create new view
-Add a block or page display
-For that block or page you'd choose 'fields'
-For the row style you'd choose "SWF Tools Playlist"

You probably would have realized this when coding, but I wanted to point out that this direction makes more sense than what I suggested in #2.

Stuart Greenfield’s picture

@Rob_Feature

I think you might have just described what is almost a solution, and for which most of the code is in place!

Longtail mediaplayer will happily consume an RSS feed as a playlist. So if FFPC will turn a series of filefields in to a podcast feed, we can hand that straight to the player without writing any new code.

Out of curiosity I tried this locally, and once set up created a new node with the following input filter:

[swf file="http://localhost/drupal6/podcast" action="swftools_mp3_display_list" player="wijering4_mediaplayer"]

I get a playlist in the player, built from all the CCK nodes.

It's not quite right at the moment as I seem to be getting some errors after enabling either Filefield Meta or FFPC (not worked out which yet), but the mediaplayer actually looks spot on. Node titles, duration, and the node body as info in the player! So you instant playlists of current content.

Alternatively, you can use the filter in a block, and drop the mediaplayer on the page that way.

I'm going to explore this some more, but it may be that FFPC already does what we need!

Rob_Feature’s picture

This is so funny because tonight as I was driving I thought the EXACT same thing:

  • SwfTools will take xml as a playlist (albeit only local xml)
  • Views can put out xml
  • This means that views spits out xml and then we consume it through a filter (or however) using swftools

This is potentially a solution, for sure. However it's not super elegant. Even though this works, I still think it woudl be a homerun to see something that actually spits an SWFTools playlist right outta views (rather than having to output xml then manually put in the player).

But for now...better than nothing.

I'm not sure I understand your issue you're seeing with FFPC yet...I'll give it a try and see what happens.

EDIT *****

I just realized what you're probably doing: If you're adding more fields than JUST the filefield to your FFPC view, it will wig out. FFPC only accepts a single filefield. If you put in any other (or additional) fields, it won't work. Can you confirm that's what you were doing?

Stuart Greenfield’s picture

Yep - that will be why FFPC is complaining. I had some test nodes set up to test the better thumbnail image handling, so there are several fields.

Agree that a "built in" solution, particularly avoiding xml creationg, would be great, but in the meantime there is a work around, and somewhere to start from! I think the "good" fix might still be to generate xml, but do it behind the scenes and make the player THINK it's getting an xml file that is served by Drupal, rather than one that is written to the playlist directory. Maybe...?!

I've never really worked the views module before so I might get the 6.x-3.x release ready with a pointer to this as the solution, and then work up a better fix for the next release. Will see how things go!

Stuart Greenfield’s picture

Component: User Interface » Code
design.er’s picture

I'd like to subscribe because this may be THE solution for a community project. :) I'd be glad to help to test and report back.

bennos’s picture

subscribing

Stuart Greenfield’s picture

Status: Postponed » Active

Changing to active, and I'm hoping you're going to love this...

I have just made a commit that has the first workings of Views integration! SWF Tools now presents itself as a Views plug-in. Select SWF Tools as the style, and build a query that returns a set of filepaths (e.g. from FileField, from text field etc). Configure the view with the profile that you want to use (e.g. a small player for a block, a large player for a page), and that's it. SWF Tools player with your playlist.

It's very early days and at the moment the playlist doesn't pick up other data like the title or the thumbnail, but it's taken me a while to even get the basic playlist running.

But already using a View I can do things like a playlist of the five most recently attached files from CCK. If there are multiple files in a node then they are all fetched.

I think this is going to be pretty cool - you can construct playlists "natively" with the SWF Tools module - no need for other modules, no need to create xml to return to SWF Tools, just create a view, and any player that SWF Tools understands is available. If you change your mind at any point simply update the SWF Tools profile and your page or block will update itself. I've been playing around posting the playlist in to different players, or differently styled players.

A couple of caveats if you dive in to try this.

SWF Object 2 embedding doesn't work in the live preview, so if you're testing your view use direct embedding. But you can go back to SWF Object once done.
It won't work if you choose Group multiple values as the playlist is built wrongly.
At the moment we skip streamed files as mixed lists of stream / non-streamed content upset SWF Tools (this is an existing issue)
Set the formatter on the CCK element to "plain" as you want things like FileField to return the PATH to the file. Do NOT use an SWF Tools formatter!!

As an example, here are the steps to create a very basic playlist based on a CCK file field element. Note - set the SWF Tools embedding format to "Direct" before starting so you can see the preview! Time to complete this - a few minutes!

Create a new view based on Node (since we are retrieving things based on the node table).
Set up the defaults first...
The style is SWF Tools.
Click the little gear icon to choose a profile (if profiles are enabled, if they aren't you just get the current SWF Tools default for the content of the list)
Add a single field, which is the field that has your playlist elements. For a filefield there are three entries - you want the first one (not delta or data).
Uncheck "group multiple values"
Format is "Path to file"
When you hit update you should see your player and can start playing your playlist.
Add filters to limit playlist elements as you want (e.g. only from certain content types)
Add sorts so the playlist is in the order you want.

Job done! You have now created the basic player. Now add a page or block display to hold your player, and you're there. Now visit your page, or add your block.

If you use a profile with your view then once you have the playlist generating properly you can simply change the Profile configuration to select a different player - you don't have to go back to the View unless you want to pick a different profile completely.

How does all this sound as a feature. Once I get thumbnails working then, in theory, I think you can pretty much build YouTube with Drupal using just Views and SWF Tools (ok, maybe that's a bit optimistic :-)

Feedback welcome if you're an early adopter and you try this out. However, do be warned that this is VERY new code (and I never wrote a views plug-in before...)

Rob_Feature’s picture

Absolutely fantastic!!!! GREAT work her Stuart,
I haven't tested it yet but if it works as expected, this is a great feature. Thank you!

Stuart Greenfield’s picture

It's looking good. You can now pass titles and thumbnails to the playlist by loading additional fields, and using the options for the style to link the field to the file to be played, the thumbnail and the title. Integration with getID3 is working nicely.

All testing at the moment is on CCK FileFields, and things go a bit weird if you have a CCK content type which allows multiple uploads. It works fine it you just want the file to play and its title, but the query retrieves a weird set of results if you add in the thumbnail. I'm guessing it's because the fields are somewhat "unrelated" - the only common thing is the node and the delta.

I'm not going to worry too much now - I think having single CCK file uploads if you want fancy stuff, and letting multiple basic files get assembled in to a list, is a pretty HUGE step forward for SWF Tools anyway!

Oh, and I found a bug in the JW Player!

I'll commit code later tonight.

Stuart Greenfield’s picture

This is awesome (I don't think I ever used that word in a post to the issue queue before!)

The SWF Tools plug-in will now handle thumbnails and titles! Load up your view with the relevant fields (nb - so far I've mainly tested CCK FileField, but it should be generic), in the plug-in options tell the plug in which field is the files you want to play, which is the thumbnails, and which is the titles, and that's it!

It's a touch more complicated if you are using content types with mulitple values for the field, but the plug-in will handle it for you provided you also include the field delta for the file and the thumbnail. That way the plug-in can match the two up and output the right result.

I'm playing around with JW4 building audio playlists, with thumbnails, and with the flow-1 plugin and it looks great - a cover flow style way to browse content that is pulling in from 8 different nodes, all via Views.

So basically, if you can write a query to fetch an array of results you can have it in a playlist!

As before, when you add a field you have to set its format to "path to file" or "plain", and you must uncheck "Group multiple values". I think there must be a way for the plug-in to fetch this automatically but I'm still learning views.

If anyone IS a views expert I'd welcome any comments on the code so far.

And if you try this module let me know how you get on. There isn't a lot of validation being done at the moment so you can post any field in to the plug-in, but it doesn't seem to mind.

And the new mechanism works great with the profiles feature!

Note to self - you can create relationship to the "files" table, and that way you can access things like mime/type to create filters to retrieve only specific mime-types. So a content type that might contain a mixture of audio and images can be configured to fetch only one or the other.

<edit>
This is definitely very powerful. I just used the thumbnails that I've been using with my CCK audio playlists in a new view to create a SimpleViewer slideshow out of them. So even though I never uploaded the images with that in mind I can make a query to fetch them, so I can playlist them in Simpleviewer. A couple of clicks and they playlist in ImageRotator!
</edit>

bennos’s picture

Hello stuart

your work of the last weeks is definitly awesome.

will try out the new views integration with views2 and views3 alpha 3 and will report back.

bennos

Stuart Greenfield’s picture

I have to use the A word again!

This SWF Tools plus Views is working out better than I had ever imagined.

Tonight I started off updating SimpleViewer. There was a feature request for TiltViewer so I made a start on that.

The thing is, TiltViewer has this neat feature that can "flip" the image over and have text on the back. I had already set up the TiltViewer module ready to accept content on a description element in the playlist, but how do you populate it...

What I realised is that Views can extract the node body that goes with each file. And the playlist is constructed in a template. So I can retrieve the node body and tweak the template to pass it over in the playlist.

And hey presto - instant image gallery with images that flip over to show you the title AND the node body that go with it. All in a couple of lines of code and a View. No fancy coding (on the end user part).

SWF Tools 6.x-3.x isn't going to be evolution - I think we're heading for revolution!!!!

The TiltViewer module isn't quite ready yet, but I'm so excited by this capability I have to share it!

Stuart Greenfield’s picture

Status: Active » Needs review

Feature release in 6.x-3.x-BETA4 ready for testing!

iNade’s picture

Stuart is a killer, testing this at the moment and it's working like a charm !

Sounds good for the next...

Stuart Greenfield’s picture

it's working like a charm

Phew! I'm never sure when I work these things up locally whether they will work in the real world. Particularly as so much has gone in to this version of the module.

So one positive feedback is a good place to start!

Thanks for taking the trouble to comment!!

butler360’s picture

I think I've done everything correctly but I get this error:

No modules have registered the action media_list_list. Check any required supporting modules are enabled.

And nothing shows up in the view. I've chosen the file and title in the style settings. The file is set to "Content: field_video_video" (meaning not data) and set to file path. I have flowplayer 3 set up (it plays the individual videos) and in file handling I have everything set to flowplayer (including playlists). I've also downloaded the playlist min.js file for flowplayer3. I haven't set up any profiles yet, though.

design.er’s picture

Stuart, it is soo great to see this working! It's a huge step forward in dynamic playlist creation for all the multimedia stuff a website or even community could need.

I'm using the FlowPlayer 3 and would like to know if it is already possible to create a scrollable playlist.

Thank you so much for all your work! :)

Stuart Greenfield’s picture

@butler360 - which version of the module is doing that - the BETA4 or the dev snapshot?

It looks like the module is double adding the _list tag somewhere along the line. I reworked the action system and looks like I maybe missed a reference somewhere...

@design.er - no scrollable lists yet as I am reworking FlowPlayer playlisting from the ground up - the way FP3 likes to build playlists doesn't work nicely with SWF Tools thumbnails, so I am making an SWF Tools specific playlist.js plugin. My JavaScript isn't that good so it's taking a me a while, and getting the FP3 API to do what I want is.... challenging!

butler360’s picture

Beta4. Should I try the dev version?

Edit: Tried dev version, only difference is that now the error box is yellow instead of red.

Stuart Greenfield’s picture

Yep - missed one - fixed on DRUPAL-6--3!

butler360’s picture

Indeed it is fixed! Thanks.

Where does the title and description show up though? I have them mapped to the proper fields (node title/body fields) but I don't see it anywhere when I look at the resulting view.

This relates to my other question, which is will you be adding or is there already a way to add a table of contents and/or prev/next navigation so users know where they are and whanot?

Stuart Greenfield’s picture

With FlowPlayer it doesn't show up yet - that needs the playlist to be enabled and FlowPlayer writes its playlists using HTML/CSS/JavaScript.

I'm working on that at the momnet...

Stuart Greenfield’s picture

@design.er

FlowPlayer is frustrating - I thought I had the code working to provide proper splash images / background images, so I had a go at the scrollable feature. I finally got it going, but it doesn't play nicely with the mechanism I used for thumbnails.

A basic playlist that is just text, with no thumbs, works ok.

I'm not going to commit anything at the moment as the code is very hacked together, and you have to do stuff like upgrade jQuery to 1.3. I might park this for now, or write up how to patch manually, as I don't think this is ready for general use without a lot more work.

I don't think I will aim to have this in 6.x-3.x as it is so for away from being consistently usable.

design.er’s picture

Don't worry. I'm absolutely thankful for all the work you have done on this project. It's unbelievable! :)
Is there any other possibility to create a playlist for FlowPlayer 3 (like this maybe?) or should I switch to the JW MediaPlayer Plugin - does the playlist work out of the box for the JW Player?
I like the FlowPlayer because the playlist is accessible (HTML).
Thank you very much for your help!

Stuart Greenfield’s picture

Hopefully soon! The construct for that style of playlist isn't very different to scrollable. I might try just basic images in the playlist (which will then be usable with scrollable playlists) and come back to trying to get the splash image in the player. The problem is all these different features use different scripts, and there's a danger that every page gets loaded up on the off-chance someone wants to implement a particular feature.

In any case, Before that the new features will make thumbnails so much easier I think I need to revisit the request for imagecache integration first.

Yes - playlists work out the box with JW4 or JW5 - it can render playlists without any plugin (with their splash image) and you can add plugins like "flow" to get Apple style 'cover flow' playlists.

gausarts’s picture

Subscribing to the revolution :) So excited. Thanks for all the great work.

Stuart Greenfield’s picture

Scrollable playlists are nearly done... I've basically had to write an swftools specific playlist plugin (so I've learned a lot about jQuery this last few days!), but basically everything is now in place to pass splash images properly, render a proper playlist, and allow it to scroll.

It needs just a little more work so that the scrolling can be made optional, and to use scrolling requires the jQuery update module as it requires the newer jQuery library.

Will aim to commit something in the next day or so...

design.er’s picture

Unbelievable how fast you are. :)
I'm so excited... can't wait for the release to test this killer feature. :)

Stuart Greenfield’s picture

OK - I made the commit - but this is VERY new code, and I've had to learn a lot of jQuery stuff so it might not be the best code in the world, but I think it works. It looks brilliant on my test rig - I'm pulling files and thumbnails out of views and putting them in a FlowPlayer playlist (no thumbnails in the playlist yet...), and it scrolls up and down! Thumbnails passed in the playlist from Views will appear as the player background so you can use this to create a nice audio playlist with album images etc.

It's a bit tricky to set up so here goes:

  1. Get the latest SWF Tools dev package that includes all this new stuff!
  2. You need the jQuery update module as the scrollable feature requires the newer jQuery library.
  3. You need to get tools.scrollable-1.1.2.js from http://flowplayer.org/js/tools/tools.scrollable-1.1.2.js?download=true. Put this file into sites/all/libraries/flowplayer3. Note - don't get the minimised file. At the moment the script name is hardcoded in the module.
  4. To enable playlists you need to enable FlowPlayer 3 embedding at Sites > Administer > SWF Tools > Flowplayer 3 > Flowplayer embedding.
  5. To enable scrolling playlists also enable tools.scrollable.js, also at Sites > Administer > SWF Tools > Flowplayer 3 > Flowplayer embedding.
  6. The generation of playlists (scrollable or plain) is a profile capable feature, so you can either set it up on the global settings page, or you can create a profile. It's all done under the new "Playlists" section on the FlowPlayer 3 configuration page. You can enable the playlist, enable scrollable playlists, and also choose between the gray and petrol style. I have just copied the styling straight from FlowPlayer to get things started.
  7. Create your playlist either in a CCK field, or for real power use the Views to pull your content in!

Like I said - this is VERY new, but it seems to work so I've made the commit to let early adopters test it out... Looking ahead, the playlist markup is generated in a template, and the styling is via CSS, so it should be pretty flexible to let the style be changed to suit your site.

Have fun!

Next task - ImageCache integration to really get thumbnails working properly, and then I think SWF Tools 6.x-3.x is done...

<edit>
This is working brilliantly... Just browsing my test site and I've got multiple instances of FlowPlayer rendering with multiple scrolling playlists, and all the JavaScript interaction is working - start a player from a playlist and the "play" icon appears. Click a different playlist and it starts, the other player pauses, and the playlist icon changes accordingly. Maybe the new code is ok...
</edit>

design.er’s picture

Unfortunately I'll come to test this commit only on Monday. I'm awake for 36 hours yet due to load of work and need a day off tomorrow.
But on Monday I'll take the time to test this awesome feature and get things up & running. :) I'll report back.
Have a nice weekend!

Stefan

design.er’s picture

I'm testing the new SWF Tools features...
I'm not sure why but I receive the following error when I save or view a 'video' node:

warning: Parameter 1 to theme_swftools_embed() expected to be a reference, value given in D:\DEVELOPMENT\xampp\www\test\includes\theme.inc on line 656.

It's a simple content type with a filefield upload.
I tried two different profiles:
01. Separate players; FlowPlayer 3;
02. Playlist; FlowPlayer 3; I did everything as described in comment #33.

Besides this two handlers I also tried the standard CCK node display handlers: SWF Tools - playlist; SWF Tools - with/no download link.
And I also tried to use JW Player 4... all with the same error message.
Creating a view playlist forces the same result. So it seems to be more a generic problem.

SWF Tools has detected all player plugins correctly.

Please let me know how I can help with any other information.

Stefan

Stuart Greenfield’s picture

Ooops - I'm guessing you're using PHP 5.3? I'm on 5.2 so this error doesn't get flagged and I missed it!

There's a stray & at line 2325 of swftools.module ,in the definition of theme_swftools_embed().

Deleting the ampersand so the definition is just function theme_swftools_embed($options) should fix it.

design.er’s picture

You're right. I've reinstalled my notebook 2 days ago with the new xampp 1.7.3. I didn't realize that this version is using PHP 5.3.1 already.
It's pretty weird... it was really the solution for this problem.
I tested views playlist generation (incl. scrolling function and thumbnails) and CCKs display handler (separate player).
I can confirm that this awesome feature works like a charm! No hassles. Works absolutely fine out of the box.
Congrats for this great work! :)

Is it right that I can customize the number of visible items in the scrollable playlist via CSS or will there be a field (in views?) where I can tell drupal how many items to show in the visible area?

An other interesting feature would be if it would be possible to create playlists with merged content from filefield uploads and emfield (youtube, vimeo etc) embedded media -> a node type 'video' could have the fields 'upload a video' (filefield) and 'embed video from ...' (emfield). The system would check which field has content and load it while ignoring empty fields. The Dash Media Player module works this way as far as I know. But I guess it would require major changes within the views plug-in?

Stuart Greenfield’s picture

The number of items can be configured, but is not yet configurable (if that makes sense).

The playlist size (height and width) is set in CSS. The number of items is set in swftools_flowplayer.js so you could amend it directly.

I need to think about how to make it a setting. The easiest thing will be a global setting for all playlists as the JavaScript has no way of "knowing" how many playlist items it should be showing on a case-by-case basis. Need to think about that. It might be possible to have an array of settings I guess.

But it's great that you were able to get it to work - I'm never sure whether something I have working locally will transfer easily to the "real world"... Reading your post you were able to generate a scrollable list WITH thumbnails? That's good because that is about the most complex configuration to do - did you find it pretty straightforward?

I had already started to think about some sort of "aggregated" playlist that consumes multiple nodes. I wasn't aware of the Dash Media Player module so I might take a look to see how they do it :-)

design.er’s picture

If you mean thumbnails as splash images inside the player: yes it works fine. :)
I couldn't find any thumbnail elements in the flowplayer 3 playlist tpl files (and can remember that you've mentioned to work on imagecache presets for thumbnails) so I think it's still in work at the moment, as well as the other fields (author, link, description...)?

Yeah, "aggregated" playlists would be awesome. Just a case study I was talking about already: I'm working on a free community for audio, video, motion & graphic designers, writers etc. It would be cool to provide the video designers the ability to choose whether to upload a video or embed one from YouTube, Vimeo etc via emfield. I use conditional fields to tie both options into 1 content type... so it would also be cool if all this stuff could be merged into 1 playlist for a better end user experience and usability.

Stuart Greenfield’s picture

FlowPlayer3 playlists can now have thumbnails in them. The default template assumes a size of 46 high by 61 wide. With the new ImageCache support you can assign an imagecache preset to the the thumbnails and have them resized automatically.

All seems good - the images combine with the scrollable playlists so you get a (very cool) scrollable playlist with thumbs.

Tried mixing audio and video and you get your thumbnail background when audio plays, and when you choose a video item that just plays normally too.

I am very, very happy with the result so far!

reptilo’s picture

Version: 6.x-2.5 » 6.x-3.x-dev
FileSize
288.68 KB

Hi
I'm testing it with Gallery_Assist module and have this problem :
"No modules have registered the action _list. Check any required supporting modules are enabled".
I try it with a CCK field (Image) and Simpleviewer profil and it works fine !
But with gallery_assist content type no...
any idea ?
Thanks and sorry for my poor english !

harcher’s picture

I'm about to use this for a video and audio playlist.

Would be nice to have a video tutorial demonstrating how to setup a simple playlist, from setting up a content type, adding cck filefield(s), filefield configuration, creating and configuring the view and finally configuring the player (FP3 or JW).

Sounds like a revolution, but I want to see it to believe it :)

bennos’s picture

read the postings above from stuart. he describes a lot. at the moment it not usefull, to make a screencast, because is doing a lot of changes.

harcher’s picture

I don't agree.

I've read all the postings above. It wouldn't harm to have a screencast to get people going on this in preperation for the final release.

design.er’s picture

The functionality seems to be still in dev (even if stable) so the screencasts/tutorials will have to wait for a stable release.
It makes no sense to describe processes that may change. People would post "bug" and support requests if the tutorials won't work any more etc.
Long story's short: All this will cost too much time which the maintainer could use more efficient (i.e. for development or enjoy the after-work beer :)).

Stuart Greenfield’s picture

Docs, screencasts, feature requests, bug fixes, SWF Tools 7...

Seriously, I would love to make a screencast, and plan to overhaul the docs once 6.x-3.x comes out, and maybe a screencast will be part of that. But with the limited time I have to work on SWF Tools (I do this as a hobby, and the SWF Tools development team is mostly me) right now I'm afraid screencasts will have to wait.

The feature is also very new. It's only been in existence for a couple of weeks, so there may be bugs, fixes or suggestions that change the implementation.

I tried to give enough instruction to get people started, but as this is a "cutting edge" feature I need to be sure it is working properly first!

@design.er - after work beer would be good, but with a four year old at home who wants to play it doesn't happen that often! It normally ends being beer while working on SWF Tools :-)

reptilo’s picture

Stuart, do you confirm that the SWF Tools modules works with the Gallery content type (Gallery_assist module) ?
Many thanks and big smacks to your child ; )

Stuart Greenfield’s picture

do you confirm that the SWF Tools modules works with the Gallery content type (Gallery_assist module)

Not yet! I've not tested it with gallery_assist.

SWF Tools 6.x-3.x is proving interesting as more people are interfacing it to more things!

I'll try to test it out and see what happens...

Stuart Greenfield’s picture

@reptilo - based on some quick tests the answer is "not at the moment!"

gallery_assist seems to store the filepaths in its own table, and even with the gallery_assist_views module I've not yet been able to make it produce a list of valid file paths.

I will need to think about this some more to see if it is SWF Tools or the gallery_assist / gallery_assist_views modules that need to be changed...

harcher’s picture

@Stuart Greenfield

Thanks for your hard work on this. I haven't yet tried SWF Tools but looks to be very fitting for what I'm working on (I've used swfobject API and flowplayer3 before). I'm working on an asset management system. Data structure is something like:

- Project (content type)
-- radio_assets (cck filefield multi value - mp3)
-- tv_assets (cck filefield multi value - flv)

I'm after an audio and video playlists (for radio and tv assets) for a given Project.

My question is, what version of the SWF Tools module do you recommend for my use case, and, what player (flwoplayer or jw)?

reptilo’s picture

Thanks Stuart for the answer.
I will use SWFTools with CCK field for the moment.
Xavier

Stuart Greenfield’s picture

@hga77 - you would be best to use the newest 6.x-3.x-dev release for prototyping. It's nearly production ready and there should be a release sometime in the near future.

Using CCK is the "preferred" way to go, and if you use the 6.x-3.x series you can combine that with Views to get playlists out of multiple nodes. You also get the advantage of profiles to have customised players and things, so different projects could use different players / sizes / colours etc.

harcher’s picture

@Stuart Greenfield

Thanks. I can only find 6.x-3.0-beta4 on the swftools page. Is this the dev version you mean?

design.er’s picture

joshuautley’s picture

Stuart, as a former Flash Guru who has been converted to Drupal I must say your dedication to the cutting edge and advancement of SWF Tools is awesome! I'm basically subscribing to keep up with you guys. You always seem to have solved any problems I find. The most difficult part is finding the answers. Many thanks to everyone else who assists with this as well.

When I went to write some action script two days ago i realized that I couldn't remember how. This left me with the choice of opening an old FLA and refreshing my memory of legacy ways OR I could find a frik'n answer to this whole Video and Video Play thing using some module(s). After a very long night and not much sleep + many other failed attempts it seems that I had the answer all along > Just upgrade SWF Tools! Doh! Oh well at least now I can say you have the best solution and mean it because I tired all the others.

harcher’s picture

Been using 6.x-3.x-dev for a week or so now. Great work ;)

I'll list all bug fixes I ran into once I finish this project I'm on...

One issue for now is that the flowplayer3 playlist breaks in IE7. Gives a js error.

Fix
In file:
sites/all/modules/swftools/flowplayer3/swftools_flowplayer3.playlist.js

You have an extra comma on line 26:
playOnClick: true,

In file:
sites/all/modules/swftools/onepixelout/swftools_onepixelout.js
You have an extra comma on line 34:
},

Remove those commas and should be all good on IE7.

radj’s picture

+100

ahimsauzi’s picture

Stuart, thanks for a wonderful work!

Exactly what I was looking for. There is one very minor issue I discover which may be important to some. If I limit the view's items to one, I get an error and nothing works. If however, I leave it as ten and only use one no problem.

Either way this is a wonderful module and a well needed functionality!

danryan’s picture

"All testing at the moment is on CCK FileFields, and things go a bit weird if you have a CCK content type which allows multiple uploads. It works fine it you just want the file to play and its title, but the query retrieves a weird set of results if you add in the thumbnail. I'm guessing it's because the fields are somewhat "unrelated" - the only common thing is the node and the delta."

Hi Stuart,

Thanks for the great module!

I have a CCK content type which allows multiple uploads. My view currently pulls only the first .mp3 file in each node. I would like it to pull all the files. Any plans to fix this?

Thanks!

BeaPower’s picture

I dont see the SWF Tools option in styles, how can I enable this?

shriji’s picture

Hi Stuart,

First of all, thank you very much for you contribution to drupal community and people like me who need your expertise like anything!!!!!

I have been doing research on using Drupal for my website which host over 20000 mp3 and grow by 10 files every day on an average. I was kind of frustrated after spending a couple of months on finding a non-coding way of importing all of them using proper taxonomy. Following are the features that I am planning to have on our site:

1. allow users to create their own playlists on the fly.
1a. allow users to create their own playlists and save them under their profile and share them with others.
2. download selected mp3 in zip format as a group
3. show blocks of latest uploads under different categories.
4. allow users to listen individual file
5. allow users to download individual file.
6. mass import mp3 files

With the combination of Flash Node, SWF Tools, and VBO module, I was able to create the dream solution for my future website. I was able to complete item 1, 3, 4, and 6 successfully above. I dont know how to deal with 1a and 2. I have to do extensive research as I am using Flash Node instead of FileField.

The only reason I am using Flash Node is its capability of importing mp3 in bulk. That was my basic requirement. Since it has integration with SWF Tools, it is working out great for me. Thanks a bunch again!!!

Can you please help me understand how to include Download link under Flash Node?

Thanks

ccshannon’s picture

subscribe

bearstar’s picture

Great module and it seems to be working great for the most part. Here are a few things I experienced:

- The flowplayer3 settings pretty much ignored the height and width settings for the canvas. I had to dip into the flowplayer stylesheet to adjust those.

- In my view, I used URL to File as the field type.

- When I click the scrolling icons, I get the following JS error:
Error: $.Event is not a function
Source File: [domain]/sites/all/libraries/flowplayer3/tools.scrollable-1.1.2.js?i
Line: 163

Has anyone else experienced this?

rwt’s picture

Component: Code » SWF Tools
Category: feature » support

Thanks Stuart for your amazing work !
This is working great.

But once I've updated my swftools to 6.3 dev, the custom php code I have in my template does not work anymore.
it goes like this :
print swf('../header_light_bg.swf', array('height'=>257, 'width'=>559));

I then get the classic error "You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly." which probably means it does not find the file anymore.
I'm using swfobject 2.

Please help, I'm new to Drupal !

zlorro’s picture

subscribe

bearstar’s picture

I updated to JQuery Update 6.x-2.x-dev and that solved this particular problem.
I also needed to add flowplayer.rtmp-3.2.3.swf to my /ibraries/flowplayer3 folder

bearstar’s picture

My client now wants their playlist to automatically start playing the next song in the playlist. Is this even possible?

BeaPower’s picture

YOutube videos dont seem to work (using embedded media) and no thumbnails show, help!

shriji’s picture

Hi Stuart,

I tried to create a playlist from the CCK filefield as suggested by you. It is giving error. This FileField accepts mp3 files. I created 2 nodes with mp3 file uploaded to this field.

Now when try to create the playlist using swftools, it gives error 2032. Following is a small video of what I am trying to do:

http://www.screencast.com/users/navnish/folders/Jing/media/8ba48628-8add...

Surprisingly, when I try to create the playlist following same step it work perfectly with FlashNode.

Any idea?

AdrianB’s picture

To those using this in the 3.x-dev, is it stable enough (compared to 3.0-beta4)?

I'd prefer to use a stable release but I guess Stuart is swamped with work elsewhere, so I'm thinking of switching from beta4 to dev.

shriji’s picture

I think so. I am using Flash Node + swf tools + jw player 4 for playlist functionality. And it works that way. What I did I exposed the filter to users so that can select the collection by selecting the taxanomy terms from the dropdown and the playlist is filtered that way. For first time you have start play manaully...and after that it automatically plays the next song...I guess so...I dont remember exactly but I guessed it worked. I will double check and post back...

AniaMi’s picture

Stuart,

How to use plugin flow-1 (jw player), where to place it?
I'm using playlist via View.
And I don't know, where I should put plugin, where to get it?

Is where posibility to highlight current playing song (using JW player 4) and have an Playlist image?

Thanks a lot,
AniaMi

lefko’s picture

Hi, I am new to very drupal. This looks really really good for what I want which is a web based mp3 jukebox. I am trying to get the playlist to work and have looked at this an various posts. I think I have things set up correctly. I have a field called aud. The field is of type file with display fields of swftools playlist. One of the things I am not sure about though is the path settings for this field. It is set to the directly that holds the mp3 files. (is that relevant?).

In the views menu I have a view with the style of swftools. In the fields I have the content:Music File (field_aud) which is the machine name for the aud field. The Format is set to path to file. In the gear widget of the SWF tools style I have set the file: combo box to "Content: Music File"

I have also included the audio module and have another field for the audio:Title in the title combo box. When I try viewing the page I get the following error:"No modules have registered the action _list. Check any required supporting modules are enabled."

What am I doing wrong?

verta’s picture

Subscribing to this thread.

Funksmaname’s picture

Version: 6.x-3.x-dev » 6.x-3.0-beta4

Hey - i really need this to work, it's so awesome and exactly what I need - unfortunately i'm also getting:

'No modules have registered the action _list. Check any required supporting modules are enabled.'

I had previously had the official release installed, but then to start working with playlists i deleted it, removed all references in db to swftools (it was creating errors) and installed BETA4 release... but getting the error above all the time... tried using either jwplayer4 or flowplayer3. if i disable the swftools view style i get the URL listing of my tracks so i'm pretty sure that side of things is working ok.

using core 6.19 on IIS shared server (clean links enabled)

please help!

izmeez’s picture

subscribing

izmeez’s picture

Version: 6.x-3.0-beta4 » 6.x-3.x-dev

Thanks Stuart.

I'm using the 6.x-3.x-dev version and Flowplayer3.
The playlist plugin works great on multiple files in a single node, http://drupal.org/node/581778 with just some minor theming issue. I haven't yet had a chance to try playlists with Views.

I've reset the version of this issue to 6.x-3.x-dev because from all I've read it supersedes 6.x-3.0-beta4 and is the one to test against.

Funksmaname’s picture

bump!
*sob*

verta’s picture

I am also testing the JWPlayermodule and found this tutorial video series that you may find interesting:
https://elearning.psu.edu/elearning/using-drupal-generate-jwplayer-frien...
It uses views to create an XML playlist from nodes that is the feed to send to a player. I haven't replicated the process yet, but it looks promising. No idea if it can be translated to SWFTools or not.

Funksmaname’s picture

thanks verta - will check it out... i dont really mind if I use swftools or not as long as I get a playlist going!

Funksmaname’s picture

it seems the error i was having earlier is due to not having selected anything in the 'file' drop down of the 'swf tools' settings cog...

verta’s picture

Interesting - so did you set the File to a playlist file on your sites/default/files, and how is the file created/maintained?

izmeez’s picture

@verta, thanks for the link. The tutorial is very cool.

I'm new exploring swftools and wondering if the same can be done using jwplayer and swftools with the views support?

Funksmaname’s picture

i managed to use verta's link to get a playlist working using jwplayer module and 'views bonus' for xml export... no need for swftools :)

verta - i created a playlist using views - and did actually get it working, sort of, but had trouble skinning it etc, so went with your linked tutorial solution... i also managed to use it with views arguments to create dynamic playlists (depending on what page you're on [in this case, which artists page]) thanks a lot for the link :)

Rob C’s picture

subscribing

metalshreds’s picture

Im also not seeing SWF Tools under styles in my view, anything i need to enable/change?

metalshreds’s picture

update your swftools version to 3.0 beta4, it took me a while to realize that minor thing

brenes’s picture

Thank you for this great plugin. I am using your Plugin with Views and the JW Player. Is there a way to display the JW players playlist as a JavaScript Playlist, like it is described here?
http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/23...
Best Regards

wheck’s picture

Absolutely great!!! It's great that there's people like you so dedicated to this community as a hobby =D, this works like a charm!

David Stosik’s picture

Hello,
The wijering playlist template inserts a tag <duration> wether it knows the duration or not. If it is not known, then the player assumes it is 0, and does not display an appropriate progression bar.
The <duration> tag should be displayed only if the duration is known.
Patch attached fixes this issue on last dev release.

Regards,

David

Stuart Greenfield’s picture

@David Stosik - patched rolled in to 6.x-3.x-dev. Thanks!

roball’s picture

Version: 6.x-3.x-dev » 6.x-3.0-beta5
FileSize
10.57 KB

Tried to make a View playlist with SWF Tools 6.x-3.0-beta5 using Flowlayer 3.2.7, but it only shows a strange square for each Video file, as shown in the attached screenshot.

verta’s picture

Sometimes it's instructive to review the final HTML sent to the browser in Firebug or View Source and see how the object embed code looks. My guess is that the path to your video is malformed, but that's just a SWAG. It might mean a trailing slash, quoting issues, path inclusion/exclusion; lots of possibilities and variables.

glasswool’s picture

Title: Playlist via Views » Playlist option in file handlers

When I go to a node created with multiple mp3's attached I get 'No player is configured for a series of audio files. Check the SWF Tools file handling settings'

The Playlist option in under file handlers is not showing, I am using 1 Pixel Out MP3 Player and trying to play a list of files attached to cck field. Can you tell me what I could be doing wrong?

reptilo’s picture

I'm using SWF Tools 6.x-3.0-beta5 with Views 6.x-2.12 and JW Media Player 4
I want to have a flv playlist (CCK field)
I've made the view with SWF Tools style but i have only one video in the JW Player.
When I put other Style I see all the video paths.
Can anybody help me with it
Many thanks
Xavier

reptilo’s picture

FileSize
110.83 KB

Hi
I have steel the same problem with applying style :SWTools
I try with 6.x-3.x-dev and same result : only one video displaying in the view result.
Here is my view in attachment.
I'm using Views 6.x-2.12 and JW Media Player 4
Thanks
Xavier

Net_Runner’s picture

Hi,
I almost managed to make everything work with swftools, views, and flowplayer3 scrollable playlist - except one thing :

- I have mixed playlists with movies and pictures - and I would love to have controllbar over movies , but not over pictures

Is this possible?

kobnim’s picture

@Stuart:

In step 3 of comment #33, you say:

You need to get tools.scrollable-1.1.2.js from http://flowplayer.org/js/tools/tools.scrollable-1.1.2.js?download=true. Put this file into sites/all/libraries/flowplayer3. Note - don't get the minimised file. At the moment the script name is hardcoded in the module.

I am having some difficulty with this step, because this link no longer works: http://flowplayer.org/js/tools/tools.scrollable-1.1.2.js?download=true.

It seems the new process for downloading the "scrollable" tool is to go to http://flowplayer.org/tools/download/index.html and download jquery.tools.min.js, selecting just the "scrollable" component.

However, this raises several problems:
(a) the file is minimized. You say in your instructions "don't get the minimised file".
(b) the version is different. (It is version 1.2.5 rather than 1.1.2)
(c) the filename is different from your hardcoded filename.

If I download version 1.2.5 of jquery.tools.min.js, and rename the file "tools.scrollable-1.1.2.js", do you think that might work? Or do you know whether there are more up-to-date instructions elsewhere, for installing the scrollable tool? (I have searched, but have not been able to find anything.)

Thanks very much for your advice!
Mindy

[update] Problem solved. It looks like the js file no longer needs to minimized, and its filename is no longer hardcoded. I entered my filename here: admin/settings/swftools/flowplayer3.

akolahi’s picture

@kobnim try right-click and 'save link as' on the link. It should let you download the .js file.

SlimGrin’s picture

I was able to set up a playlist using Views as described above.

However, I can't figure out how to get the player to automatically start playing the next node in a list.

Can anybody point me in the right direction?