Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

Audio playback #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var PictureChoiceElement = React.createClass({
} else if (elt.type == "picture") {
return <div><img src={elt.url}/></div>;
} else if (elt.type == "audio") {
return <div className="btn btn-default"><i className="fa fa-play"></i>&nbsp; (audio)</div>;
return <audio id="promptAudio" preload="auto" controls src={elt.url}></audio>
} else {
return <div/>;
}
Expand Down Expand Up @@ -177,7 +177,7 @@ function transform1(resource_json) {
} else if (_side.fqn == "{http://wikiotics.org/ns/2009/picture}picture") {
sides.push({type: "picture", url: resolve_urn(_href) + "?view=image&max_size=250,250"});
} else if (_side.fqn == "{http://wikiotics.org/ns/2010/audio}audio") {
sides.push({type: "audio", url: ""});
sides.push({type: "audio", url: resolve_urn(_href) + "?view=audio"});
} else {
sides.push({type: "unknown"});
}
Expand Down