Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have used the following code which allows the user to send their voice and files to the chat room. But the problem is that

I have used the following code which allows the user to send their voice and files to the chat room. But the problem is that after sending to the chat, what was sent does not appear as it is in the form of a file or an audio clip! It appears in the chat in the form of icons. I don't know how to solve this problem.
I apologize for having a lot of pictures. thank you all
css code:
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
html code:
image text in transcribed
image text in transcribed
image text in transcribed
java script code:
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
message-box \{ \&. message-input \{ background: none; border: none; outline: none! important; resize: none; color: rgba(255, 255, 255, 7 ; font-size: 11p; height: 17px; margin: 0; padding-right: 20px; width: 265px; \} background-color: \#24c9f2; text-align: end; margin-right: 30%; right: 10%; 7.st. ino. Messages messages \{ flex: 1 1 auto; color: rgba(255, 255,255,.5); overflow: hidden; position: relative; width: 10%; \& pessages-content \{ position: absolute; top: 0; left: ; height: 101%; width: 100%; \} Messages + messages ( flex: 11 auto; colort rgba 255,255,255,.5); overflow: hidden; position: relative; width: 10e; 8. messages-content \& position: absolute; didin? afdiv? fdiv classe"ehat-user-iroup-title? sfdiv? cilly fide"chat-users+online" classe"chat-user'eroup that"s cdivelaks"chat-user online" cidiv class" "chat -wser-eaees") ipan class "chat -usernabe")Userhane3(fapan) sipan class" "chat-fallinahe" of Lirst Lastofiapany redivi) (lisin) riviv? cedin? cdiv. ide"chat renvo" elasa-"hide"? cdir elune"chat-uaer? rime claski"chat-aner-laage" (diy tlast" ehat-abar manei") tapan class "chat-uiternase"?thernase (/ spiet copan cliass" "that-fullnese"pfirst Lestefigany (ritiv) iddivh cdiv ldn"that cenve histery" titis" 15 aes ebpeu/2ezz"; tidiv) (litivh ditiv rlass=" messaces") cediv clobk"*eskages-content"pq/aiv? (fidiv) didivb. 4input types"tent" class" eessageringut? chutton A yyer" subutit? Stinan"minide-istieit itylen"barder: epsi efdixp (dir idn"chat comvoihlotory" titlen"15:05 66/es/2e2z) (divi). edir clasis"mesaage out" Hello therele/diva (dir class" "nessage out" titlen" 15 : 06 06/e4/2022" How are you doinc?(div) Cdir elass "message in" Eitle" "15:98 06/04/2022>Im doing tood, thanks for ankingtc/div? k/akivb 4/aiv? idiv class" eesessaets"? \{hativ? 4fdi4? efalvs. idiv classe"mestaga-bose 3 ? 4input type-"text" clats" "metsace-input" placeholdere"type message, .." thuttort types" "subenit" clask""mestade aubait" itylen"berdert epx; backereund +color: wasabs; "; Afbuttan? ifaliz? Uilv elass "attackent-pane1* (input type-fale" ide"fila-input" elaus "file-input" cfilin) chitivb Hininat tecordine Autis frem the Uneriob. cidivi rialiv? Fi (window) . load (funetion () t Smessages, mCustomscrollbar () ; sectimeout (runetion () i fakeMessage (): 1. 100 ) 1): funetion updateserollbar () ( Smessages, mcustomscrollbar ("update'), mcustomscrollbar ('scro1lto', "botcon', I scrollinertia: 10 , timeout: 0 1): 1 Itunetion setDate () ( d= new Date () if (in 1= digetminutes ( ) i in = d.getkinutes () : 1 Punetion insertkessage () ( m mg =$(. measage -input' ). Val (): 1f (f.triming) = ' ) ( return false: 1 setpate () : \$', message-input') , val (au11); settimeoue (function() \& takeKessage () : 1. 1000+( Kath. random ()20)100) : \$ ('. nessage-5bbait') . click (function() | insertKessage () : 1) : S (window) . On ("keydown', funetion (e) i if (e. which =13 ) f Is (window), on ('keydoin', function(e) I If (e. which m=13 ) i insertWestage 0 ): return false: -1) (/. Handle sending volce const startvolceBtn = docunent. getelementById ('start-volce-btn') ; const stopvoiceBtn = document. getBlementById('stop-voico-btn'): Ztartvoicestn.addEventilstener ('elick", funetion() ( recordedchunks =[1 : mediapecorder istart () ; 11 i ZhtopvoiceBtn-addEventtistener ('elick", function() 1 mediakecorder, stop () ; eonst blob = new Blob (recordedchunks, ( type: 'audia/oggr codectwopus' I) : const audiott = URL. createobjectURt, (blob); // Tobot send the audio using your chat rocm' s AP1 console, log ('sending audis', audiottrl): 11 : Muaction insertMessage () ( msg =$f,3tattvolcebtn1),val() : Af (7,trim(mg)=H) ( return false: 1 setpate (3 : 5(", atart- volde-bte ), val (au11) ; updatescrollbar () : setzimeout (function() ( fakeMessage ( ) 1. 1000+( Math, random ()20)100) i Mis ('. stop-yoice-btn').c1ick (function () I insertMessage () ; 1)= message-box \{ \&. message-input \{ background: none; border: none; outline: none! important; resize: none; color: rgba(255, 255, 255, 7 ; font-size: 11p; height: 17px; margin: 0; padding-right: 20px; width: 265px; \} background-color: \#24c9f2; text-align: end; margin-right: 30%; right: 10%; 7.st. ino. Messages messages \{ flex: 1 1 auto; color: rgba(255, 255,255,.5); overflow: hidden; position: relative; width: 10%; \& pessages-content \{ position: absolute; top: 0; left: ; height: 101%; width: 100%; \} Messages + messages ( flex: 11 auto; colort rgba 255,255,255,.5); overflow: hidden; position: relative; width: 10e; 8. messages-content \& position: absolute; didin? afdiv? fdiv classe"ehat-user-iroup-title? sfdiv? cilly fide"chat-users+online" classe"chat-user'eroup that"s cdivelaks"chat-user online" cidiv class" "chat -wser-eaees") ipan class "chat -usernabe")Userhane3(fapan) sipan class" "chat-fallinahe" of Lirst Lastofiapany redivi) (lisin) riviv? cedin? cdiv. ide"chat renvo" elasa-"hide"? cdir elune"chat-uaer? rime claski"chat-aner-laage" (diy tlast" ehat-abar manei") tapan class "chat-uiternase"?thernase (/ spiet copan cliass" "that-fullnese"pfirst Lestefigany (ritiv) iddivh cdiv ldn"that cenve histery" titis" 15 aes ebpeu/2ezz"; tidiv) (litivh ditiv rlass=" messaces") cediv clobk"*eskages-content"pq/aiv? (fidiv) didivb. 4input types"tent" class" eessageringut? chutton A yyer" subutit? Stinan"minide-istieit itylen"barder: epsi efdixp (dir idn"chat comvoihlotory" titlen"15:05 66/es/2e2z) (divi). edir clasis"mesaage out" Hello therele/diva (dir class" "nessage out" titlen" 15 : 06 06/e4/2022" How are you doinc?(div) Cdir elass "message in" Eitle" "15:98 06/04/2022>Im doing tood, thanks for ankingtc/div? k/akivb 4/aiv? idiv class" eesessaets"? \{hativ? 4fdi4? efalvs. idiv classe"mestaga-bose 3 ? 4input type-"text" clats" "metsace-input" placeholdere"type message, .." thuttort types" "subenit" clask""mestade aubait" itylen"berdert epx; backereund +color: wasabs; "; Afbuttan? ifaliz? Uilv elass "attackent-pane1* (input type-fale" ide"fila-input" elaus "file-input" cfilin) chitivb Hininat tecordine Autis frem the Uneriob. cidivi rialiv? Fi (window) . load (funetion () t Smessages, mCustomscrollbar () ; sectimeout (runetion () i fakeMessage (): 1. 100 ) 1): funetion updateserollbar () ( Smessages, mcustomscrollbar ("update'), mcustomscrollbar ('scro1lto', "botcon', I scrollinertia: 10 , timeout: 0 1): 1 Itunetion setDate () ( d= new Date () if (in 1= digetminutes ( ) i in = d.getkinutes () : 1 Punetion insertkessage () ( m mg =$(. measage -input' ). Val (): 1f (f.triming) = ' ) ( return false: 1 setpate () : \$', message-input') , val (au11); settimeoue (function() \& takeKessage () : 1. 1000+( Kath. random ()20)100) : \$ ('. nessage-5bbait') . click (function() | insertKessage () : 1) : S (window) . On ("keydown', funetion (e) i if (e. which =13 ) f Is (window), on ('keydoin', function(e) I If (e. which m=13 ) i insertWestage 0 ): return false: -1) (/. Handle sending volce const startvolceBtn = docunent. getelementById ('start-volce-btn') ; const stopvoiceBtn = document. getBlementById('stop-voico-btn'): Ztartvoicestn.addEventilstener ('elick", funetion() ( recordedchunks =[1 : mediapecorder istart () ; 11 i ZhtopvoiceBtn-addEventtistener ('elick", function() 1 mediakecorder, stop () ; eonst blob = new Blob (recordedchunks, ( type: 'audia/oggr codectwopus' I) : const audiott = URL. createobjectURt, (blob); // Tobot send the audio using your chat rocm' s AP1 console, log ('sending audis', audiottrl): 11 : Muaction insertMessage () ( msg =$f,3tattvolcebtn1),val() : Af (7,trim(mg)=H) ( return false: 1 setpate (3 : 5(", atart- volde-bte ), val (au11) ; updatescrollbar () : setzimeout (function() ( fakeMessage ( ) 1. 1000+( Math, random ()20)100) i Mis ('. stop-yoice-btn').c1ick (function () I insertMessage () ; 1)=

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 1 Lnai 6321

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215879X, 978-3642158797

More Books

Students also viewed these Databases questions