Java Reference
In-Depth Information
if(not(
if(player.mediaPlayer.status
==
MediaPlayer.PLAYING)){
playCtrl.image = Image{
url:"{__DIR__}pause-large.png"
}
player.mediaPlayer.play
();
}else if(player.mediaPlayer.status ==
MediaPlayer.PLAYING){
playCtrl.image = Image{
url:"{__DIR__}play-large.png"
}
player.mediaPlayer.pause();
}
}
}
ImageView
{id:"stopCtrl"
image:Image{url:"{__DIR__}stop-large.png"}
onMouseClicked:function(e:MouseEvent){
def playCtrl = e.source as ImageView;
if(
if(player.mediaPlayer.status
==
MediaPlayer.PLAYING){
playCtrl.image = Image{
url:"{__DIR__}play-large.png"
}
player.mediaPlayer.stop();
}
}
}
]}
]
}
When the
Group
variable
controls
and the
MediaView
instance's
player
are placed on
the scene, the application will create a window as shown in the next screenshot.