This library will allow you to extract the audio track from YouTube videos and save it as an MP3.
Requirements:
1- B4A 6.x.
2- Copy the YouTubeToMP3.xml and YouTubeToMP3.jar to your additional libraries directory.
3- Compile with SDK < 23, this is due to a glitch in the OkHTTP library which makes this lib not to work (This library uses the HTTP lib).
Usage:
*** See the attached sample for more details.
NOTES:
- The "LazySearch" feature doesn't seem to work on versions older than 4.4.
- In very rare cases some MP3s cannot be played using the DownloadAndPlayMP3 method, but can be played using a media player.
- This library was part of a personal project, just sharing it in case someone has some use for it.
Screen shots:
Shot 1
Shot 2
Requirements:
1- B4A 6.x.
2- Copy the YouTubeToMP3.xml and YouTubeToMP3.jar to your additional libraries directory.
3- Compile with SDK < 23, this is due to a glitch in the OkHTTP library which makes this lib not to work (This library uses the HTTP lib).
Usage:
B4X:
'Initialize the YouTubeToMP3 library.
Private YT As YouTubeToMP3
YT.Initialize(Activity, Me, "Tube")
YT.DownloadAndPlayMP3 = "sI7XiJgt0vY"
*** See the attached sample for more details.
NOTES:
- The "LazySearch" feature doesn't seem to work on versions older than 4.4.
- In very rare cases some MP3s cannot be played using the DownloadAndPlayMP3 method, but can be played using a media player.
- This library was part of a personal project, just sharing it in case someone has some use for it.
Screen shots:
Shot 1
Shot 2
Attachments
Last edited: