added frontend dev dependencies

This commit is contained in:
ojack
2022-01-09 11:41:19 +01:00
parent 5bb20ffb79
commit 2bc9b50cfd
6 changed files with 2947 additions and 1277 deletions

View File

@@ -8,7 +8,7 @@
"start": "node server.js"
},
"author": "",
"license": "ISC",
"license": "AGPL",
"dependencies": {
"bitly": "^7.1.2",
"dotenv": "^10.0.0",

View File

@@ -1,52 +0,0 @@
const PatchBay = require('./src/pb-live.js')
const getUserMedia = require('getusermedia')
const enumerateDevices = require('enumerate-devices')
var vidInput
var vidDropdown
window.onload = function(){
console.log("loaded")
vidDropdown = document.getElementById("deviceSelect")
var pb = new PatchBay()
enumerateDevices(function(err, devices) {
if(err) {
console.log(err.message); //device enumeration not supported
} else {
console.log(devices);
vidInput = devices.filter(device => device.kind == "videoinput")
vidInput.forEach((device)=>{
console.log("device", device)
var option = document.createElement("option");
option.text = device.label == null ? device.id : device.label;
option.value = device.deviceId
vidDropdown.add(option)
})
document.getElementById("init").onmousedown = function() {
var deviceId = vidDropdown.value
console.log(deviceId)
getUserMedia({
audio: false,
video: {deviceId:deviceId}
}, function(err, stream){
if(err) alert(err)
document.getElementById("vid").srcObject = stream
console.log("got stream", stream)
pb.init(stream,{
server: window.location.origin,
room: "iclc"
})
var name = document.getElementById("sourceName").value
console.log(pb, name)
pb.setName(name)
// pb.init(stream)
})
}
}
});
}

File diff suppressed because it is too large Load Diff

View File

@@ -7,12 +7,19 @@
"test": "echo \"Error: no test specified\" && exit 1",
"uglify": "terser ./public/bundle.js --source-map \"content=inline\" -o /public/bundle.min.js",
"watch": "watchify ./index.js --debug -v -o ./public/bundle.js",
"build": "browserify ./index.js --debug -o ./public/bundle.js && npm run uglify"
"build": "browserify ./index.js --debug -o ./public/bundle.js && npm run uglify",
"source-map": "source-map-explorer /public/bundle.min.js /public/bundle.min.js.map"
},
"author": "",
"license": "ISC",
"license": "AGPL",
"dependencies": {
"hydra-synth": "^1.3.12",
"socket.io": "^4.4.1"
},
"devDependencies": {
"browserify": "^17.0.0",
"source-map-explorer": "^2.5.2",
"terser": "^5.10.0",
"watchify": "^4.0.0"
}
}

1606
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -42,7 +42,7 @@
"webrtc-adapter": "^6.3.0"
},
"devDependencies": {
"browserify": "^16.2.3",
"browserify": "^16.5.2",
"standard": "^11.0.1",
"terser": "^5.3.8",
"watchify": "^3.11.1"