-
Bug
-
Resolution: Fixed
-
Minor
-
3.0.4
-
MOODLE_30_STABLE
-
MOODLE_30_STABLE, MOODLE_31_STABLE
-
MDL-54847-master -
-
3
-
3.2 Sprint 3
A user wishes to embed a .wav file into a forum post. Adding the .wav file via the text editor's media button only inserts a hyperlink to the file (see MDL-54846). Using the text editor's source mode, the user attempts to embed the uploaded .wav file using the HTML 5 audio tag. However, upon saving, the audio tag is automatically removed so the file is not embedded. Using the same code in a page resource, the audio tag is not removed.
STEPS TO REPLICATE
1. Create a forum activity.
2. Add a new post to the forum.
3. Click the Media button on the text editor.
4. Upload a .wav file and then click the insert media button. The .wav file is added to the page as a hyperlink.
5. Click the HTML button on the text editor to switch into source mode.
6. Update the HTML using the HTML 5 audio tag to embed the .wav file into the page. Same code:
<p>The wav file should be embedded.</p>
|
<audio controls>
|
<source src="http://core2next-sandbox.mrooms.net/draftfile.php/612/user/draft/162587154/a2002011001-e02.wav" type="audio/wav">
|
Your browser does not support the audio element.
|
</audio>
|
7. Submit the post.
8. Read the post. Also edit the post and click the HTML button on the text editor.
OBSERVED BEHAVIOR:
The .wav file is not embedded in the HTML. The audio tag has been removed. The resulting HTML:
<p>The wav file should be embedded.</p>Your browser does not support the audio element.
|
EXPECTED BEHAVIOR:
The audio tag is retained in the HTML. The .wav file is embedded into the forum post allowing the audio file to be played directly from the post.
REPLICATION LOCATIONS
Behavior has been replicated in 3.0.4 and 2.9.3.
ADDITIONAL INVESTIGATION NOTES
1. The audio tag is removed from the forum post HTML regardless of the file type being embedded. For example, attempting to embed an .mp3 file with the audio tag also results in the audio tag being removed.
2. Behavior was replicated with both the Atto and TinyMCE text editors.
USER IMPACT
An instructor teaching a sound design course would like for students to be able to share their .wav files within forums. The .wav file format is not among the file formats currently handled by Moodle's media embedding features (see MDL-54846). A potential work-around would be manually entered the necessary HTML to embed the file, but this cannot be done when the audio tag is automatically removed.
- blocks
-
MDL-55324 atto_media should use HTML5 video/audio tags, allow to set multiple sources, tracks, poster and other properties
- Closed
- has a non-specific relationship to
-
MDL-54846 Add support for embedding .wav files
- Closed
-
MDL-55581 HTML audio and video "track" tag are removed by purifier
- Closed
- has been marked as being related by
-
MDL-78259 video/audio tags are not rendered when inside an inline tag
- Closed