Giter Site home page Giter Site logo

example-iframes's Introduction

DeepAR SDK Demo in Iframes

This project is a simple demonstration showing how to load the DeepAR SDK in an iframe. The project contains three HTML files:

  1. deepar.html: This page loads the DeepAR SDK from a CDN and initializes it with a license key and effect.
  2. friendly-iframe.html: This page hosts an iframe which loads the deepar.html file from the same origin.
  3. cross-origin-iframe.html: This page hosts an iframe which loads the DeepAR demo from a different origin.

Usage

To run this project locally:

  1. Clone the repository.
  2. If you are deploying to a URL other than localhost, replace the placeholder 'your_license_key_here' in deepar.html with your actual DeepAR license key.
  3. Start a local web server in the project directory.
  4. Open the index.html (containing the friendly iframe) and cross-origin-iframe.html files in your web browser through the local web server.

Prerequisites

You only need a DeepAR license key to run the deepar.html file if you are deploying to a URL other than localhost. You can obtain one by signing up for a free account on the DeepAR Developer Portal.

You also need a web server to serve the HTML files. For simple local development, you can use Python's built-in HTTP server. Navigate to the project directory in your terminal and run python3 -m http.server (for Python 3) or python -m SimpleHTTPServer (for Python 2).

Important Note

Different browsers handle cross-origin requests differently. Make sure to test your application in the same browser environment(s) that your users will be using.

Also, keep in mind that the DeepAR SDK requires access to the webcam, which might not work properly in a cross-origin iframe depending on the user's browser settings and permissions.

example-iframes's People

Contributors

zakkempson avatar

Watchers

 avatar  avatar  avatar

Forkers

alishanmasood

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.