Private Sub loadvideo(ls As List)
' referenze java MediaView
' https://docs.oracle.com/javase/8/javafx/api/javafx/scene/media/MediaView.html
Dim m As MediaPlayer
Dim mv As JavaObject
Try
Dim url As String = File.Combine(File.DirApp,ls.Get(0))
Dim title As String = ls.Get(1)
If File.Exists(url,title) = True Then
m.Initialize("m",File.GetUri(url,title))
mv.InitializeNewInstance("javafx.scene.media.MediaView",Array(m))
viewvideo.AddView(mv,0,0,-1,-1)
mv.RunMethod("setX",Array(0.0))
mv.RunMethod("setY",Array(0.0))
mv.RunMethod("setFitWidth",Array(base.Width))
mv.RunMethod("setFitHeight",Array(base.Height-150))
m.CycleCount=-1
m.Volume=0
m.Play
Else
fx.Msgbox(Null,"Video " & title & " non trovato","")
End If
Catch
Log(m)
fx.Msgbox(Null,"Video non trovato","")
End Try
End Sub