MCPcopy
hub / github.com/MrNothing/AI-Blocks / setPath

Method setPath

Sources/src/Model/UI/Modules/AudioViewer.js:12–22  ·  view source on GitHub ↗
(path, target, name)

Source from the content-addressed store, hash-verified

10 }
11
12 setPath (path, target, name)
13 {
14 if(target==this.props.target && ((this.props.filter+"").trim().indexOf(name)!=-1 || (this.props.filter.trim()+"").length==0))
15 {
16 //console.log("path: "+path+"?reset="+this.state.counter);
17 this.state.counter+=1;
18 document.getElementById("audio_source_"+this.props.id).src = path+"?reset="+this.state.counter;
19 document.getElementById("audio_"+this.props.id).load(); //call this to just preload the audio without playing
20 document.getElementById("audio_"+this.props.id).play(); //call this to play the song right away
21 }
22 }
23
24 edit()
25 {

Callers

nothing calls this directly

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected