' Note MPS and SMB1 are declared as MediaPlayerStream and SMB in Globals as required
Sub Test_Click
Dim url, sPath, sPath2, sFile As String
Dim UserName, Password, Domain As String
UserName = "*********"
Password = "*******"
Domain = "********"
SMB1.Initialize("SMB1")
SMB1.SetCredentials(UserName,Password,Domain)
sPath = "smb://TBCI-01-NAS1/NA_Media/Music/StreamTest/"
sPath2 = "file://TBCI-01-NAS1/NA_Media/Music/StreamTest/"
sFile = "test1.mp3"
url = File.Combine(sPath,sFile)
SMB1.ListFiles(sPath,sFile)
MPS.Initialize("MPS")
[B]Log("File Exists: " & File.Exists(sPath,sFile))
Log("File Exists: " & File.Exists(sPath2,sFile))[/B]
MPS.Load(url)
End Sub
Sub SMB1_ListCompleted(Url As String, Success As Boolean, Entries() As SMBFile)
If Not(Success) Then
Log(LastException)
Else
For i = 0 To Entries.Length - 1
Log("*****************")
Log(Entries(i).Name)
Log(Entries(i).Directory)
Log(DateTime.Date(Entries(i).LastModified))
Log(Entries(i).Parent)
Log(Entries(i).Size)
Next
End If
End Sub
Sub MPS_StreamReady
Log ("Stream Ready")
MPS.Play
End Sub
Sub mps_StreamError (ErrorCode As String, ExtraData As Int)
Log("Error: " & ErrorCode & ", " & ExtraData)
ToastMessageShow("Error: " & ErrorCode & ", " & ExtraData, True)
End Sub