Giter VIP home page Giter VIP logo

shell-example's Introduction

vLine Shell Example

Setup

WebRTC javascript APIs do not work when a site is served from a file:// url, so even when developing locally, you must serve your html from a web server. Here's how:

Mac

The server.sh script will start a new instance of Apache, which should already be installed on your Mac. You can then access the app at http://localhost:4567.

Linux

The server.sh script will start a new instance of Apache, which may already be installed on your system. If Apache is not installed, the script will prompt you with instructions on how to install it. You can then access the app at http://localhost:4567.

Windows

Download the Mongoose web server and copy it to the example source directory. Double-click the executable to start the server. You should now be able to access the app at http://localhost:8080.

Running

  • Create a video chat service with the vLine Developer Console.
  • This example will use two users, one of which will be logged in to the Web Client and the other which will be logged in to the shell.
  • Navigate to the Users page in the Developer Console and make sure you have two users. If you need to create new users, you can click the Add User button. This example will assume that you have created one user called Test User and another called My Name.
  • On the Users page in the Developer Console, click on Test User and make note of the User ID. (It will have the form YOUR_SERVICE_ID:RANDOM_STRING.)
  • Log into your service's Web Client by opening a new browser window and navigating to https://YOUR_SERVICE_ID.vline .com. Sign in with the Test User credentials.
  • Open source/index.html in this example and replace the string 'YOUR_SERVICE_ID' with the ID of the service you created.
  • In a separate browser window, open up the shell example by navigating to the localhost link described in Setup.
  • Log in to the shell example by entering the command login. Log in as the Your Name user.
  • From the shell, send a message from your Your Name to Test User by entering command write USERID hello!, where USERID is Test User's ID that you made a note of in the previous steps. If everything works as expected, you should see your test message in the Web Client browser window.
  • From the shell, make a video call to Test User by entering the command start-media USERID. You should accept the call in the Web Client, at which point you should see two images of yourself in the Web Client window and two images in the shell window.
  • To end the call from the shell, enter the command stop-media.

Next Steps

You can get a list of all available commands by typing help at the prompt. To get more details for a specific command, type help command. For example, to see the syntax for the start-media command type help start-media.

This example only demonstrates a subset of the vLine JavaScript API. Explore the documentation to learn about all the features.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.