News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

BBC: YouTube embed tag strips starting point time

Started by Antechinus, January 02, 2025, 04:39:32 PM

Previous topic - Next topic

Antechinus

As per: https://www.simplemachines.org/community/index.php?msg=4184366

If you use the SMF 2.1 YouTube embedding it strips the starting point timestamp from the url.

This is the original url I used as an input (which goes straight to the beginning of the fireworks).
https://www.youtube.com/watch?v=Fl7uOVJqE_0&t=290s
This is the result using SMF 2.1 YouTube embed.  Note that instead of starting at 290 seconds it starts at 0.


ETA: Just for added embarrassment, do note that phpBB's media embedding does not strip the starting times from embedded videos. They embed with the selected starting time still functional.

Sesquipedalian

This is the expected behaviour as provided by SCEditor's YouTube BBCode, and thus not a bug.

If you would like to make a feature request to add support for timestamp parameters in YouTube URLs, please feel free to do so. :) 
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

GL700Wing

Quote from: Sesquipedalian on January 02, 2025, 07:08:07 PMThis is the expected behaviour as provided by SCEditor's YouTube BBCode, and thus not a bug.
Interesting because it actually works as expected on the SCEditor website ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Aleksi "Lex" Kilpinen

Quote from: GL700Wing on January 02, 2025, 08:25:14 PM
Quote from: Sesquipedalian on January 02, 2025, 07:08:07 PMThis is the expected behaviour as provided by SCEditor's YouTube BBCode, and thus not a bug.
Interesting because it actually works as expected on the SCEditor website ...
For me, it works exactly the same as here - Only the video ID is preserved.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sesquipedalian

Quote from: Aleksi on January 02, 2025, 08:45:15 PMFor me, it works exactly the same as here - Only the video ID is preserved.

Likewise for me.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

GL700Wing

Quote from: Aleksi on January 02, 2025, 08:45:15 PMFor me, it works exactly the same as here - Only the video ID is preserved.
Interesting - when I click on 'Play' the video starts at 4:50 (ie, 290 seconds).

Video URL = https://youtu.be/Fl7uOVJqE_0

Video URL at current time = https://youtu.be/Fl7uOVJqE_0?t=290

Inspect: <iframe data-youtube-id="Fl7uOVJqE_0" src="https://www.youtube-nocookie.com/embed/Fl7uOVJqE_0?wmode=opaque&amp;start=290" allowfullscreen="" frameborder="0" height="315" width="560"></iframe>
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Aleksi "Lex" Kilpinen

The resulting BBC doesn't include the time for me, so it can't be captured. If you do see it, it's probably either a browser difference or actually Youtube remembering that you have already opened the video at that point and wants you to continue where you left off.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Diego Andrés


SMF Tricks - Free & Premium Responsive Themes for SMF.

Antechinus

Right. Well, it's an available "feature" now on a competing free software, and SMF 3,0 is not going to be appearing this year or next year. Seems like an ideal thing for a mod in the meantime.

TBH I do think it should be default behaviour. If you enter a url, that is the url that should be used.

Aleksi "Lex" Kilpinen

Simple Audio Video Embedder does autoembeds, not exactly the same functionality that is, but it does preserve Youtube timecodes as well. Can recommend.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

GL700Wing

Quote from: Aleksi "Lex" Kilpinen on January 03, 2025, 02:22:58 AMThe resulting BBC doesn't include the time for me, so it can't be captured. If you do see it, it's probably either a browser difference or actually Youtube remembering that you have already opened the video at that point and wants you to continue where you left off.
Interesting thing is that it worked for me every time on my Windows 10 PC with four different browsers (eg, Firefox, Chrome, Edge and an old release of Waterfox Classic) with multiple login accounts. 

However, and given that the video playback always started at 4:50 I don't think it could have been a case of YouTube remembering where I left off - wondering if maybe the YouTube BBCode parsing code implemented on the SCEdit website is different to what's in the distributed package.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Advertisement: