Flashcards with sound
Submitted by meriMerino on Fri, 05/13/2022 - 20:30
Forums:
Hello,
I am redesigning H5P Flashcards so that on click of the card the given sound is being reproduced.
I added it to the semantics.json:
"fields": [ { "name": "text", "type": "text", "label": "Text", "importance": "high", "optional": true }, { "name": "image", "type": "image", "label": "Image", "importance": "high", "optional": true }, { "name": "audioFile", "type": "audio", "label": "Sound" } ]
and also to the content.json:
"stories": [ { "tip": "", "text": "Here's a story!", "image": { "path": "images/Home.png", "mime": "image/png", "width": 889, "height": 594 }, "audioFile": [ { "path": "audios/start.mp3", "mime": "audio/mpeg3", "copyright": { "license": "U" } } ] } ]
Path with images/Home.png is visible, but audios/start.mp3 is not. I added the files tree as attachment. Am I missing something? Best regards, Meri
meriMerino
Fri, 05/13/2022 - 21:39
Permalink
Solved!
otacke
Fri, 05/13/2022 - 21:43
Permalink
Hi!You'll have to add some
Hi!
You'll have to add some JavaScript, too :-) You can find a pull request that would add audio to Flashcards at https://github.com/h5p/h5p-flashcards/pull/64
Best,
Oliver