VideoHelper
in package
FinalYes
Table of Contents
Methods
- dataURL2Blob() : string
- Convert Base64 to blob.
- isDataURL() : bool
- Is Base64.
- writeDataURLToFile() : string
- Put base64 video.
Methods
dataURL2Blob()
Convert Base64 to blob.
public
static dataURL2Blob(string $dataURL[, mixed &$mime = null ]) : string
Parameters
- $dataURL : string
- $mime : mixed = null
Return values
stringisDataURL()
Is Base64.
public
static isDataURL(string $dataURL[, mixed &$mime = null ]) : bool
Parameters
- $dataURL : string
- $mime : mixed = null
Return values
boolwriteDataURLToFile()
Put base64 video.
public
static writeDataURLToFile(string $dataURL, string $dir[, string|null $filename = null ]) : string
use \X\Util\VideoHelper;
VideoHelper::writeDataURLToFile('data:video/mp4;base64,iVBOR...', '/tmp', 'sample');
VideoHelper::writeDataURLToFile('data:video/mp4;base64,iVBOR...', '/tmp/sample.mp4');
Parameters
- $dataURL : string
- $dir : string
- $filename : string|null = null