Commit fc205ae9 authored by MaxSol1's avatar MaxSol1
Browse files

audio fix

parent c04587e3
...@@ -63,6 +63,7 @@ type Option struct { ...@@ -63,6 +63,7 @@ type Option struct {
Svg string `json:"svg"` Svg string `json:"svg"`
StrokeColor string `json:"strokeColor"` StrokeColor string `json:"strokeColor"`
Source string `json:"source"` Source string `json:"source"`
AudioSource string `json:"audioSource"`
} }
//Rect helper struct for positions //Rect helper struct for positions
......
...@@ -6,8 +6,8 @@ import * as meerkat from '../meerkat'; ...@@ -6,8 +6,8 @@ import * as meerkat from '../meerkat';
export function AudioOptions({options, updateOptions}) { export function AudioOptions({options, updateOptions}) {
return <Fragment> return <Fragment>
<label for="src">Source</label> <label for="src">Source</label>
<input class="form-control" id="src" name="src" value={options.source} <input class="form-control" id="src" name="src" value={options.audioSource}
onInput={e => updateOptions({source: e.currentTarget.value})}> onInput={e => updateOptions({audioSource: e.currentTarget.value})}>
</input> </input>
<div> <div>
<button class="rounded btn-primary btn-large">Render</button> <button class="rounded btn-primary btn-large">Render</button>
...@@ -18,7 +18,7 @@ export function AudioOptions({options, updateOptions}) { ...@@ -18,7 +18,7 @@ export function AudioOptions({options, updateOptions}) {
export function AudioStream({options}, props) { export function AudioStream({options}, props) {
return ( return (
<div> <div>
<audio controls src={options.source} type="audio/mpeg"></audio> <audio controls src={options.audioSource} type="audio/mpeg"></audio>
</div> </div>
); );
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment