This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Converts milliseconds to formatted time or seconds. | |
* @param int [$ms] The length of the media asset in milliseconds | |
* @param bool [$seconds] Whether to return only seconds | |
* @return mixed The formatted length or total seconds of the media asset | |
*/ | |
function convertTime($ms, $seconds = false) | |
{ | |
$total_seconds = ($ms / 1000); |