April 20th 2008 - Entry Posted to:
ActionScript 3, Donator File, class
An Full Browser Background Video Demonstration
Supports either progressive or streaming video and audio (AAC) files (streaming tested using Red 5 and FMS). The demo consists of 3 classes, the main NpVideoProvider Class handles acquiring video, a NetConnect Class handles all netConnection duties, and an event class handles all the necessary events. Originally I wrote a class to handle testing BandWidth on streaming servers, but I didn’t think people would want that. If I’m wrong, I can add that functionality back in?
Class allows for loading in seperate files. So it would be pretty simple to turn this into a video slideshow. Class also, dispatches progress events along with events for each relevant netStatus event.
Class Features.
External Video files.
Either .flv, or .mp4 (h264), f4v, m4a (AAC), m4v, files.
Get / Set video looping.
Dispatches Progress events.
Get / Set a load point at which point video plays.
Get / Set video source files.
Play, Stop, Pause Methods.
Get / Set Seek Points.
Get / Set Sound volume.
Get / Set Sound Pan.
Get / Set Video Smoothing.
Get Video MetaData.
Get Video CuePoints.
Get Video XMP Data.
Get Video Image Data.
Get Video Text Data.
Definable Min scale size at which point the videos are clipped.
Supports FullScreen Events.
The demo contains two examples, one similar to what is online and one much more basic version. When I have time I’ll finish off a 3rd demo for using the NpVideoProvider Class as the base for a FLV player.
Updates11 Oct 2008: Renamed a property. Updated help files, updated demo files to more clearly show how to avoid stretching your video files.
08 December 2008: Added in support for f4v files, by adding in callback handlers for XMP, text and Image Data. The demos have been updated to demonstrate pulling in cover art from both a video and AAC audio source using the NpVideoProvider Class. The class is at Revision 1.1 now.
In this demo, I’m also using a tiled Background class, as a pattern overlay. This decreases performance notably. There is an option to turn this off in the demo.
View Example
Here is an example; http://www.noponies.com/dev/as3_fullscreen_bg_vid/
Source Files
Donate if you want these source files
Dependencies
None.