视频标记无法在移动设备上运行

Hel*_*Out 5 html vb.net asp.net video html5

我有一个ASP网站,根据HTTP参数播放视频 'id'

服务器端:

  Public vidurl As String
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim id As String = Request.QueryString("id")
        Dim DT As New DataTable
        Dim vidInfo As VideoInfo
        Try


            If id IsNot Nothing Then

                Dim SQLConnection_Cont As New SqlConnection(SQLConntStr)
                DT = f.GetVideoInfo(id, SQLConnection_Cont)

                If DT IsNot Nothing Then
                    If DT.Rows.Count > 0 Then
                        vidInfo = New VideoInfo With {
                             .ID = DT.Rows(0).Item("FTPID"),
                             .Processed = DT.Rows(0).Item("Processed"),
                             .URL = DT.Rows(0).Item("URL"),
                             .VideoName = DT.Rows(0).Item("VideoName"),
                             .VidID = DT.Rows(0).Item("VidID"),
                             .Created = DT.Rows(0).Item("Created"),
                             .MonthDiff = DT.Rows(0).Item("Monthdiff")}


                        If vidInfo.MonthDiff = 0 Then
                            vidurl = "http://webpath.com/virtualdirectory/content/" & vidInfo.VideoName
                           End If
                    End If
                End If 
          End If

        Catch ex As Exception
            WriteExToFile("Video.aspx.vb", ex.ToString)
        End Try

    End Sub
Run Code Online (Sandbox Code Playgroud)

客户端:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Video Player</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
        <div>
        <div id="vidplay">
            <video height="400"  controls style="position: relative; top: 23px;">
                 <source src=<%= vidurl %>  type="video/mp4" codecs="avc1.42E01E, mp4a.40.2"/>
                 <object data=src=<%= vidurl %> width="320" height="240"></object> 
            </video>
       </div>
       </div>
   </form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

所以我在全局变量中传递虚拟目录中的视频路径 vidurl

当我在Google Chrome for Desktop上播放时,我只会听到视频中的声音,并带有黑色图像.

当我在手机上播放时,会出现黑色视频,但它根本不播放任何内容.

可能是什么问题?

请注意,虚拟目录中的所有视频都是mp4格式.

更新:

我去了我视频中的编解码信息,

它说 : MPEG-4 Video (mp4v)

这可能是问题吗?

优先考虑视频在移动设备上运行.

Ron*_*ews 3

某些浏览器不支持某些文件格式。尝试添加其他网络视频格式源。

<source src="somevideo.webm" type="video/webm">
Run Code Online (Sandbox Code Playgroud)