Bug 27422: YouTube videos are HTTPS only
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 3 Feb 2021 22:50:29 +0000 (19:50 -0300)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Thu, 18 Feb 2021 13:37:34 +0000 (13:37 +0000)
commitc0135fdbe3678e39c61a4b8ca258fa675dde8d3a
tree98d336148e66104b3baf3cde645a6d720e4adaa7
parent0c3096e0504491b63889ec5b84d27cb7a3a7bcfe
Bug 27422: YouTube videos are HTTPS only

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>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ca5efc9aa45c3c7893a09cf0067718fdaab63507)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ed2765ddc38c7c19461806b996319aed147c188f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
C4/HTML5Media.pm