Bugzilla – Attachment 116297 Details for
Bug 27422
HTML5Media is http by default but Youtube is https only
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27422: YouTube videos are HTTPS only
Bug-27422-YouTube-videos-are-HTTPS-only.patch (text/plain), 1.85 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-02-03 22:58:55 UTC
(
hide
)
Description:
Bug 27422: YouTube videos are HTTPS only
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-02-03 22:58:55 UTC
Size:
1.85 KB
patch
obsolete
>From a9a6b5c8b44eac21572052ea68e0aba6845824d0 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 3 Feb 2021 19:50:29 -0300 >Subject: [PATCH] Bug 27422: YouTube videos are HTTPS only >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch hardcodes HTTPS as the protocol to use when generating >YouTube content embedding. It is the supported protocol and without this >patch it falls back to 'http', or it can be 'ftp' depending on the first >indicator of the 856 field. They are all not supported so hardcoding it. > >To test: >1. Have a record with 856 $uhttps://youtu.be/sMNkDPFycNU >2. Enable the HTML5MediaYouTube and HTML5Media sysprefs >3. Open the OPAC detailed view of the record >4. Open the Multimedia tab >=> FAIL: There's no embedded video >5. Apply this patch >6. Restart all >7. Repeat 4 >=> SUCCESS: There's a live performance of Heroes del Silencio! >8. Sign off :-D > >Sponsored-by: Banco Central de la República Argentina > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/HTML5Media.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/HTML5Media.pm b/C4/HTML5Media.pm >index 04fc2631694..72c9ce7a6e9 100644 >--- a/C4/HTML5Media.pm >+++ b/C4/HTML5Media.pm >@@ -105,7 +105,7 @@ sub gethtml5media { > next unless $url =~ m{^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*}; > my $video_id = $2; > next unless length($video_id) == 11; # Youtube video ids are 11 chars length >- $HTML5Media{srcblock} = sprintf '%s://www.youtube.com/embed/%s', $HTML5Media{protocol}, $video_id; >+ $HTML5Media{srcblock} = sprintf 'https://www.youtube.com/embed/%s', $video_id; > $HTML5Media{is_youtube} = 1; > $is_youtube = 1; > } >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27422
:
116297
|
116308
|
116463