Developing the main page of the application
As we did in the previous Chapter 1, Developing a WebRTC Application, we need an index.html
page where we will implement the UI visible for customers and some additional JavaScript code to implement the client application. This can be done by performing the following steps:
Create the index page at
www/index.html
as follows:<!DOCTYPE html> <html> <head> <title>My WebRTC file sharing application</title> <style type="text/css">
Include the following two JavaScript libraries:
</style> <script type="text/javascript" src="myrtclib.js"></script> <script type="text/javascript" src="myrtcadapter.js"></script> </head> <body onLoad="onPageLoad();"> <div id='status'></div>
Using this object, we will handle the list of files chosen by the customer. Using this list, we will send files one by one to the peer by using the following code:
<div> <input...