Video is not playing with flow player in ASP.Net

Last Reply one year ago By dharmendr

Posted one year ago

Hi 

I am storing the .mp4 video in the videos folder which i have created in the solution explorer and storing the name,path in the database. Fetching the video and appending in the DataList. But the video is not playing, I am using flowplayer plugin

Here is my code:

<asp:DataList ID="DataList1" Visible="true" runat="server" AutoGenerateColumns="false"
    RepeatColumns="2" CellSpacing="5">
    <ItemTemplate>
        <u>
            <%# Eval("Name") %></u>
        <hr />
        <a class="player" style="height: 300px; width: 300px; display: block" href='<%# Eval("Path") %>'>
        </a>
    </ItemTemplate>
</asp:DataList>
<script src="FlowPlayer/flowplayer-3.2.12.min.js" type="text/javascript"></script>
<script type="text/javascript">
    flowplayer("a.player", "http://releases.flowplayer.org/swf/flowplayer-3.2.16.swf", {
        plugins: {
            pseudo: { url: "FlowPlayer/flowplayer.pseudostreaming-3.2.12.swf" }
        },
        clip: { provider: 'pseudo', autoPlay: false},
    });
</script>

And on the page load i am binding the video

protected void Page_Load(object sender, EventArgs e)
{

    if (!IsPostBack)
    {
        BindGrid();
    }
}


private void BindGrid()
{
    string strConnString = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
    using (SqlConnection con = new SqlConnection(strConnString))
    {
        using (SqlCommand cmd = new SqlCommand())
        {
            cmd.CommandText = "select Id, Name, Path from videopath";
            cmd.Connection = con;
            con.Open();
            DataList1.DataSource = cmd.ExecuteReader();
            DataList1.DataBind();
            con.Close();
        }
    }
}

 

Posted one year ago
Hi @kishore,
Please try the following

[Solved] MP4 Video saved in database not playing in FlowPlayer in ASP.Net

It might help you.

Cheers Andrea.

Posted one year ago

Hi @Cheers

I have already followed the samething didn't work, path and fetching from database is correct and videos is not corrupted.

Kishore


Posted one year ago

Change the script. Problem is with the online path for flowplayer. Use the offline path instead.

<script type="text/javascript">
    flowplayer("a.player", "FlowPlayer/flowplayer-3.2.16.swf", {
        plugins: {
            pseudo: { url: "FlowPlayer/flowplayer.pseudostreaming-3.2.12.swf" }
        },
        clip: { provider: 'pseudo', autoPlay: false }
    });
</script>

 

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html