The HTML user interface for text-based chat
First, let's look at how the HTML-based web page will need to be modified. As usual, we start with a standard HTML5 web page that includes a DOCTYPE
definition, a document head
, and a document body
.
<!DOCTYPE html> <html> <head> … </head> <body> … </body> </html>
And again, the first element inside the document head
is a pair of <script>
tags that includes the webrtc_polyfill.js
script.
As before, this is followed by the video_call_with_chat.js
code that defines the browser side logic included inline within a pair of <script></script>
tags. This code only differs slightly from the original basic_video_call.js
code, and we'll walk through this in detail now.
Next, our simple CSS-based styles are defined within a pair of <style></style>
tags as usual with style definitions for chat
, messages
, and message_input
ID's.
Then as usual, the HTML body
content of the page is defined to bind...