GithubHelp home page GithubHelp logo

s1nker / agora-miniapp-tutorial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from agoraio/agora-miniapp-tutorial

1.0 0.0 0.0 289 KB

Hello world for Agora SDK running in https://en.wikipedia.org/wiki/WeChat#WeChat_Mini_Program

JavaScript 100.00%

agora-miniapp-tutorial's Introduction

Agora Miniapp Tutorial

其他语言版本:简体中文

Introduction

Built upon the Agora Miniapp SDK, the Agora Miniapp Sample App is an open-source demo that integrates video chat and live broadcast into your Wechat Mini Application.

With this sample app, you can:

  • Integrate the Agora Miniapp SDK
  • Join a channel
  • Push your local stream to the channel
  • Subscribe to remote streams in the same channel
  • Leave a channel

Preparing the Developer Environment

  1. Ensure that you have installed the WeChat Developer Tool.
  2. Ensure that you have a wechat OpenPlatform account that supports live-pusher and live-player. Only certified corporate accounts in certain industry have access to these two components. For details, click here .
  3. Ensure that you have granted access to the following domains in your OpenPlatform account:

Running the App

  1. Create a developer account at Agora.io, create a new project and obtain an App ID, and enable the App Certificate.

  2. Download this project.

  3. Fill in the App ID in config.js in the utils folder of this project:

     const APPID = 'abcdefg'
    
  4. Contact [email protected] to abtain the Agora Miniapp SDK, and rename the SDK to "mini-app-sdk-production.js".

  5. Save the "mini-app-sdk-production.js" under the lib folder of this project.

  6. Start the WeChat Developer Tool and import this project.

  7. Enter a channel name and join a channel. Invite your friend to join in the same channel and you will be able to see each other.

About the Token/Dynamic Key

If you have enabled the App Certificate, you will need to generate the Token/Dynamic Key at the server for authentication purposes. Use it in the following method:

	//...
	client.join(<your key/access token here>, channel, uid, () => {
	//...

See Token or Dynamic Key for generating the Token or Key at the server.

Feedback

If you have any problems or suggestions regarding the sample projects, feel free to file an issue.

Related resources

  • Check our FAQ to see if your issue has been recorded.
  • Dive into Agora SDK Samples to see more tutorials
  • Take a look at Agora Use Case for more complicated real use case
  • Repositories managed by developer communities can be found at Agora Community
  • If you encounter problems during integration, feel free to ask questions in Stack Overflow

License

The sample projects are under the MIT license.

agora-miniapp-tutorial's People

Contributors

digitallysavvy avatar lemon-chen avatar matrixbirds avatar menthays avatar plutoless avatar s1nker avatar shellgrace avatar williamdxz avatar

Stargazers

 avatar

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.