@H_301_1@我有一个ASP网站,根据HTTP参数’id’播放视频
@H_301_1@服务器端:
@H_301_1@
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
@H_301_1@客户端:
@H_301_1@
@H_301_1@所以我在全局变量vidurl中传递虚拟目录中的视频路径
@H_301_1@当我在Google Chrome for Desktop上播放时,我只会听到视频中的声音,并带有黑色图像.
@H_301_1@当我在手机上播放时,会出现黑色视频,但它根本不播放任何内容.
@H_301_1@可能是什么问题?
@H_301_1@请注意,虚拟目录中的所有视频都是mp4格式.
@H_301_1@更新:
@H_301_1@我去了我视频中的编解码信息,
@H_301_1@它说:MPEG-4视频(mp4v)
@H_301_1@这可能是问题吗?
@H_301_1@优先考虑视频在移动设备上运行.最佳答案
原文链接:https://www.f2er.com/html/426149.html