Hi,
I create a mediaplayer in runtime via this code:
this creates a video that plays in the background when i call m.Play
Now, every now and then I want to play a different video....
When I re-initialize the mediaplayer object with the same code but a different filename nothing happens.
When I try to create another mediaplayer I cannot view the video probably because the first video is projecting over it ?
When I try to remove the node in runtime I have to give an index of which node to remove ?
Any suggestions ?
thank you
I create a mediaplayer in runtime via this code:
B4X:
Private m As MediaPlayer
Private mv As JavaObject
m.Initialize("m",File.GetUri("D:\Kiwanis\2018-2019\Sportcommissie\DonkerRun\Rode Knop","effect5.mp4"))
mv.InitializeNewInstance("javafx.scene.media.MediaView",Array(m))
MainForm.RootPane.AddNode(mv,0,0,1000,1000)
mv.RunMethod("toBack",Null)
this creates a video that plays in the background when i call m.Play
Now, every now and then I want to play a different video....
When I re-initialize the mediaplayer object with the same code but a different filename nothing happens.
When I try to create another mediaplayer I cannot view the video probably because the first video is projecting over it ?
When I try to remove the node in runtime I have to give an index of which node to remove ?
Any suggestions ?
thank you