Use extra resource for custom audio files
This commit is contained in:
@@ -8,13 +8,6 @@
|
||||
// ===========================================================================
|
||||
|
||||
function playStreamingRadio(url, loop, volume, element = false) {
|
||||
if(url == "") {
|
||||
if(streamingRadio != null) {
|
||||
streamingRadio.stop();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if(streamingRadio != null) {
|
||||
streamingRadio.stop();
|
||||
}
|
||||
@@ -42,4 +35,15 @@ function setStreamingRadioVolume(volume) {
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function playAudioFile(audioName, loop, volume) {
|
||||
let resource = findResourceByName("connectedrp-extra");
|
||||
if(resource == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
resource.exports.playCustomAudio(audioName, volume/100);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
Reference in New Issue
Block a user