You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Sat, Mar 18, 2023 at 3:49 PM Hasnat WE ***@***.***> wrote:
@alaouy <https://github.com/alaouy> Thanks for this awesome plugin. We
need to support new YouTube shorts.
I am using following for only parsing ID and everything is working fine
including shorts videos.
/**
* @param string|null $url
* @return string|null
*/
public static function getYouTubeVideoIDFromUrl(?string $url)
{
// See https://stackoverflow.com/a/71006865/3501553
preg_match('/(youtu.*be.*)\/(watch\?v=|embed\/|v|shorts|)(.*?((?=[&#?])|$))/', $url, $matches);
return ($matches[3] ?? null);
}
I hope we can use this logic in \Alaouy\Youtube\Youtube::parseVidFromURL().
—
Reply to this email directly, view it on GitHub
<#186>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXZOKK2BH22KE4I72WTPITW4XDNXANCNFSM6AAAAAAV7QMU44>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
@alaouy Thanks for this awesome plugin. We need to support new YouTube shorts.
I am using following for only parsing ID and everything is working fine including shorts videos.
I hope we can use this logic in \Alaouy\Youtube\Youtube::parseVidFromURL().
The text was updated successfully, but these errors were encountered: