Bugzilla – Attachment 176487 Details for
Bug 19339
Enhance streaming cataloging to include Vimeo
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19339: [WIP] Enhance streaming cataloging to include Vimeo
Bug-19339-WIP-Enhance-streaming-cataloging-to-incl.patch (text/plain), 2.42 KB, created by
Wainui Witika-Park
on 2025-01-14 05:31:04 UTC
(
hide
)
Description:
Bug 19339: [WIP] Enhance streaming cataloging to include Vimeo
Filename:
MIME Type:
Creator:
Wainui Witika-Park
Created:
2025-01-14 05:31:04 UTC
Size:
2.42 KB
patch
obsolete
>From c08ba8c9a545f00c2709e3f3073906715c25785c Mon Sep 17 00:00:00 2001 >From: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz> >Date: Tue, 14 Jan 2025 05:30:51 +0000 >Subject: [PATCH] Bug 19339: [WIP] Enhance streaming cataloging to include > Vimeo > >--- > C4/HTML5Media.pm | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > >diff --git a/C4/HTML5Media.pm b/C4/HTML5Media.pm >index 2c5a8786500..4411504bf07 100644 >--- a/C4/HTML5Media.pm >+++ b/C4/HTML5Media.pm >@@ -49,9 +49,11 @@ sub gethtml5media { > my $HTML5MediaWidth; > my @HTML5MediaExtensions = split( /\|/, C4::Context->preference("HTML5MediaExtensions") ); > my $HTML5MediaYouTube = C4::Context->preference("HTML5MediaYouTube"); >+ my $HTML5MediaVimeo = C4::Context->preference("HTML5MediaVimeo"); > my $marcflavour = C4::Context->preference("marcflavour"); > foreach my $HTML5Media_field (@HTML5Media_fields) { > my $is_youtube = 0; >+ my $is_vimeo = 0; > my %HTML5Media; > # protocol > if ( $HTML5Media_field->indicator(1) eq '1' ) { >@@ -113,6 +115,21 @@ sub gethtml5media { > next; # do not embed youtube videos > } > } >+ if (grep /vimeo/, $HTML5Media_field->subfield('u') ) { >+ if ($HTML5MediaVimeo == 1) { >+ my $url = $HTML5Media_field->subfield('u'); >+ next unless $url =~ m{^.*(vimeo.com/)([^#\&\?]*).*}; >+ >+ my $video_id = $2; >+ $HTML5Media{srcblock} = sprintf 'https://player.vimeo.com/video/%s', $video_id; >+ >+ $HTML5Media{is_vimeo} = 1; >+ $is_vimeo = 1; >+ } >+ else { >+ next; # do not embed vimeo videos >+ } >+ } > } > elsif ( $HTML5Media_field->subfield('a') && $HTML5Media_field->subfield('d') && $HTML5Media_field->subfield('f') ) { > $HTML5Media{host} = $HTML5Media_field->subfield('a'); >@@ -149,6 +166,11 @@ sub gethtml5media { > $HTML5Media{mime} = 'video/webm'; > $HTML5Media{type} = 'video'; > } >+ # vimeo >+ if ($is_vimeo == 1) { >+ $HTML5Media{mime} = 'video/webm'; >+ $HTML5Media{type} = 'video'; >+ } > # mime > if ( $HTML5Media_field->subfield('c') ) { > $HTML5Media{codecs} = $HTML5Media_field->subfield('c'); >-- >2.39.5
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 19339
:
67210
|
176484
|
176487
|
176488
|
177094
|
177330
|
177331