Libraryless. Click here for Pure Java version (6622L/46K/163K).
1 | !7 |
2 | |
3 | !include #1003758 // VideoPlayer |
4 | |
5 | p {
|
6 | jfxForceGPU(); // fast playback! |
7 | |
8 | VideoPlayer.arg = or2(get(args, 0), "/big/Lenny Kravitz Let Love Rule.mp4"); |
9 | print("Playing " + VideoPlayer.arg + "...");
|
10 | jfxStart(VideoPlayer.class); |
11 | |
12 | makeBot("Video Player. " + quote(VideoPlayer.arg) + ".");
|
13 | |
14 | hideConsole(); |
15 | } |
16 | |
17 | answer {
|
18 | MediaPlayer p = VideoPlayer.theMediaPlayer; |
19 | if "play" { p.play(); ret "ok"; }
|
20 | if "pause" { p.pause(); ret "ok"; }
|
21 | if "stop" { p.stop(); ret "ok"; }
|
22 | if "seek * ms" { p.seek(new Duration(parseLong(m.unq(0)))); ret "ok"; }
|
23 | if "current time" { ret format("* ms", p.getCurrentTime().toMillis()); }
|
24 | } |
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: | 916 / 1293 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |