Skip to content

Commit

Permalink
Update view.html
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsuttlemyre authored May 20, 2024
1 parent 94357b3 commit c1d90e2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions view.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ <h1> viewing window </h1>

peer.on('connection', conn => {
conn.on('data', data => {
console.log('got data from peer',data)
var img = new Image();

// Set the src attribute to a data URL
img.src = dataURL
document.body.appendChild(img)




if (data.filetype.includes('image')) {
const bytes = new Uint8Array(data.file)
const img = document.createElement('img')
Expand Down

0 comments on commit c1d90e2

Please sign in to comment.