I would like to configure the display of instances of flowplayer. As noted on the flowplayer site, you can configure whether to display an audio-only player (Without a video/photo splash screen) or to allow for the video player. This can be done within the embed code, however I don't want to modify the module to do this because I'm concerned it will be overwritten when the module is updated.

Would it be possible to allow this configuration? I would like to offer a smaller flowplayer for audio files while still maintaining the ability to use flowplayer for video. Currently, I'm stuck with using the expanded version of the flowplayer for my audio files which is not the desired outcome.

Thanks for your help.

Comments

notv’s picture

Any thoughts at all?

notv’s picture

Here is the URL for the instructions: http://www.flowplayer.org/plugins/streaming/audio.html

Here is the code:

Example: Flowplayer as a music box

You can easily configure Flowplayer to work as a standalone audio player not using any images and videos. Here is an example:

href="/demos/plugins/fake_empire.mp3">

JavaScript code

// install flowplayer into container
$f("audio", "/swf/flowplayer-3.1.1.swf", {

// fullscreen button not needed here
plugins: {
controls: {
fullscreen: false,
height: 30
}
},

clip: {
autoPlay: false,

// optional: when playback starts close the first audio playback
onBeforeBegin: function() {
$f("player").close();
}
}

});

notv’s picture

I would appreciate if someone could point me in the right direction in terms of a SAFE way to edit the module file to make this happen - I understand this is not a current feature of SWFTools to manage the AUDIO plugin that makes this possible.

I'm simply looking for the proper way to edit the variables sent to flowplayer as in the example above. Many thanks.

notv’s picture

looks like simply by changing the height and width in 'canvas properties' I am able to do this. Important note, you MUST set height AND width. I initially tried just height and it had no effect.

Now, HOW can I setup two profiles like this so that I can define an audio player (with a height of 25) and a video player (with one of 350)

notv’s picture

I'm starting to think this would be a great feature that would work with CCK & Views. Currently I can choose 'SWFTools' when selecting a field for use in views -- and there are a few options such as 'Swftools without link' or 'Swftools with link' -- it would be awesome if we could set new profiles, i.e. 'Swftools - Audio only' or 'Swftools - Huge video' etc.

After reading it sounds like I might be able to do this manually using input filters. Any guidance on how to do this or how this may be incorporated into the module is appreciated.

Thanks for the great module!

portulaca’s picture

I also have both mp3 and video content and want to be able to choose different sizes for Flowplayer 3 for those formats. Currently my mp3 player displays are huge.

Is there a way to at least put a background image (mp3 icon) when playing audio only so it doesn't look like something is missing?

Toktik’s picture

Same issue need 2 sizes. One for video, one for audio. Any ideas?

Stuart Greenfield’s picture

Title: Flowplayer 3 Display Properties -- Need ability to configure display as audio-only » Flowplayer 3 Display Properties - Create Flowplayer "profiles"
Priority: Critical » Normal

Changing title to reflect what I think this thread has ended up requesting.

Changing priority to normal - feature requests are not critical as the module isn't broken without this. It will go on the work list for things to add!

Stuart Greenfield’s picture

See also #695068: enable autoplay on select pages - that could be addressed through the use of a profile mechanism, although it would rely on the caller to identify to SWF Tools that they wanted the specific profile.

Stuart Greenfield’s picture

Title: Flowplayer 3 Display Properties - Create Flowplayer "profiles" » Create SWF Tools "profiles"
Version: 6.x-2.5 » 6.x-3.x-dev

Note change in title and version.

The more I thought about this the more it seems like a great idea. While the 6.x-3.x-BETA1 is out for testing I moved that branch to HEAD to experiment a bit, and it's working as a proof of concept.

You will be able to define a "profile", which is a collection of settings for both file handling, and all the associated players. Then, when you request the content you let SWF Tools know what profile you want.

For now you can only access profiles via the input filter, but the plan is to access them in CCK.

The prototype code lets you customise the file handling, and customise Wijering4 (as I have currently hard-coded those options, but it will be dynamic throughout at the end).

So, on one page I can call

[swf file="audio1.mp3"] and I get my usual behavior of the mp3 in the configured player.

But then I can call

[swf file="audio2.mp3" profile="default"] and I get a different player as I have mapped mp3 to a different player in that profile.

Or I can call

[swf file="audio3.mp3" profile="alternate"], and I get a different player again. But, for example, I can set the same player as "default", but make it half the size.

I have this working locally, and the changes to the code aren't too drastic. Now I've updated wijering4 to do it it should be fairly straightforward to do the other modules.

Basically pretty much every setting you can assign on the settings page can be exposed in the profile. Does this sound like the sort of thing the original request wanted? Once the definition mechanism is up and running I'll see how we link this to CCK...

Stuart Greenfield’s picture

Have a basic interaction witih CCK up and running. Profile names are still hard coded for testing, but I have content where I can choose a WordPress audio player (closed) on the main page, but it is set to autoplay when viewed in the full node, simply by choosing a different profile.

When testing it was also possible to set entirely different players.

The code needs some more work as I need to allow the choice of a playlist or a collection of players when passing multiple files. It also needs some tweaking to add (or exclude) the file download link.

That will come later, but there's a chance the basic code might make 6.x-3.x!

izmeez’s picture

subscribing

Stuart Greenfield’s picture

Can now create and configure profiles dynamically through the UI. Cannot yet delete/clone profiles.

Profiles are automatically registered with CCK, making them available for formatting fields, and the profile settings page allows toggling between CONTENT_HANDLE_CORE and CONTENT_HANDLE_MODULE.

