diff --git a/video_embed_field.handlers.inc b/video_embed_field.handlers.inc index d6c2b0b..5a76edc 100755 --- a/video_embed_field.handlers.inc +++ b/video_embed_field.handlers.inc @@ -142,16 +142,12 @@ function _video_embed_field_get_youtube_id($url) { function video_embed_field_handle_youtube($url, $settings) { $output = array(); - //Grab the minutes and seconds, and just convert it down to seconds - preg_match('/#t=((?P\d+)m)?((?P\d+)s)?/', $url, $matches); - - //Give it some default data in case there is no #t=... - $matches += array( - "min" => 0, - "sec" => 0, - ); - $time = ($matches["min"] * 60) + $matches["sec"]; - $settings['start'] = $time; + //Grab the minutes and seconds, and just convert it down to seconds. + //If #t doesn't exist, don't set start=0 as this will break live streams. + if (preg_match('/#t=((?P\d+)m)?((?P\d+)s)?/', $url, $matches)) { + $time = ($matches["min"] * 60) + $matches["sec"]; + $settings['start'] = $time; + } $id = _video_embed_field_get_youtube_id($url); if (!$id) {