Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying WebRTC Blueprints
  • Table Of Contents Toc
  • Feedback & Rating feedback
WebRTC Blueprints

WebRTC Blueprints

By : Andrii Sergiienko
4.2 (9)
close
close
WebRTC Blueprints

WebRTC Blueprints

4.2 (9)
By: Andrii Sergiienko

Overview of this book

Table of Contents (13 chapters)
close
close
WebRTC Blueprints
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

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:

  1. 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">
  2. 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>
  3. 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...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY