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
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
- Added streaming preloader
- Added Thumbnail option
- Fixed minor bugs
- 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
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