Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
The place for more technical questions for those who want to create new pagetypes or bespoke functionality.
  • Page:
  • 1

TOPIC:

Audio on click (without player) 1 month 2 weeks ago #8946

  • Jonathan Smith
  • Jonathan Smith's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Posts: 49
  • Thank you received: 3
Hi

Some time ago Takeshi Adachi showed me a way to add and edit some source code so that when a learner clicks on a word (or phrase?) a very short audio file plays, typically with the pronunciation of the word or phrase. I added this code;

<p>
<audio id="clip12" src="https://............/G_digital.mp3"> 
<a onclick="document.getElementById('clip12').play()"> digital</a></p>

where G_Digital is the filename, 'digital' is the word the learner clicks on, and a new audio id has to be created each time.

This is very useful when creating pages with lots of bits of text, each associated with a different audio file. It looks nicer than having lots of audio players dotted around the page. However, it's quite time-consuming to create these pages. Would it be possible to create a kind of variation of the Record Audio feature in the Toolbar, so that;
- the author highlights a word or phrase
- records the audio file
- the audio file is associated with the highlighted word/phrase so that it plays on click (without a player displaying)

Best wishes

Jonathan Smith

Please Log in or Create an account to join the conversation.

Audio on click (without player) 1 month 1 week ago #8956

  • teacherjonny
  • teacherjonny's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 39
  • Thank you received: 0
Yes! this is a great advantage. I do tis regularly on the web and I have all of the words recorded in a single mpl3 file and the start/ stop cues stored in an array. I also want to do this in xerte.
Jonathan Paradise

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: JohnSmith
Time to create page: 0.045 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search