Community Extension : Gaia FlowPlayer (.FLV)

Modified: 2009/09/07 14:22 by admin - Categorized as: Community, Development, Download, Extensions, Gaia 3.0
Edit

Open Source Ajax FLV Player for ASP.NET C# and VB.NET

The Gaia FlowPlayer is an ASP.NET Server Control wrapping a Flash FLV player called FlowPlayer. Everything is taken care of and embedded into a flexible and easy to use Server Control that has all the useful properties and events you need available.

Click here for a quick online sample

Download

The control is licensed under GPL and you can download the source as an attachment. Quick samples are written in C# and VB.NET for your convenience. The samples doesn't contain an exhaustive introduction to the API, but covers a few nice features of the player.
Edit

Gaia Flow Player with default skin

FlowPlayer in Action

Because it utilizes the Gaia Ajax framework to it's fullest you can combine the Player with the powerful event model of Gaia and have access to events like OnPlayerStateChanged, OnCuePointReached and OnVideoClipFinished

ASPX Markup for the control. Here's a selection of the properties and events available
<gaia:FlowPlayer 
        ID="flowplayer"
        runat="server"
        AutoPlay="false"
        OnPlayerStateChanged="flowplayer_StateChanged"
        OnCuePointReached="flowplayer_CuePointReached"
        OnVideoClipFinished="flowplayer_VideoClipFinished"
        ControlsOverVideo="true"
        Width="480"
        Height="320"
        InitialVolumePercentage="40"
        InitScale="Scale"
        ShowFlashMenu="false"
        ShowFullScreenButton="true"
        ShowMenu="true"
        ShowMuteVolumeButton="true"
        ShowScrubber="true"
        ShowStopButton="true"
        ShowVolumeSlider="true"
        AlternativeContent="You don't seem to have flash installed"/>

It's never been easier to develop Video Enabled Sites using the powerful Gaia framework Intellisense in Visual Studio

Here's an example of the StateChanged event triggered

/// <summary>
/// FlowPlay dispatches this event when the state of the Player changes
/// </summary>
protected void flowplayer_StateChanged(object sender, FlowPlayer.StatusChangedEventArgs e)
{
lblStatus.Text = e.CurrentState == FlowPlayer.PlayerState.Paused ? "Video is paused" : "";
}

Using CuePoints you can add custom markers in the Video that will trigger Ajax events on the server. You can easily use these CuePoints to introduce "custom" functionality. In this sample we stop the video and open a modal panel on top of the video. When the user clicks the link inside the Panel, the video is resumed.

Here's how we add the CuePoints

flowplayer.AddCueuePoint(new CuePoint("ShowPanel", new TimeSpan(0,0,10)));
flowplayer.AddCueuePoint(new CuePoint("ShowInfo", new TimeSpan(0,0, 5)));

And here's how they are triggered on the server

protected void flowplayer_CuePointReached(object sender, CuePointReachedEventArgs e)
    {
        switch (e.CuePoint.Name)
        {
            case "ShowPanel":
                pnlModal.Visible = true;
                flowplayer.Pause();
                break;

case "ShowInfo": lblStatus.Text = @"This is informational text only and is display at CuePoint after 5 seconds";

new Effect(lblStatus, Effect.TypeOfEffect.Highlight); break; } }

Here's how the modal panel is displayed on top of the video that was Paused in the event

Cue Points to introduce custom functionality

Because it's based on the excellent FlowPlayer, you can find some of the features here

Edit

GPL source code used in this work


In order to use this project commercialy you need to abide by the license of the respective project owners. Click here to read more about dual licensing

Edit

Known Issues

See Open Issues at Google Code

Edit

Troubleshooting



ScrewTurn Wiki version 2.0.33. Some of the icons created by FamFamFam.