Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
208 views
in Technique[技术] by (71.8m points)

c# - Playing multiple videos at once

I'm using http handler to retrieve video from database this is my code

SqlConnection con = new SqlConnection(GetAttachmentConnectionString());
string vidId = context.Request.QueryString["VidID"];
con.Open();

SqlCommand command = new SqlCommand("select FileData from Attachment where AttachmentId = 1002", con);

SqlDataReader dr = command.ExecuteReader();
dr.Read();
context.Response.Buffer = true;
context.Response.ContentType = "video/mp4";
context.Response.BinaryWrite((Byte[])dr[0]);

con.Close();
context.Response.End();

And I'm using a Video tag on the client page. The issue is that everything works fine if there is only one video playing on the page. If I'm retrieving more than one, it shows a black box with controls and time 0:0

How can I solve this?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

USE REPEATER FOR THIS TO VIEW MULTIPLE VIDEO FROM DATABASE


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...