package simplevideoplayer;
import javafx.stage.Stage;
import javafx.scene.Scene;
import com.sun.fxmediacomponent.*;
import javafx.scene.Group;
var mediaUrl:String = "http:;
if(FX.getArgument("mediaURL")!=null) {
mediaUrl = FX.getArgument("mediaURL").toString();
}
println("playing {mediaUrl}");
def vidWidth = 640;
def vidHeight = 360;
var mediaBox:MediaComponent = MediaComponent {
mediaSourceURL : mediaUrl
visible:true
translateX: 0
translateY: 0
mediaViewWidth : vidWidth
mediaViewHeight: vidHeight
staticControlBar: false
mediaPlayerAutoPlay: true
volume: 0.5
};
mediaBox.mediaDescriptionStr = "A well-tempered rabbit finds his day spoiled by the rude actions of the...";
mediaBox.mediaDurationStr = "9:56";
mediaBox.mediaTitleStr = "Big Buck Bunny";
Stage {
title: "Simple Media Player"
scene: Scene{
width: vidWidth
height: vidHeight
content: mediaBox
stylesheets: [
MediaComponent.css_skins
]
}
}