Koha::Upload allows files to be attached to bibliographic records. HTML5Media streaming in Koha does not work with these files.
Created attachment 45205 [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
We have applied the patch and works fine at least with the files type webm and mp4
QA: Will be looking at this one very soon.
Created attachment 45724 [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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 45725 [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> Verified results with some additional debug lines. Somehow, showing the results in the browser was harder. This is not related to the changes on this report, but probably to the surrounding code.
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.
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
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>
Created attachment 45976 [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>
(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.
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>
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
Pushed to master, thanks Mirko and Marcel!