Unable to Add Interactive Video in Branching Scenario
Submitted by samuel.calegari on Fri, 10/14/2022 - 10:23
Forums:
Hello, I have a trouble on my moodle
when i want to add an interactive video in a branching scenario, a loading message appears and nothing else
If i add a simple interactive video it works.
there is no specific message in developer console
I have updated H5P content types recently
on moodle 3.9.17
I use Blue H5P
Branching Scenario Editor1.4.0
Interactive Video Editor1.22.7
Interactive Video Editor1.24.1
on Chrome / firefox
Thanxs
BV52
Fri, 10/14/2022 - 17:54
Permalink
Hi Samuel,The version of H5P
Hi Samuel,
The version of H5P that you are using is was not created by our developers. I don't doubt that there are community members that may know how to resolve your issue. However posting the same in Moodle's forum may yield better results.
-BV
samuel.calegari
Mon, 10/17/2022 - 08:31
Permalink
Thank u BV,so i have try
Thank u BV,
so i have try directly with the green H5P Plugin, i have the same problem (mod_h5p)
Version 1.22.4 2022012000Thanks
BV52
Mon, 10/17/2022 - 19:33
Permalink
Hi Samuel,Thank you for the
Hi Samuel,
Thank you for the information. Would you mind checking the browser console if there any errors?
-BV
samuel.calegari
Tue, 10/18/2022 - 09:25
Permalink
Hello here is my browser
Hello here is my browser console
Cette page utilise la propriété non standard « zoom ». Envisagez d’utiliser calc() dans les valeurs des propriétés pertinentes ou utilisez « transform » avec « transform-origin: 0 0 ». h5peditor-editor.js:71:27Cette page utilise la propriété non standard « zoom ». Envisagez d’utiliser calc() dans les valeurs des propriétés pertinentes ou utilisez « transform » avec « transform-origin: 0 0 ». h5peditor-editor.js:71:27Feature Policy : nom de fonctionnalité non prise en charge ignoré « midi ». dist.js:6:147070Feature Policy : nom de fonctionnalité non prise en charge ignoré « encrypted-media ». dist.js:6:147070Feature Policy : nom de fonctionnalité non prise en charge ignoré « midi ». dist.js:6:205385Feature Policy : nom de fonctionnalité non prise en charge ignoré « encrypted-media ». dist.js:6:205385Uncaught TypeError: translation[i] is undefined
updateCommonFieldsDefaulthttps://cours.univ-perp.fr/mod/hvp/editor/scripts/h5peditor.js?ver=20220...h5peditor.js:280:9Un accès partitionné à un cookie ou au stockage a été fourni à « https://documentation.h5p.com/content/1290532202058682888/embed » car il est chargé dans le contexte tiers et le partitionnement d’état dynamique est activé. No ajax path found h5p.js:1:71115Certains cookies utilisent incorrectement l’attribut recommandé « SameSite »
BV52
Tue, 10/18/2022 - 18:58
Permalink
Hi Samuel,It looks like this
Hi Samuel,
It looks like this is related to this: https://github.com/h5p/h5p-editor-php-library/pull/144. We do not have a schedule yet on when this will be released.
-BV
otacke
Tue, 10/18/2022 - 22:45
Permalink
Hi BV!In this case, the issue
Hi BV!
In this case, the issue is rather a problem with the translation files of Interactive Video/H5P core not having a guard for the bug.
Best,
Oliver
samuel.calegari
Wed, 10/19/2022 - 11:24
Permalink
Hellothere is a translation
Hello
there is a translation problem (some french translations are missing)
I ve updated the H5editor.js on H5P Module
ns.updateCommonFieldsDefault = function (semantics, translation, parentIsCommon) {
for (let i = 0; i < semantics.length; i++) {
const isCommon = (semantics[i].common === true || parentIsCommon);
if (isCommon && semantics[i].default !== undefined &&
translation[i] !== undefined && translation[i].default !== undefined) {
// Update value
semantics[i].default = translation[i].default;
}
if (semantics[i].fields !== undefined && semantics[i].fields.length &&
translation[i].fields !== undefined && translation[i].fields.length) {
// Look into sub fields
ns.updateCommonFieldsDefault(semantics[i].fields, translation[i].fields, isCommon);
}
if(i<translation.length) {
if (semantics[i].field !== undefined && translation[i].field !== undefined ) {
// Look into sub field
ns.updateCommonFieldsDefault([semantics[i].field], [translation[i].field], isCommon);
}
}
}
};
by :
ns.updateCommonFieldsDefault = function (semantics, translation, parentIsCommon) {
for (let i = 0; i < semantics.length; i++) {
if(translation[i] !== undefined) { // Add this condition
const isCommon = (semantics[i].common === true || parentIsCommon);
if (isCommon && semantics[i].default !== undefined &&
translation[i] !== undefined && translation[i].default !== undefined) {
// Update value
semantics[i].default = translation[i].default;
}
if (semantics[i].fields !== undefined && semantics[i].fields.length &&
translation[i].fields !== undefined && translation[i].fields.length) {
// Look into sub fields
ns.updateCommonFieldsDefault(semantics[i].fields, translation[i].fields, isCommon);
}
if (semantics[i].field !== undefined && translation[i].field !== undefined ) {
// Look into sub field
ns.updateCommonFieldsDefault([semantics[i].field], [translation[i].field], isCommon);
}
} else {
console.log('missing translation');
}
}
};
Thank u so much !
can i create a pull request on git hub ?
samuel.calegari
Wed, 10/19/2022 - 14:29
Permalink
Translation Problem
Hello ! the missing translation in H5p cause the problem
I have fixed the problem in h5peditor.js with this code :
ns.updateCommonFieldsDefault = function (semantics, translation, parentIsCommon) { for (let i = 0; i < semantics.length; i++) { //Guard for missing translations if(translation[i] !== undefined) { const isCommon = (semantics[i].common === true || parentIsCommon); if (isCommon && semantics[i].default !== undefined && translation[i] !== undefined && translation[i].default !== undefined) { // Update value semantics[i].default = translation[i].default; } if (semantics[i].fields !== undefined && semantics[i].fields.length && translation[i].fields !== undefined && translation[i].fields.length) { // Look into sub fields ns.updateCommonFieldsDefault(semantics[i].fields, translation[i].fields, isCommon); } if (semantics[i].field !== undefined && translation[i].field !== undefined ) { // Look into sub field ns.updateCommonFieldsDefault([semantics[i].field], [translation[i].field], isCommon); } } else { console.log('missing translation'); } } };