Skip to content

Commit 10d9630

Browse files
committed
Add audio option for introductory media
1 parent 28b2877 commit 10d9630

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

library.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"title": "Dictation",
33
"description": "Let your students train their listening comprehension and spelling",
44
"majorVersion": 1,
5-
"minorVersion": 1,
6-
"patchVersion": 2,
5+
"minorVersion": 2,
6+
"patchVersion": 0,
77
"runnable": 1,
88
"embedTypes": ["iframe"],
99
"author": "Oliver Tacke",
@@ -27,7 +27,7 @@
2727
{
2828
"machineName": "H5P.Question",
2929
"majorVersion": 1,
30-
"minorVersion": 4
30+
"minorVersion": 5
3131
},
3232
{
3333
"machineName": "H5P.JoubelUI",
@@ -37,7 +37,7 @@
3737
{
3838
"machineName": "H5P.Audio",
3939
"majorVersion": 1,
40-
"minorVersion": 4
40+
"minorVersion": 5
4141
},
4242
{
4343
"machineName": "H5P.TextUtilities",

semantics.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"importance": "medium",
1313
"options": [
1414
"H5P.Image 1.1",
15-
"H5P.Video 1.5"
15+
"H5P.Video 1.5",
16+
"H5P.Audio 1.5"
1617
],
1718
"optional": true,
1819
"description": "Optional media to display above the question."

src/scripts/h5p-dictation.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ class Dictation extends H5P.Question {
210210
this.setVideo(media);
211211
}
212212
}
213+
// Audio
214+
else if (type === 'H5P.Audio') {
215+
if (media.params.files) {
216+
this.setAudio(media);
217+
}
218+
}
213219
}
214220

215221
// Register task introduction text

0 commit comments

Comments
 (0)