Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

24
LINES

< > BotCompany Repo | #1003858 // JavaFX Video Player (controllable through bot)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (6622L/46K/163K).

!7

!include #1003758 // VideoPlayer

p {
  jfxForceGPU(); // fast playback!
  
  VideoPlayer.arg = or2(get(args, 0), "/big/Lenny Kravitz Let Love Rule.mp4");
  print("Playing " + VideoPlayer.arg + "...");
  jfxStart(VideoPlayer.class);
  
  makeBot("Video Player. " + quote(VideoPlayer.arg) + ".");
  
  hideConsole();
}

answer {
  MediaPlayer p = VideoPlayer.theMediaPlayer;
  if "play" { p.play(); ret "ok"; }
  if "pause" { p.pause(); ret "ok"; }
  if "stop" { p.stop(); ret "ok"; }
  if "seek * ms" { p.seek(new Duration(parseLong(m.unq(0)))); ret "ok"; }
  if "current time" { ret format("* ms", p.getCurrentTime().toMillis()); }
}

Author comment

Began life as a copy of #1003759

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003858
Snippet name: JavaFX Video Player (controllable through bot)
Eternal ID of this version: #1003858/2
Text MD5: 54be31cbe61b9ec5140a33f60e502d7c
Transpilation MD5: 2c5843f1d0b6c5ea19488074606c5168
Author: stefan
Category: javax / javafx
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-03 15:23:35
Source code size: 661 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 565 / 859
Version history: 1 change(s)
Referenced in: [show references]