How do I change the start time for YouTube video widget?


(L J Gouveia) #1

My iBooks client wants to embed a YouTube tutorial video in an iBook. It is one long video, so he wants to break it into 4 video widgets by starting it at a different point for each one. (Video Tutorial Part 1 starts at 00:00, then Part 2 at 4:38, Part 3 at 12:34, etc.)

I’ve successfully made a widget that will play Part 1, and modified the code as shown below for the next parts. But when I test the iBook on my iPad, they all start at 0:00.

This is the embed code for Part 2:
iframe width=“1024” height=“768” src=“https://www.youtube.com/embed/I9N2Q4587D4?t=4m38s” frameborder=“0” allowfullscreen=""
(I added ?=4m38s to the embed code.)

Thanks!


(Hans-Gerd Claßen) #2

have you tried

...?start=35

start = desttime in seconds

though you can not pause the video via embed-code …

you may have a look at youtubes-player-api to get more control on it

myPlayer.seekTo(timeInSeconds, true)

will be the method to go to a specific time

do a search in this forum to find some examples


(L J Gouveia) #3

?start= worked perfectly. Thank you! I’d send you a drink if I could!