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

15
LINES

< > BotCompany Repo | #1018465 // Test JavaFX MediaPlayer for .m4a (OK on Linux and Windows)

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

Download Jar. Libraryless. Click here for Pure Java version (5686L/41K).

1  
!7
2  
3  
import javafx.scene.media.*;
4  
import javafx.embed.swing.JFXPanel;
5  
6  
static MediaPlayer player;
7  
8  
p-exp {
9  
  swing { new JFXPanel(); } // initializes JavaFX environment
10  
11  
  S name = fileToURI(desktopDir("Thompson Twins - Hold Me Now-H9694K85Xc8.m4a"));
12  
  Media song = new(name);
13  
  player = new MediaPlayer(song);
14  
  player.play();
15  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1018465
Snippet name: Test JavaFX MediaPlayer for .m4a (OK on Linux and Windows)
Eternal ID of this version: #1018465/10
Text MD5: 317d71a639b9cdecf7ad9fa4e2b1b1fd
Transpilation MD5: c66d91d759ca4c624ae90250f87c3a64
Author: stefan
Category: javax / gui
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-09-30 23:11:47
Source code size: 343 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 504 / 1093
Version history: 9 change(s)
Referenced in: [show references]