UNPKG
audio-source-composer
Version:
latest (0.7.2)
0.7.2
0.7.1
0.6.22
0.6.21
0.6.20
0.6.19
0.6.18
0.6.17
0.6.16
0.6.14
0.6.13
0.6.12
0.6.11
0.6.10
0.6.8
0.6.7
0.6.6
0.6.5
0.6.3
0.6.2
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.3.3
0.3.2
0.2.1
0.1.10
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.0.13
0.0.12
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.3
0.0.2
Audio Source Composer
.
audio-source-composer
/
src
/
song
/
file
/
JSONFileSupport.js
10 lines
(8 loc)
•
283 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{
Song
}
from
"../index"
;
export
default
class
JSONFileSupport
{
async
processSongFromFileBuffer
(
fileBuffer, filePath
) {
let
fileJSON =
new
TextDecoder
(
"utf-8"
).
decode
(fileBuffer); fileJSON =
JSON
.
parse
(fileJSON);
return
new
Song
(fileJSON); } }