Click here to Skip to main content
11,584,288 members (60,906 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
 <object width="100%" height="100%" id="gsp_player_api" data="Players/flowplayer-3.2.5.swf"
   type="application/x-shockwave-flash">
  <param name="allowfullscreen" value="true">
  <param name="allowscriptaccess" value="always">
  <param name="quality" value="high">
  <param name="cachebusting" value="false">
  <param name="bgcolor" value="#000000">
  <param name="wmode" value="opaque">
   <param name="flashvars" value='config={"clip":{"autoPlay":true,"scaling":"fit","url":"VideoHandler.ashx?imgID=2"},"playerId":"gsp_player","playlist":[{"autoPlay":true,"scaling":"fit","url":"VideoHandler.ashx?imgID=2"}]}'>
   </object>
 


 
<%@ WebHandler Language="C#" Class="VideoHandler" %>
 
using System;
using System.Web;
using System.Data.SqlClient;
using System.Data;
 
public class VideoHandler : IHttpHandler {
    Class1 objcls = new Class1();
    public void ProcessRequest (HttpContext context) {
        string imageId = context.Request.QueryString["imgID"];
        SqlDataReader dr = objcls.SP_GET_VIDEO_BY_ID(imageId);
        if (dr.HasRows)
        {
            while (dr.Read())
            {
 
                context.Response.BinaryWrite((byte[])dr["VIDEO"]);
              
                context.Response.Flush();
            }
         context.Response.End();
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }
 
}
Error

200, Stream not found, NetStream.Play.StreamNotFound, clip: "[Clip]"http://localhost:6259/VideoHandler.ashx?imgID=2"
Posted 19-Feb-13 1:20am
Edited 22-Feb-13 18:14pm
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The working code will be
<object id="flowplayer" data="flowplayer-3.2.2.swf" type="application/x-shockwave-flash" width="320" height="240" >
    <param name="movie" value="flowplayer-3.2.2.swf">
    <param name="allowfullscreen" value="true">
    <param name="flashvars" value="config={'clip':{'url':'mymovie.mp4','autoPlay':false}}">
</object>

your url propery value is VideoHandler.ashx. If so then in your local host server http://localhost:6259" should have that ashx file and it should write video stream to Httpresponse object.
  Permalink  
Comments
Member-515487 at 23-Feb-13 0:16am
   
see i have uploaded my ashx file
n mymovie.mp4 it will work proper but when i am tring to use with ashx binary output write not working properly

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 430
1 Sergey Alexandrovich Kryukov 369
2 Dave Kreskowiak 260
3 Richard Deeming 220
4 virusstorm 194
0 OriginalGriff 1,663
1 Sergey Alexandrovich Kryukov 1,229
2 Abhinav S 701
3 Dave Kreskowiak 667
4 Suvendu Shekhar Giri 568


Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 23 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100