Need to migrate other players (so far Wijering4 and WordPress audio are profile enabled), and finish profile UI, but is looking very good!

Stuart Greenfield’s picture

This is pretty much done now. I now need to convert the player modules to properly support the profiling, but just playing with this locally I am hoping you are going to love this new feature! So far Wijering 4 and WordPress audio are "profile capable".

Basically SWF Tools is going to have a fully functional "profile" mechanism that fully integrates with CCK.

You can create any number of profiles that have profile specific file handling and player configurations. These appear in CCK as formatters.

So, you can have a small audio player configured in one profile, you can have a large player that auto-starts in another. You can have variations of JW Player with different skins.

The profiles can be "cloned" so if you have one that you like you can copy it, then play around with the new one, but you always have your old one to go back to.

You can choose one profile to render in separate players, and another to render as a playlist.

You can have different profiles to go with different content types!

I didn't think this feature would make 6.x-.3.x but it will!

I haven't committed yet as I just need to get the installer profile written as we need a database table, but give me a day or so and it will be up and running!

SWF Tools 6.x-3.x is nearly ready...

Stuart Greenfield’s picture

Installer written, and code committed on HEAD (Drupal 7 work hasn't started yet so I've committed it there to preserve the integrity of the current DRUPAL-6--3 branch).

To access the new features enable SWF Tools Profiles, then go to Administer > Site configuration > SWF Tools > Profiles.

You'll see a page that looks very much like the CCK content type form. Create a new profile, and then configure it.

At the moment only WordPress audio and JW4 have been updated to use the new profiling feature - other modules will follow.

Once you've created a profile you can access it in three ways.

If you are using the input filter you simply set profile="my_profile", e.g. [swf file="my_file.mp3" profile="my_profile"].

If you are using CCK it's easy - the profiles will appear as CCK formatters using the descriptive name you assigned. So you would see "SWF Tools profile - My profile". You can assign different profiles to the teaser and full view.

It you are using PHP you assign profile on the othervars array when you call swf().

An SWF Tools Profile is basically a complete set of SWF Tools configurations. If you don't save a specific setting then the profile will mirror the "global default", i.e. whatever is set on the regular SWF Tools configuration page.

The profile settings page will tell you right at the top if the settings you are looking at are mirroring the globals. If you are mirroring and you change the global setting your profile will also change.

However, if you save a settings page you then create a unique setting for that profile.

I think the code is basically good. At the moment I think the "alternate formatter" setting probably needs some work.

FlowPlayer3 is next on my list to migrate, but my first attempt didn't work out because the color scheme form was playing up (and I really should stop and go to bed now).

I'm putting this code out on HEAD as there seemed to be quite a bit of interest in this feature so I wanted to make it available to keen users to test out.

Please just use it to "play" with at the moment. I don't think the code will change that much, but there are probably going to be some bugs to iron out.

If anyone tries this out let me know how you get on, and whether the feature does the things you hoped! I did a very quick check and the formatters show up in Views too, so it should allow some clever stuff like putting a player in a block in a small size, while having larger players elsewhere. I think this is going to be good!

All being well I will plan to include this code in SWF Tools 6.x-3.x.

Stuart Greenfield’s picture

FlowPlayer3 now works with profiles.

I am going to pause with enabling profiles in the Image modules (image rotator and simple viewer) for a while. I wanted to get the main players running and have some other bits I want to work on in the short term.

But it will get added.

Note that the new code is still on HEAD. CVS is complaining now I try to merge HEAD on to the DRUPAL-6--3 branch to align the two, and I'm not going to do it manually tonight!

Delta Bridges’s picture

Great news :)

Stuart Greenfield’s picture

Status: Active » Needs review

Released for testing in BETA2.

silkyD’s picture

I'm using flowplayer, but am having trouble seeing where I'd change the player size through a profile. Am I missing something? Thanks!

Stuart Greenfield’s picture

Follow the steps in #15 to create a profile. Then on the profiles page click "Configure" for the profile you want to modify. You'll then see a separate tab for each player available for configuration. Choose your settings and hit save. That's it - you're done.

Your new profile is available to the input filter, or directly via CCK.

James Marks’s picture

To access the new features enable SWF Tools Profiles, then go to Administer > Site configuration > SWF Tools > Profiles.

You'll see a page that looks very much like the CCK content type form. Create a new profile, and then configure it.

I'm using SWF Tools 6.x-3.0-beta3 and no such menu item or form exists.

James Marks’s picture

I'm using SWF Tools 6.x-3.0-beta3 and no such menu item or form exists.

Figured it out. Disregard.

jimmb’s picture

Subscribing.

I need exactly this functionality for the 1 Pixel Out player (to autostart on the frontpage, but be closed on other pages). Hopefully this will be available for the 1 Pixel Out soon...

Jim

Stuart Greenfield’s picture

Image rotator is now profile enabled. I think that's all of the player modules done...

SchnWalter’s picture

discipolo’s picture

this is great! just wanted to bump the question whether the FlowPlayer3 embedding section checkbox works for swftools profiles with the dev version. it doesnt in beta4.

demonrage’s picture

hello,

i have a website for playing audio files, i use wordpress player for all audio on my website, so now i want some audion files on frontpage to play autostart, but on other pages (different content types and different cck) to stop at first then user choose what file to play.

i created 2 profile (play - for auto start) and (stop - for not to auto start), when i reviewed the site all players autostart by default no matter what profile i choose for them in the views

p.s: the global configuration set to not to autostart

so how can i solve this ??