Thursday, August 27, 2026

Moodle H5P Interactive video playing only audio with black screen

It was reported that all the H5P Interactive video activities on one of our Moodle instances were only playing audio, no video visible, black screen instead. My initial reaction was that this seemed to be another symptom of the mod_hvp bug which had prevented activities from being updated as per the previous post. But the fix in this case was slightly different.

Private URL of chat with Gemini for my reference - https://aistudio.google.com/prompts/1sowy1kk_uVUetNXh2Og3WBgVcfGQ-lQy

The query
SELECT machine_name, major_version, minor_version
FROM vv_hvp_libraries
WHERE machine_name IN (
'H5P.Video',
'H5P.MultiChoice',
'H5P.AdvancedText',
'H5P.InteractiveVideo',
'H5P.Column',
'H5P.Image',
'H5P.CoursePresentation',
'H5P.Summary'
)
 had this response.

H5P.AdvancedText 1 1
H5P.Column 1 13
H5P.Column 1 17
H5P.Column 1 18
H5P.CoursePresentation 1 22
H5P.CoursePresentation 1 24
H5P.CoursePresentation 1 25
H5P.CoursePresentation 1 26
H5P.Image 1 1
H5P.InteractiveVideo 1 22
H5P.InteractiveVideo 1 24
H5P.InteractiveVideo 1 26
H5P.InteractiveVideo 1 27
H5P.MultiChoice 1 14
H5P.MultiChoice 1 16
H5P.Summary 1 10
H5P.Video 1 5
H5P.Video 1 6

Gemini said, If you replace 'H5P.Column 1.18' with 'H5P.Column 1.22', Moodle's H5P renderer will look for H5P.Column 1.22 in vv_hvp_libraries, fail to find it, and throw a fatal error. H5P.Column 1.22 is not installed on this instance

Primary cause - Outdated H5P.Video Library vs. YouTube Player Changes. Check with

SELECT id, machine_name, major_version, minor_version, patch_version 
FROM vv_hvp_libraries 
WHERE machine_name IN ('H5P.Video', 'H5P.InteractiveVideo')
ORDER BY machine_name, major_version, minor_version;

If H5P.Video 1.6 is below 1.6.67, updating the library will resolve the issue - and gave this thread as the reference,
which was discussing the exact same issue.

After some trial and error, the correct solution was:
1. In the Moodle server's config.php, add this line near the bottom before require_once(...)
$CFG->mod_hvp_dev = 1;
2. Download link: https://hub-api.h5p.org/v1/content-types/H5P.InteractiveVideo (save the file as InteractiveVideo.h5p)
3. Go to https://your-moodle-domain/mod/hvp/library_list.php
(Or navigate via UI: Site Administration > Plugins > Activity modules > H5P > H5P Libraries)
and upload the saved InteractiveVideo.h5p in the Upload Libraries box.
4. Verify that the new version is installed with the query 
SELECT id, machine_name, major_version, minor_version, patch_version 
FROM vv_hvp_libraries 
WHERE machine_name = 'H5P.Video';
5. Now in mod/hvp/library_list.php we see Interactive Video (1.27.9) listed, and also a green button at the right to "Upgrade library content". Click on the upgrade library content button to automatically fix all the interactive videos on the site. The page goes to 100% with AJAX updating in less than 30 seconds.
6. Purge caches (sudo php admin/cli/purge_caches.php on CLI ) and test one of the videos to see if it is OK
7. Restore the config.php by commenting out the mod_hvp_dev line we added.


No comments:

Post a Comment