You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
/**
|
|
|
|
**-
|
|
|
|
* JavaScript providing functions for
|
|
|
|
* generating inset HTML elements
|
|
|
|
* required by an article
|
|
|
|
*
|
|
|
|
* Visuals includes items that stand out
|
|
|
|
* on the page and includes images and
|
|
|
|
* the navigation buttons at the bottom
|
|
|
|
* of the page
|
|
|
|
*
|
|
|
|
* Author - Philip Osztromok
|
|
|
|
*
|
|
|
|
* 27 March 2022
|
|
|
|
*+
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Image functions
|
|
|
|
function addAudioClip(audio_file) {
|
|
|
|
const newAudio = document.createElement("audio");
|
|
|
|
newAudio.setAttribute("src", audio_file);
|
|
|
|
newAudio.setAttribute("controls", "controls");
|
|
|
|
|
|
|
|
console.log("The audio clip is: ", newAudio);
|
|
|
|
|
|
|
|
return newAudio;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export { addAudioClip }
|
|
|
|
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
* helper functions
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|