Libraryless. Click here for Pure Java version (14676L/102K).
1 | !7 |
2 | |
3 | module DownloadAndPlayVideo { |
4 | S url = "https://www.youtube.com/watch?v=XTN0Z60_k00"; |
5 | |
6 | visualize { |
7 | ret centerAndEast( |
8 | withLabel("Video URL to download: ", onEnter(rThread doIt, dm_fieldTextField('url))), |
9 | jbutton("Download", rThread doIt)); |
10 | } |
11 | |
12 | void doIt enter { |
13 | temp dm_tempDisableAllButtons(); |
14 | if (!validYouTubeID(extractYouTubeID(url))) |
15 | ret with infoBox("That's not a valid YouTube URL: " + url); |
16 | File f = dm_youTubeVideoDownloadToDir(url, downloadsDir("YouTube")); |
17 | if (f == null) ret with infoBox("Couldn't download?"); |
18 | infoBox("Playing video..."); |
19 | dm_callModule(dm_makeOrShowModule("#1019320/VLCJTest"), 'playVideo, f); |
20 | } |
21 | } |
download show line numbers debug dex old transpilations
Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019971 |
Snippet name: | Download video from YouTube & play in VLCJ frame |
Eternal ID of this version: | #1019971/6 |
Text MD5: | bafea86423075530ebc418f0c6a71735 |
Transpilation MD5: | 3bf2de40f878f47992bc942351c8ee92 |
Author: | stefan |
Category: | javax / stefan's os / networking / video |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-02 16:46:03 |
Source code size: | 707 bytes / 21 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 307 / 436 |
Version history: | 5 change(s) |
Referenced in: | [show references] |