[wp-trac] [WordPress Trac] #40866: Video widget does not successfully play several permutations of YouTube URLs
WordPress Trac
noreply at wordpress.org
Thu May 25 19:31:40 UTC 2017
#40866: Video widget does not successfully play several permutations of YouTube
URLs
--------------------------+--------------------
Reporter: jnylen0 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.8
Component: Widgets | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+--------------------
Changes (by westonruter):
* keywords: => needs-patch
Comment:
In a post editor, if I add the following:
{{{
[video src="https://www.youtube.com/watch?v=i_cVJgIz_Cs&feature=youtu.be"]
[video src="https://www.youtube.com/watch?v=i_cVJgIz_Cs"]
}}}
Then when I look at the rendered output it generates:
{{{
<video class="wp-video-shortcode" id="video-97-1" width="640" height="360"
preload="metadata" controls="controls"><source type="video/youtube"
src="https://www.youtube.com/watch?v=i_cVJgIz_Cs&feature=youtu.be&_=1"
/><a
href="https://www.youtube.com/watch?v=i_cVJgIz_Cs&feature=youtu.be">https://www.youtube.com/watch?v=i_cVJgIz_Cs&feature=youtu.be</a></video>
<video class="wp-video-shortcode" id="video-97-2" width="640" height="360"
preload="metadata" controls="controls"><source type="video/youtube"
src="https://www.youtube.com/watch?v=i_cVJgIz_Cs&_=2" /><a
href="https://www.youtube.com/watch?v=i_cVJgIz_Cs">https://www.youtube.com/watch?v=i_cVJgIz_Cs</a></video>
}}}
But then when ME.js builds the players, I then see the first iframe URL is
clearly wrong compared to the second:
*
https://www.youtube.com/embed/watch?controls=0&wmode=transparent&enablejsapi=1&origin=http%3A%2F%2Fwestonruter.example.com&widgetid=2
*
https://www.youtube.com/embed/i_cVJgIz_Cs?controls=0&wmode=transparent&enablejsapi=1&origin=http%3A%2F%2Fwestonruter.example.com&widgetid=1
Notice how the first one lacks the video ID entirely.
I think we need to (1) upgrade the URLs to be HTTPS, and (2) normalize the
YouTube and Vimeo URLs
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40866#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list