-
Notifications
You must be signed in to change notification settings - Fork 20
Class: Video
Saqib Razzaq edited this page Mar 17, 2019
·
1 revision
Video class extends Videos class and is basically a wrapper to make it easier to interact with a single video. All methods except fetch() return data from already fetched array.
- fetch
- title
- uploaderName
- duration
- prettyDuration
- filename
- date
- directory
- comments
- scope
- isPublic
- isPrivate
Fetches initial video data for video and makes other methods available
An array consisting of all available fields for video
$video = new Video(122); // 122 is ID
$video->fetch(); // now all other methods are ready to be used
Get video title
$video->title();
Get video uploader name
$video->uploaderName();
Get video duration seconds
$video->duration();
Get video duration in human readable format
Video duration in 00:00:00 format
$video->prettyDuration(); // 72 seconds == 01:12
Get video filename
$video->filename();
Get video upload date
$video->date();
Get video directory in Y/m/d format
$video->directory();
Get total comments count
$video->comments();
Get video scope
$video->scope();
Check if video is public
Boolean
$video->isPublic();
Get if video is private
Boolean
$video->isPrivate();