Bugzilla – Attachment 45724 Details for
Bug 15225
Make HTML5Media work with file upload feature
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15225: Make HTML5Media work with file upload feature.
Bug-15225-Make-HTML5Media-work-with-file-upload-fe.patch (text/plain), 2.05 KB, created by
Marcel de Rooy
on 2015-12-16 15:10:15 UTC
(
hide
)
Description:
Bug 15225: Make HTML5Media work with file upload feature.
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-12-16 15:10:15 UTC
Size:
2.05 KB
patch
obsolete
>From 62fd802aa3ee5bb1c4152e4641b3836123058851 Mon Sep 17 00:00:00 2001 >From: Mirko Tietgen <mirko@abunchofthings.net> >Date: Mon, 16 Nov 2015 18:10:27 +0100 >Subject: [PATCH] Bug 15225: Make HTML5Media work with file upload feature. >Content-Type: text/plain; charset=utf-8 > >Koha::Upload allows files to be attached to bibliographic records. >HTML5Media streaming in Koha does not work with these files. > >Test plan: >- apply patch >- make sure OPACBaseURL is set correctly >- enable HTML5MediaEnabled in OPAC and staff client >- connect upload.pl to 856$u in your framework >- upload a file with an extension set in HTML5MediaExtensions, > make sure to set the codec correctly if you use WEBM (subfield c, > eg. 'vp8, vorbis') >- save record, view in staff client and browser, check if 'Play > media' option is available and works > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/HTML5Media.pm | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > >diff --git a/C4/HTML5Media.pm b/C4/HTML5Media.pm >index c8c8a77..2bdb794 100644 >--- a/C4/HTML5Media.pm >+++ b/C4/HTML5Media.pm >@@ -1,6 +1,6 @@ > package C4::HTML5Media; > >-# Copyright 2012 Mirko Tietgen >+# Copyright 2012/2015 Mirko Tietgen > # > # This file is part of Koha. > # >@@ -22,7 +22,7 @@ use warnings; > > use C4::Context; > use MARC::Field; >- >+use Koha::Upload; > > =head1 HTML5Media > >@@ -109,7 +109,14 @@ sub gethtml5media { > next; # no file to play > } > # extension >- $HTML5Media{extension} = ($HTML5Media{srcblock} =~ m/([^.]+)$/)[0]; >+ # check uploaded files >+ if ( $HTML5Media{srcblock} =~ /\Qopac-retrieve-file.pl\E/ ) { >+ $HTML5Media{extension} = (Koha::Upload->new->get({ hashvalue => (split(/id=/, $HTML5Media{srcblock}))[1] })->{name} =~ m/([^.]+)$/)[0]; >+ } >+ # check remote files >+ else { >+ $HTML5Media{extension} = ($HTML5Media{srcblock} =~ m/([^.]+)$/)[0]; >+ } > if ( !grep /\Q$HTML5Media{extension}\E/, @HTML5MediaExtensions ) { > next; # not a specified media file > } >-- >1.7.10.4
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 15225
:
45205
|
45724
|
45725
|
45975
|
45976
|
45977