Bug 15225 - Make HTML5Media work with file upload feature
Summary: Make HTML5Media work with file upload feature
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Mirko Tietgen
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-20 16:41 UTC by Mirko Tietgen
Modified: 2017-06-14 22:10 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15225: Make HTML5Media work with file upload feature. (1.95 KB, patch)
2015-11-26 19:15 UTC, Mirko Tietgen
Details | Diff | Splinter Review
Bug 15225: Make HTML5Media work with file upload feature. (2.05 KB, patch)
2015-12-16 15:10 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 15225: [QA Follow-up] Improve changes to gethtml5media (1.65 KB, patch)
2015-12-16 15:10 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 15225: Make HTML5Media work with file upload feature. (2.09 KB, patch)
2015-12-24 08:33 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 15225: [QA Follow-up] Improve changes to gethtml5media (1.46 KB, patch)
2015-12-24 08:33 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 15225: [QA Follow-up] Improve changes to gethtml5media (1.49 KB, patch)
2015-12-24 08:43 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mirko Tietgen 2015-11-20 16:41:13 UTC
Koha::Upload allows files to be attached to bibliographic records. HTML5Media streaming in Koha does not work with these files.
Comment 1 Mirko Tietgen 2015-11-26 19:15:31 UTC Comment hidden (obsolete)
Comment 2 Hugo Agud 2015-12-15 08:29:35 UTC
We have applied the patch and works fine at least with the files type webm and mp4
Comment 3 Marcel de Rooy 2015-12-16 12:24:46 UTC
QA: Will be looking at this one very soon.
Comment 4 Marcel de Rooy 2015-12-16 15:10:15 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2015-12-16 15:10:19 UTC Comment hidden (obsolete)
Comment 6 Marcel de Rooy 2015-12-16 15:14:08 UTC
Before passing QA:

Mirko or Hugo: Could you please confirm if the follow-up works for you.

Secondly,
I tried adding a mp3 and a webm file in the 856. And added a $c. (Enabled both prefs.)
But I did not get results.
I suspect that the surrounding code in gethtml5media is not complete.
I saw some warnings on some of the keys in $HTML5Media (mime, parent, .. )
Could you elaborate some more on the steps needed to have actual results in the browser?

Thanks.
Comment 7 Hugo Agud 2015-12-16 15:22:44 UTC
This is how we have tested, just step 7 is diffente

In order to test the patch
0. Make sure that you have propertly added the video format in HTML5MediaExtensions
1 apply patch
2 make sure OPACBaseURL is set correctly
3 enable HTML5MediaEnabled in OPAC and staff client
4 connect upload.pl to 856$u in your framework
5. connect upload.pl to 856$u in your framework
6. upload a file with an extension set in HTML5MediaExtensions
7. Configure 856$q (video/webm or video/mp4)
8. SAve record, view in staff client and browser, check if 'PLay media' option is available and works
Comment 8 Marcel de Rooy 2015-12-24 08:33:07 UTC
Created attachment 45975 [details] [review]
Bug 15225: Make HTML5Media work with file upload feature.

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: Hugo Agud <hagud@orex.es>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Marcel de Rooy 2015-12-24 08:33:11 UTC Comment hidden (obsolete)
Comment 10 Marcel de Rooy 2015-12-24 08:34:03 UTC
(In reply to Hugo Agud from comment #7)
> This is how we have tested, just step 7 is diffente
> 
> 7. Configure 856$q (video/webm or video/mp4)

Thanks, Hugo. That works.
Comment 11 Marcel de Rooy 2015-12-24 08:43:59 UTC
Created attachment 45977 [details] [review]
Bug 15225: [QA Follow-up] Improve changes to gethtml5media

[1] Improve readability, add some checks.
[2] Add the public flag for OPAC use. (If a file has not been marked as
    public, we should not return it in OPAC.)

Test plan:
See original commit. No changes in behavior.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 12 Marcel de Rooy 2015-12-24 08:50:20 UTC
QA Comment:
Added some extra checks in the follow-up. Note that the regex for the extension would return the whole file name if there was no extension.
The surrounding code may need some further attention for things like:
Use of uninitialized value $HTML5MediaParent in string ne at C4/HTML5Media.pm line 205.

Passed QA
Comment 13 Kyle M Hall 2015-12-31 15:57:46 UTC
Pushed to master, thanks Mirko and Marcel!