Colibri 0.4

Colibri, formerly named PurePlayer, is an ultra-lightweight AS3 video player class. Pureplayer is open source, and based on pure actionscript, no library assets required.


1.What it looks like?

Actually the interface is really simple and easy to implement. Feel free to upgrade it as you like! Have a look here (by the way thats my punkrock band.. volume is turned to 0.. this tune is really noisy :-)

Get Adobe Flash player

2.How i get it into work?

The syntax is really simple and into the package there’s a .fla document with sample code included.  Something like this:

//import the colibri class.
import com.chrometaphore.display.video.colibri.Colibri;
import flash.media.SoundTransform;

//set few vars here...
var videoURL:String         = "path_to_video.f4v";
var videoWidth:Number       = 500;
var videoHeight:Number      = 300;
var autoPlayVideo:Boolean   = false;

//"adjust" keep the selected width / height ratio.
//"original" set the original video width / height
var resizeMode:String = "adjust";

//create a video player instance using the vars we just created
var player:Colibri = new Colibri(   videoWidth,
									videoHeight,
									videoURL,
									autoPlayVideo,
									resizeMode );

//set starting thumbnail..
player.thumbnail = "path_to_thumbnail.jpg";

//you can access the thumbnail properties in this way..
player.thumb.alpha = 0.5;

//i am setting the buffer time to 2 seconds..
player.video.stream.bufferTime = 2;

//player position..
player.x = 0;
player.y = 0;

//render the video instance
addChild(player);

//play video:
//player.play();

//pause video:
//player.pause();

//N.B -> you can control stream values -> using instance.video.stream
//for instance, the code below mute the video volume.
//var st:SoundTransform = new SoundTransform();
//st.volume = 0;
//player.video.stream.soundTransform = st;


3.The source code

Source code is fully included!
So, let me know if you like it and how i can make it better ;p

Current Colibri version is 0.4
v0.4 Changelog
- Added streaming preloader
- Added Thumbnail option
- Fixed minor bugs

v0.3 Changelog
- Fixed several resize bugs
- Fixed play button bug on autoplay set to false
- Improved overlay buttons control
- Added resizeMode option
- Added bar Magnification
- Added ‘seek’ command to the bar

Creative Commons License
PurePlayer by PurePlayer is licensed under a Creative Commons Attribuzione-Non commerciale-Condividi allo stesso modo 2.5 Italia License.
Based on a work at www.chrometaphore.com.
Permissions beyond the scope of this license may be available at www.chrometaphore.com


9 Responses to “Colibri – lightweight AS3 Video Player”

  1. cm says:

    404…

  2. admin says:

    Fixed, thanks.

  3. ben says:

    sweet player! i added a poster image option if ur interested

  4. Lorenzo says:

    thanks Ben! the poster image option sounds pretty interesting! send me an email at info[at]chrometaphore.com with your code :-)

  5. Dave Stewart says:

    Looks like an interesting project, but a couple of points:

    1) The fla is CS5
    2) Seeing class names MyVideo and MyVideoEvent scream “noob” ! What’s going on there?

  6. Marc Pilgaard says:

    Hi there :)
    Its a lovely player you have created, and we have decided to use it for our semester project at the university.
    But we are in dire need of some assistance, taking into consideration we aren’t AS3 gurus.

    We have created a button, to switch between several .FLV, attempting to make the player play multiple FLV files.
    But after importing a new string into the videoURL, it appears the player doesn’t recognize this videoURL change.
    When traced, the URL have changed to the new FLV file, but the player haven’t switched.
    Any help on this problem would be much appreciated.

  7. meester Kurt says:

    Very nice and easy to use class.
    Is there a way to implement playing youtube files.
    I’m desperatly looking for as-pure player that can play both.
    Could you point me in the right directions of what i should be changing.
    Any help would be much appreciated

Leave a Reply