Some YouTube videos cannot be played beacause of a 403 error of the videoplayback URL. Video for testing: https://www.youtube.com/watch?v=haT8g7oKnns
Created attachment 75441 [details] [review] Patch to embed youtube videos
To test the patch you have to: * install a new package: HTML::Video::Embed * overwrite your opac.css with the attached in the bug, or create your opac.css with this command from the opac-tmpl directory: lessc --clean-css="--s0 --advanced --compatibility=ie7" bootstrap/less/opac.less > bootstrap/css/opac.css * Enable the syspref HTML5MediaEnabled to some interface, and HTML5MediaYouTube to embed videos. * Edit a biblio and put some youtube video in a 856u field. * Check it in OPAC or INTRANET. The video https://www.youtube.com/watch?v=haT8g7oKnns can not be played before the patch, but after it has no problems.
Created attachment 75442 [details] OPAC css
Created attachment 75443 [details] [review] Patch to embed youtube videos This patch do not include the opac.css file
Created attachment 79829 [details] [review] Bug 20783: Cannot embed some YouTube videos due to 403 errors YouTube videos are embeded instead of played with its videoplayback URL, that can throw a 403 error To test the patch you have to: * Install a new package: HTML::Video::Embed * Rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client) * Enable the syspref HTML5MediaEnabled to some interface, and HTML5MediaYouTube to embed videos. * Edit a biblio and put some youtube video in a 856u field. * Check it in OPAC or INTRANET. The video https://www.youtube.com/watch?v=haT8g7oKnns can not be played before the patch, but after it has no problems. Sponsored-by: UCA - Universidad de Cádiz
Created attachment 79833 [details] [review] Bug 20783: Cannot embed some YouTube videos due to 403 errors YouTube videos are embeded instead of played with its videoplayback URL, that can throw a 403 error To test the patch you have to: * Install a new package: HTML::Video::Embed * Rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client) * Enable the syspref HTML5MediaEnabled to some interface, and HTML5MediaYouTube to embed videos. * Edit a biblio and put some youtube video in a 856u field. * Check it in OPAC or INTRANET. The video https://www.youtube.com/watch?v=haT8g7oKnns can not be played before the patch, but after it has no problems. Sponsored-by: UCA - Universidad de Cádiz
I rebased this patch and converted the CSS changes to SCSS. I also modified the commit message to include the test plan. It works well for me but I'm not sure about the explicit width and height for videos in the OPAC. Is it necessary? If so, shouldn't the same CSS change be added to the staff client?
HTML::Video::Embed has not had an update in 4 years (version 0.016000). Have you looked into options that are actively developed?
Hi Juan, I think the problem went from the fact that no video was available in webm (fmt=43) and that we could ask for the format list and get another URL. The problem is that 403 is returned for other formats as well (mp4) for instance. So apparently we should use an iframe to embed youtube videos (what does HTML::Video::Embed), and it is what Google suggests to do, but using JS, https://developers.google.com/youtube/iframe_api_reference Would it work?
Additional infos: The issue has been reported 3 years ago: https://github.com/xaicron/p5-www-youtube-download/issues/36 Does it only happen for audio-only?
This is still not working. In 19.05.09-there is no tab appearing for the video as there was before. I believe YouTube adjusted their API - this must have caused this.
Created attachment 104747 [details] [review] Bug 20783: Use iframe to embed Youtube videos WWW::YouTube::Download is broken and not reliable. Other alternative was to use HTML::Video::Embed but not updated since years. The best alternative seems to follow youtube advise and use an iframe https://developers.google.com/youtube/iframe_api_reference Test plan: Put youtube video in 856$u (using different url formats, youtu.be, youtube.com/embed, etc.) Enable HTML5MediaEnabled and HTML5MediaYouTube and confirm that the youtube videos are correctly embeded.
Created attachment 104748 [details] [review] Bug 20783: Remove WWW::YouTube::Download dependency No longer used.
We are now hitting https://github.com/xaicron/p5-www-youtube-download/issues/55 I decided to remove the dependency and use the recommanded way. Please test these patches and confirm it fixes the different issues.
Hi, This does work on the staff side as it once did, however, the OPAC portion is not working. The play media tab shows on both the staff side and the OPAC, but the OPAC play media tab does not play the youtube video, only shows a black box - attempting to play the video.
Created attachment 104771 [details] youtube tab on OPAC
Can you share what you have in 856$u?
Ho right, I did not modify the OPAC template!
Created attachment 104774 [details] [review] Bug 20783: Similar changes for OPAC
Jonathan: https://youtu.be/s16RSFQG4T0
Created attachment 104779 [details] [review] Bug 20783: Use iframe to embed Youtube videos WWW::YouTube::Download is broken and not reliable. Other alternative was to use HTML::Video::Embed but not updated since years. The best alternative seems to follow youtube advise and use an iframe https://developers.google.com/youtube/iframe_api_reference Test plan: Put youtube video in 856$u (using different url formats, youtu.be, youtube.com/embed, etc.) Enable HTML5MediaEnabled and HTML5MediaYouTube and confirm that the youtube videos are correctly embeded. Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Created attachment 104780 [details] [review] Bug 20783: Remove WWW::YouTube::Download dependency No longer used. Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Created attachment 104781 [details] [review] Bug 20783: Similar changes for OPAC Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Working on both Staff and OPAC!
Created attachment 104799 [details] [review] Bug 20783: Similar changes for OPAC Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Created attachment 104800 [details] [review] Bug 20783: Similar changes for OPAC Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Hi Jonathan, this is missing filters - the automatic script adds html, but I think url or uri might be needed?
Created attachment 105198 [details] [review] Bug 20783: Add missing url filters
Created attachment 105210 [details] [review] Bug 20783: Use iframe to embed Youtube videos WWW::YouTube::Download is broken and not reliable. Other alternative was to use HTML::Video::Embed but not updated since years. The best alternative seems to follow youtube advise and use an iframe https://developers.google.com/youtube/iframe_api_reference Test plan: Put youtube video in 856$u (using different url formats, youtu.be, youtube.com/embed, etc.) Enable HTML5MediaEnabled and HTML5MediaYouTube and confirm that the youtube videos are correctly embeded. Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 105211 [details] [review] Bug 20783: Remove WWW::YouTube::Download dependency No longer used. Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 105212 [details] [review] Bug 20783: Similar changes for OPAC Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 105213 [details] [review] Bug 20783: Add missing url filters Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.01
this does not work on 19.11.x. please rebase if needed in 19.11.x
Created attachment 111177 [details] [review] [19.11.x] Bug 20783: Use iframe to embed Youtube videos WWW::YouTube::Download is broken and not reliable. Other alternative was to use HTML::Video::Embed but not updated since years. The best alternative seems to follow youtube advise and use an iframe https://developers.google.com/youtube/iframe_api_reference Test plan: Put youtube video in 856$u (using different url formats, youtu.be, youtube.com/embed, etc.) Enable HTML5MediaEnabled and HTML5MediaYouTube and confirm that the youtube videos are correctly embeded. Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 111178 [details] [review] [19.11.x] Bug 20783: Similar changes for OPAC Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 111179 [details] [review] [19.11.x] Bug 20783: Add missing url filters Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(In reply to Aleisha Amohia from comment #35) > this does not work on 19.11.x. please rebase if needed in 19.11.x Please push the 19.11.x. They basically skip the library dependency portion which is not an issue.
Backported to 19.11.x for 19.11.11
Not backported to oldoldstable (19.05.x). Feel free to ask if it's needed.
(In reply to Victor Grousset/tuxayo from comment #41) > Not backported to oldoldstable (19.05.x). Feel free to ask if it's needed. Yes I think it's needed.
ok! Backported to 19.05.x branch for 19.05.16