cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sue_winter
Community Participant

Setting Stop Time Not Working for Embedded Videos

I have used html code to set a stop time for a video that I have uploaded to Canvas and added to a Canvas page, but I can't get it to work with an embedded video. I have looked at Notes on YouTube Playlists, and the information re this seems to be the same as what I am doing.

Here is the original html embed code:

<p><iframe src="https://www.youtube.com/embed/VN6tlhsWkLI" width="560" height="500" allowfullscreen="allowfullscreen" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"></iframe></p>

Here is what I changed it to by adding start and stop times:

<p><iframe src="https://www.youtube.com/embed/VN6tlhsWkLI?start=5&stop=221" width="560" height="500" allowfullscreen="allowfullscreen" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"></iframe></p>

Here is what Canvas ultimately changes it to (after saving and going back in):

<p><iframe src="https://www.youtube.com/embed/VN6tlhsWkLI?start=5&amp;stop=221" width="560" height="500" allowfullscreen="allowfullscreen" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"></iframe></p>

When I save this page, there are no start or stop times for the video. It just plays from beginning to end. When I return to the html code, my start and stop times are still there, but don't seem to do anything.

Has anyone else run into this?

4 Replies
James
Community Champion

 @sue_winter  

I haven't tried this myself, but the documentation from YouTube suggests that end is the parameter you want instead of stop.

That is, use start=5&end=221 instead of start=5&stop=221

YouTube Embedded Players and Player Parameters 

I'm not sure if that will help or not because I am not sure what you mean when you say you uploaded it to Canvas. Are you talking about Canvas Studio? In the definition of "upload" that I'm envisioning, you wouldn't be embedding with a YouTube URL if the video was uploaded into Canvas. If you're referring to a YouTube URL, then you wouldn't be using the version you uploaded into Canvas.

sue_winter
Community Participant

My mistake. I actually was using end not stop. Sorry for the confusion.

Also, by upload, I mean that I uploaded an mp4 into Canvas Files. Then added it to a page. When I add the end parameter to that video, it does correctly stop the video at the time I have indicated. The problem occurs when I try to add the end parameter to an embedded video only.

Hi, I'm having the same trouble trying to set an end time on the YouTube video I'm embedding on a Canvas page.  Were you able to find a solution for this problem?

SaraD20
Community Member

This worked for me!

;start=11&;end=52

Example: <iframe src="https://www.youtube.com/embed/ceMtoX24aI0?;start=11&amp;end=52"........

Needed to add both the & and the ; to get it to work. The & was then converted to &amp by Canvas after I saved but it still works.

@sue_winter