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

21
LINES

< > BotCompany Repo | #1019971 // Download video from YouTube & play in VLCJ frame

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Libraryless. Click here for Pure Java version (14676L/102K).

!7

module DownloadAndPlayVideo {
  S url = "https://www.youtube.com/watch?v=XTN0Z60_k00";
  
  visualize {
    ret centerAndEast(
      withLabel("Video URL to download: ", onEnter(rThread doIt, dm_fieldTextField('url))),
      jbutton("Download", rThread doIt));
  }

  void doIt enter {
    temp dm_tempDisableAllButtons();
    if (!validYouTubeID(extractYouTubeID(url)))
      ret with infoBox("That's not a valid YouTube URL: " + url);
    File f = dm_youTubeVideoDownloadToDir(url, downloadsDir("YouTube"));
    if (f == null) ret with infoBox("Couldn't download?");
    infoBox("Playing video...");
    dm_callModule(dm_makeOrShowModule("#1019320/VLCJTest"), 'playVideo, f);
  }
}

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: 306 / 433
Version history: 5 change(s)
Referenced in: [show references]