有沒有人曾經使用jwplayer連續播放多個flv文件? 爲了進一步澄清,我想知道的是當jwplayer完成播放視頻時,我可以開始播放下一個視頻。有沒有人曾經使用jwplayer連續播放多個flv文件?使用vb.net
到目前爲止,我可以播放一部電影,但其他
代碼後,我打不了一個至今:
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,則可以使用播放列表,只需重複播放一個項目即可。 – emaxsaun
v3.16如何在vb.net上使用播放列表?如果你能告訴我那會很棒。我的代碼到目前爲止是:-) 現在對我來說問題是我無法檢測到一個項目完成以便開始播放下一個 – Santa
3.16已經很老了。我必須去archive.org;) http://web.archive.org/web/20080105051613/http://www.jeroenwijering.com/?item=Supported_Flashvars autostart(true,false):Set這可以讓玩家在頁面加載時自動開始播放,或者使用旋轉器將其設置爲false以防止自動旋轉。 repeat(true,false,list):將其設置爲true以自動重複播放文件或播放列表。將其設置爲列表可以播放播放列表中的所有項目一次。 播放列表 - http://web.archive.org/web/20080106114940/http://www.jeroenwijering.com/?item=Supported_Playlists – emaxsaun