One of the ExpressionEngine projects I was working on needed an easy way
to embed YouTube videos, and wanted a way to start the video at a specific
time. The customer wanted it to be simple and didn’t want to fiddle about with
code.
I built the template so the customer only needed to give me two pieces of
information: Video URL (not embed code) and Video Start Time (in seconds,
if not 0:00).
The link URL and the Embed URL aren’t quite the same, but they’re pretty
close. Look at the difference:
Link URL: http://www.youtube.com/watch?v=HaQvBbzslJE
Embed URL: http://www.youtube.com/v/HaQvBbzslJE&hl=en_US&fs=1&
Using the plugin Low Replace, we can parse through the Link URL to change
watch?v= to v/. If there is a start time, then you can append it on the URL with
start=####. Remember, the start time must be in seconds when embedding a video.