This is one of those times where it's ok to use regex:
if(!preg_match("/<source src='([^?']*)/", $str, $m)) die('no match!');
$src = $m[1];
The reason being that it's not really html, it's javascript. No html parser will do a good job with this.