AudioDidact\SupportedSites\SoundCloud
Synopsis
class SoundCloud
extends SupportedSite
{
- // members
- private string $streamsBaseURL = "https://api.soundcloud.com/tracks/XYZ/streams?client_id=";
- private $clientID;
- private string $invalidURLMessage = "Invalid SoundCloud URL Entered.<br/>Valid URLs look like https://soundcloud.com/user_name/xxxxxxxxxxxx";
- private $thumbnailURL;
- private $audioJSON;
- // Inherited members from SupportedSite
- protected Video $video;
- // methods
- public void __construct()
- private void cURLHTTPGet()
- private void getVideoInfo()
- public bool allDownloaded()
- public void downloadThumbnail()
- private void getDownloadURL()
- public void downloadVideo()
- public void convert()
- public static void supportsURL()
- // Inherited methods from SupportedSite
- public static void supportsURL()
- public static bool|string getDuration()
- public static bool|string getDurationSeconds()
- public static bool allDownloadedVideo()
- public void allDownloaded()
- public abstract void downloadThumbnail()
- public abstract void downloadVideo()
- public void applyArt()
- public void convert()
- protected bool downloadWithPercentage()
- public Video getVideo()
- public static void echoErrorJSON()
Hierarchy
Coverage
Methods | 55.56% | 5 / 9 |
Lines | 93.07% | 94 / 101 |
Members
private
- $audioJSON
- $clientID
- $invalidURLMessage
- $streamsBaseURL
- $thumbnailURL
protected
- $video — \AudioDidact\Video
Methods
private
public
- __construct() — SoundCloud constructor. Gets the audio information, checks for it in the user's feed.
- allDownloaded() — Checks if all thumbnail, video, and mp3 are downloaded and have a length (ie. video or audio are not null)
- convert() — Since SoundCloud is audio only, we do not convert, but only add the album artwork
- downloadThumbnail() — Download thumbnail
- downloadVideo()
- supportsURL()
Inherited from AudioDidact\SupportedSites\SupportedSite
protected
- downloadWithPercentage() — Download the video to $localFile with a given $url While downloading output progress to UI as JSON array
public
- allDownloaded()
- allDownloadedVideo() — Checks if all thumbnail, video, and mp3 are downloaded and have a length (ie. video or audio are not null)
- applyArt()
- convert() — Converts mp4 video to mp3 audio using ffmpeg
- downloadThumbnail()
- downloadVideo()
- echoErrorJSON()
- getDuration() — Get duration of media file from ffmpeg
- getDurationSeconds() — Get duration in seconds of media file from ffmpeg
- getVideo() — Returns the current Video object
- supportsURL()