Whenever I load my project it throws an error
undefined $accessToken
My Script
<script>
Twilio.Video.createLocalTracks({
audio: true,
video: { width: 300 }
}).then(function(localTracks) {
return Twilio.Video.connect('{{ $accessToken }}', {
name: '{{ $roomName }}',
tracks: localTracks,
video: { width: 300 }
});
}).then(function(room) {
console.log('Successfully joined a Room: ', room.name);
room.participants.forEach(participantConnected);
var previewContainer = document.getElementById(room.localParticipant.sid);
if (!previewContainer || !previewContainer.querySelector('video')) {
participantConnected(room.localParticipant);
}
room.on('participantConnected', function(participant) {
console.log("Joining: '" participant.identity "'");
participantConnected(participant);
});
room.on('participantDisconnected', function(participant) {
console.log("Disconnected: '" participant.identity "'");
participantDisconnected(participant);
});
});
// additional functions will be added after this point
</script>
question from:
https://stackoverflow.com/questions/65559544/whenever-i-load-my-project-it-show-me-undefined-index-error 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…