I've followed a YouTube tutorial on WebRTC video chat, so I've tried to write it. In localhost it worked, but as soon as I've uploaded it to firebase hosting it gives this error. what can I do? I'm new in web developing so please be patient
main.hmtl
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>WebRtc Demo</title>
</head>
<body>
<h2>Start Cam</h2>
<div class ="videos">
<span>
<h3>Local</h3>
<video id="webcamVideo" autoplay playsinline></video>
</span>
<span>
<h3>Remote</h3>
<video id="remoteVideo" autoplay playsinline></video>
</span>
</div>
<button id="webcamButton">Start cam</button>
<h2>New Call</h2>
<button id="callButton">call</button>
<input id="callInput"/>
<button id="answerButton">Rispondi</button>
<button id="hangupButton">Hangup</button>
<script type="module" src="/main.js"></script>
</body>
</html>
Firebase.json
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"hosting": {
"public": "/",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
main.js
import firebase from 'firebase/app';
import 'firebase/firestore';
const firebaseConfig = {
...
};