[wp-trac] [WordPress Trac] #29534: Support JS API for Youtube Embeds
WordPress Trac
noreply at wordpress.org
Fri Sep 5 11:38:15 UTC 2014
#29534: Support JS API for Youtube Embeds
-------------------------+-----------------------------
Reporter: doytch | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Embeds | Version: 4.0
Severity: normal | Keywords:
Focuses: javascript |
-------------------------+-----------------------------
The automatic Youtube embeds in 4.0 are cool and standardise a feature
that's been implemented over and over again. However, it'd be nice if the
embed mechanism could be changed to support
[https://developers.google.com/youtube/js_api_reference Youtube's
Javascript API] so that plugin's could use the API to add additional
features on top of the baked-in embeds. For instance, I'm creating a
plugin that allows users to convert timestamps to links that skip to that
time in an embedded HTML5 audio or video tag. Youtube support works, but
only if the user embeds the iframe manually, specifying an HTTPS URL and
enablejsapi=1 in the query params.
For the HTTPS requirement, I suggest converting all Youtube embeds to use
HTTPS in the URL. I don't really see a downside to automatically doing
this, rather than forcing the user to specify it themselves.
For the enablejsapi requirement, I think it would make sense to include
this parameter automatically in the embed link Wordpress generates as
well. At the very least, if the user enters a Youtube URL with the
parameter set, the embed code should respect that and propagate it into
the iframe src. It currently doesn't keep that (any?) parameters set.
This is really a temperature-taking; I've looked at the code and I'm
willing and able to create this patch myself, I just want to make sure
it'd be well-received before going in and doing it. This seems to be the
correct place for this, but let me know if there's a better one.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29534>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list