Open renjithspace opened 4 years ago
use DataURI\Parser; $audio = Parser::parse('data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAA'); $mime = $audio->getMimeType(); echo $mime;
audio/mp3
audio/mp
Totally the same for the video/mp4 case. The problem is inside the regexp pattern.
video/mp4
Code
Expected
Output