【发布时间】:2012-12-28 05:48:18
【问题描述】:
有人用jwplayer连续播放多个flv文件吗? 为了进一步澄清,我想知道 jwplayer 何时完成播放视频,以便我可以开始播放下一个视频。
到目前为止,我可以播放一部电影,但我不能一个接一个地播放
到目前为止的代码:
Imports System.IO
Imports System.Net.Sockets
Public Class Form1
Friend WithEvents AxShockwaveFlash1 As New AxShockwaveFlashObjects.AxShockwaveFlash
Dim PlayingFlash As Boolean = False
Dim PlaylistHidden As Boolean = False
Dim SettingUseJwPlayer3_16 As Boolean = True
Sub OpenFLV(ByVal strFile As String, ByVal AxShockWaveFlash As AxShockwaveFlashObjects.AxShockwaveFlash)
Dim strPath As String
Dim PlayerPath As String = My.Computer.FileSystem.SpecialDirectories.Temp & "\player.swf"
If File.Exists(PlayerPath) Then File.Delete(PlayerPath)
File.WriteAllBytes(PlayerPath, My.Resources.player)
strPath = "file:///" & PlayerPath & "?file="
strPath = strPath & strFile
strPath = Replace(strPath, "\", "/")
With AxShockWaveFlash
.Stop()
.Visible = True
.Menu = False
.FlashVars = "&showstop=true&showdownload=false&height=" & AxShockWaveFlash.Height.ToString & "&width=" & AxShockWaveFlash.Width.ToString & "&showplay=true&autoscroll=false&autostart=true&overstretch=true&showicons=1&searchbar=false&controlbar=0"
.LoadMovie(0, strPath)
.Play()
End With
PlayingFlash = True
End Sub
Sub PlayJwPlayer3_16(ByVal Vid As String)
If Not AxShockwaveFlash1.IsDisposed Then AxShockwaveFlash1.Dispose()
AxShockwaveFlash1 = New AxShockwaveFlashObjects.AxShockwaveFlash
AxShockwaveFlash1.BeginInit()
AxShockwaveFlash1.Name = "AxShockwaveFlash1"
AxShockwaveFlash1.EndInit()
Me.Controls.Add(AxShockwaveFlash1)
AxShockwaveFlash1.Visible = True
AxShockwaveFlash1.Location = Panel1.Location
AxShockwaveFlash1.BringToFront()
PlayingFlash = True
Panel1.Visible = False
OpenFLV(Vid, AxShockwaveFlash1)
End Sub
Private Sub Play_Click(sender As Object, e As EventArgs) Handles Play.Click
PlayJwPlayer3_16("https://dp-geography.wikispaces.com/file/view/World+Cup+in+South+Africa+-+%28IB+Geography+Study+Sports%2C+Leisure+%26amp%3B+Tourism+%29.flv")
End Sub
End Class
【问题讨论】:
-
为什么不使用播放列表?您在这里使用的是什么版本的 JW Player?如果您使用的是 V5 或 V6,则可以使用播放列表,然后让一个项目一个接一个地重复。
-
v3.16 如何在 vb.net 中使用播放列表?如果你能告诉我,那就太棒了。到目前为止我的代码在上面:-) 现在我的问题是我无法检测到一个项目何时完成以便开始播放下一个
-
3.16 已经很老了。我必须去archive.org ;) web.archive.org/web/20080105051613/http://… autostart (true,false):在播放器中将此设置为 true 以在页面加载时自动开始播放,或者使用旋转器将其设置为 false 以防止自动旋转。 repeat (true,false,list):将此设置为 true 以自动重复播放文件或播放列表。将此设置为 list 以播放播放列表中的所有项目一次。播放列表 - web.archive.org/web/20080106114940/http://…
-
虽然你的帮助很好。你能帮我编码吗?这就是我一开始寻求帮助的原因
-
我将把它作为答案留在下面。
标签: vb.net visual-studio-2010 flash video-streaming jwplayer