starting youtubevideo at special timestamp does not work

Bug #1806169 reported by Andreas Schenkel on 2018-12-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Medium
Lisa Seeto

Bug Description

 When I add a timestamp to start a youtubevideo
https://www.youtube.com/watch?v=**************&t=30
the video starts from the beginning and does not start at 30seconds.
mahara 18.04

This is a problem in YouTube and how YouTube constructs its links.

If you copy the short "Share" link, e.g. https://youtu.be/8kH3t0vbxMA?t=70 Mahara transforms that into the regular iframe code:

<iframe width="560" height="349" src="http://www.youtube.com/embed/8kH3t0vbxMA?t=70" frameborder=0 allowfullscreen mozallowfullscreen webkitallowfullscreen></iframe>

However, the actual embed code should not contain "t=70" but "start=70" when you use the full embed code. You get the correct embed code when you use the "Embed" option rather than just copying the link. If you do that, the video does start correctly at the required time.

Example:

<iframe width="560" height="315" src="https://www.youtube.com/embed/8kH3t0vbxMA?start=70" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

I think what we'll need to do is transform any YouTube link (when it's a URL only and not a full embed code) to re-write "t=XX" into "start=XX".

Changed in mahara:
status: New → Confirmed
importance: Undecided → Medium
tags: added: bite-sized
Changed in mahara:
status: Confirmed → In Progress
milestone: none → 19.04.0
assignee: nobody → Lisa Seeto (lisaseeto)
Steven (stevens-q) wrote :

Environment tested: Master
Browser tested: Chrome

PRECONDITIONS:
------------------------
1) Youtube video exists on Youtube and can be shared
2) The Youtube short code includes the video being started at the 30 second mark (base URL &t=30)

TEST STEPS:
------------------------
1) Log in as site admin
2) Create or edit and existing portfolio page
3) Add an external media block to the page
4) Add the Youtube short code into the "URL or embed code" field and save the block
5) Display the page and click the Youtube video
6) Confirm the video starts at the 30 second mark ✔

Catalyst QA Approved ✔

Lisa Seeto (lisaseeto) wrote :

There are a few ways the YouTube url can be formatted. Here is another example:

https://www.youtube.com/watch?v=8kH3t0vbxMA&feature=youtu.be&t=170
(you get this by copying directly from search bar of the browser window instead of the share button on the webpage for YouTube videos).

Steven (stevens-q) wrote :

Environment tested: Master
Browser tested: Chrome

PRECONDITIONS:
------------------------
1) Youtube video exists on youtube and can be shared
2) The Youtube short code includes the video being started at the 30 second mark (base URL &t=30)
3) an existing URL with code exists (https://www.youtube.com/watch?v=8kH3t0vbxMA&feature=youtu.be&t=170)

TEST STEPS:
------------------------
1) Log in as site admin
2) Create or edit and existig portfolio page
3) Add an external media block to the page
4) Add the youtube short code into the "URL or embed code" field and save the block
5) Display the page and click the youtube video
6) Confirm the video starts at the 30 second mark ✔
7) Add a second external media block to the page ans use the existing URL code mentioned above
8) Display the page and click the youtube video
9) Confirm the video starts at the 2min 50 second mark ✔

Catalyst QA Approved ✔

Steven (stevens-q) wrote :

Re-Test - used the above test script - still working as expected - no issues found

Catalyst QA Approved ✔

Reviewed: https://reviews.mahara.org/9599
Committed: https://git.mahara.org/mahara/mahara/commit/64c8163ee3fb7248d650641fc716b54ac4268054
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 64c8163ee3fb7248d650641fc716b54ac4268054
Author: Lisa Seeto <email address hidden>
Date: Tue Feb 26 11:35:57 2019 +1300

Bug 1806169: starting youtubevideo at special timestamp does not work

Updated url to replace ?t= with ?start=

behatnotneeded

Change-Id: Icc047ef0d8866dfbe7d7a21773ebfa7d440102ae
Signed-off-by: Lisa Seeto <email address hidden>

Robert Lyon (robertl-9) on 2019-04-04
Changed in mahara:
status: In Progress → Fix Committed

Reviewed: https://reviews.mahara.org/9705
Committed: https://git.mahara.org/mahara/mahara/commit/30c3b53033744ae47e0cbbbfbf26979869fed753
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.04_STABLE

commit 30c3b53033744ae47e0cbbbfbf26979869fed753
Author: Lisa Seeto <email address hidden>
Date: Tue Feb 26 11:35:57 2019 +1300

Bug 1806169: starting youtubevideo at special timestamp does not work

Updated url to replace ?t= with ?start=

behatnotneeded

Change-Id: Icc047ef0d8866dfbe7d7a21773ebfa7d440102ae
Signed-off-by: Lisa Seeto <email address hidden>

Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers