Support start and end times in embedded [youtube] blocks | World Anvil

Remove these ads. Join the Worldbuilders Guild

Support start and end times in embedded [youtube] blocks

Feature Upgrade · Articles & templates · Created by skidznet
closed
youtube integration third-party

What functionality is missing? What is unsatisfying with the current situation?

Today, we can embed YouTube videos on a page. Normally, what we're supposed to do is copy-paste a "normal" YouTube URL into the BBCode and WorldAnvil will convert that to an iframe, and that's what I've done once or twice. It turns out that this also seems to work if I start with the desired embed URL, so I'll do that for my example here.   This is what it looks like when I do [youtube:https://www.youtube.com/embed/EzWNBmjyv7Y?start=7&end=12] (notice the start and end tags in that BBCode sample):   If you play that as WorldAnvil generates it, it will play the entire 15-second clip, and ain't nobody got time for dat. However, this is actually because WorldAnvil's embed code seems to have ignored my start and end timestamps. If you've already played the clip here, please reload the page before trying what I'm about to offer in the next paragraph.   If you actually go to the iframe using your browser's Inspect Element tool, however (simple way to do it: right-click the "What functionality is missing?" header above > Inspect, and scroll down a little bit, it should be pretty close), you can double-click the URL part in the "src=" attribute and append "?start=7&end=12" to it, to make it look like I had it. Then when you play the video, it will just get to the meat of that clip. For the casual readers here, this Inspect Element business is just to simulate what it would look like in your browser if WorldAnvil had the ability to do what I'm asking for here.   My personal ideal would be if this feature worked as I'm about to describe, but really, all I care about right now is start and end timestamps, so I'm perfectly satisfied with just (what I imagine to be) a straightforward change to the backend parse logic to scoop out these parameters:
  • If I fully specify a URL of the format https://www.youtube.com/embed/VIDEOID?ANYQUERYSTRINGPARAMETERS=FINE in my BBCode, then it gets passed through as-is. Assuming basic sanitization like URL-encoding the usual suspects, I don't think there are any actually offensive or dangerous things I could do, so I'm expecting that it's probably fine to just leave it at that and let power users like me go wild with it.
  • URLs of the format https://youtu.be/EzWNBmjyv7Y?t=7 (which you get from the main video page by clicking "Share" and using the "Start at" parameter) will get the "?start=7" query string parameter on the iframe.
  • URLs of the format https://www.youtube.com/watch?v=EzWNBmjyv7Y&t=7s (which is what your browser's address bar will probably look like after actually navigating to the link in the previous bullet) will also get the "?start=7" query string parameter on the iframe.
 

How does this feature request address the current situation?

Gives me a bigger range of YouTube clips that I can embed on article pages without annoying my readers (any more than the mere fact that I've embedded a YouTube video on their page).  

What are other uses for this feature request?

If YouTube has any other sugary bits that are exposed via the query string in /embed/VIDEOID (e.g., default playback speed, default subtitle state, etc.), then my suggestion for just passing the embed URL through as-is will automatically let me take advantage of that without any further work on your part.

The Team's Response

Nothing wrong, just really low support
Current score

15/300 Votes · +2202 points

Votes Cast

  • +100

    by Shadow Malachi
    on 2022-10-17 04:03
  • +100

    by namako
    on 2022-10-15 08:07
  • +300

    by Sir_Teabag
    on 2022-10-14 13:11
    Absolutely agree. It would be great to have specific moments be shown!
  • +300

    by ImperiaChronicles
    on 2022-10-11 18:24
  • +300

    by SableAradia
    on 2022-10-11 02:57
    I NEED THIS PLEEEASSSEEEEE - I have numerous long videos where I need to refer to a particular segment in an article - this would make my pages so much more user-friendly. I appreciate expense of implementation but I would really, really love this ty :)
  • +300

    by moonflower-writing
    on 2022-10-11 02:55
    If I understand this correctly (and it's very possible I don't), it would make things a lot easier to document for video-heavy worlds like the Game of Tomes.
  • +300

    by Hegemon
    on 2022-10-03 14:25
  • +1

    by A Sneaky Mlem
    on 2022-10-03 11:06
  • +300

    by illumiinae
    on 2022-10-03 03:29
  • -1

    by UnknownWriter88
    on 2022-09-30 17:29
  • -100

    by A Uncontrollable Kitten
    on 2022-09-30 08:16
  • +300

    by A Thundering Mimic
    on 2022-09-30 01:37
  • +1

    by sophiebean
    on 2022-09-29 17:00
  • +1

    by ddaniel
    on 2022-09-28 16:38
    I had to check myself how this work, but it does seem to generate a new embed link without parameters even if I use youtu.be or an embed link preset.   The cost of implementing it strongly depends on why this method was chosen instead of having the user generate their own embed link - probably so it works without having to know how to make an embed link.   Tricky, I have no use for this, but this is by no means negative (it only adds). Could be costly to implement thats all.
  • -300

    by A Roaring Orc
    on 2022-09-28 16:07
  • +300

    by skidznet
    on 2022-09-28 13:34