使用HTML5播放器流式传输视频 - 多个视频块作为单个视频

时间:2014-12-19 10:47:37

标签: c# asp.net html5 video-streaming

我使用以下C#代码来传输视频块。 GetVideoBytes()从另一个域获取视频内容的字节数。

C#

        [WebMethod(EnableSession = true)]
        public void GetVideoChunkContent()
        {
        byte[] videoChunk =GetVideoBytes();
        if (videoChunk.Count() == 0)
            throw new FileNotFoundException();
        HttpContext.Current.Response.ContentType = "video/mp4";
        HttpContext.Current.Response.OutputStream.Write(videoChunk, 0, videoChunk.Length);
       }

HTML

<video controls=""><source type="video/mp4" src="ClientSideMethods.asmx/GetVideoChunkContent"></video>

该视频正在html5播放器中播放,但重播,寻求等不起作用。 另外,我想实现将一组视频块作为单个视频一起播放。 我怎样才能达到这两个要求?

0 个答案:

没有答案
相关问题