{"id":20268591,"url":"https://github.com/agoraio/api-examples-web","last_synced_at":"2025-04-08T09:09:54.757Z","repository":{"id":37284527,"uuid":"313947890","full_name":"AgoraIO/API-Examples-Web","owner":"AgoraIO","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-20T03:35:00.000Z","size":64186,"stargazers_count":233,"open_issues_count":23,"forks_count":202,"subscribers_count":45,"default_branch":"main","last_synced_at":"2025-04-01T08:33:51.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AgoraIO.png","metadata":{"files":{"readme":"README.cn.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-18T13:45:26.000Z","updated_at":"2025-03-27T04:09:53.000Z","dependencies_parsed_at":"2023-02-09T02:30:33.142Z","dependency_job_id":"88614d1f-202f-44b7-8501-81534ac065fc","html_url":"https://github.com/AgoraIO/API-Examples-Web","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgoraIO%2FAPI-Examples-Web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgoraIO%2FAPI-Examples-Web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgoraIO%2FAPI-Examples-Web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgoraIO%2FAPI-Examples-Web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AgoraIO","download_url":"https://codeload.github.com/AgoraIO/API-Examples-Web/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809964,"owners_count":20999816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T12:18:59.626Z","updated_at":"2025-04-08T09:09:54.734Z","avatar_url":"https://github.com/AgoraIO.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agora RTC Web SDK 4.x 示例项目\n\n_[English](README.md) | 简体中文_\n\n## 简介\n\n此仓库包含基于 Agora RTC Web SDK 4.x 的示例项目。\n\n\u003chr\u003e\n\nWeb SDK 4.x 是基于 Web SDK 3.x 开发的全量重构版本，在继承了 Web SDK 3.x 功能的基础上，优化了 SDK 的内部架构，提高了 API 的易用性。\n\nWeb SDK 4.x 具有以下优势：\n\n- 面向开发者提供更先进的 API 架构和范式。\n- 所有异步场景的 API 使用 Promise 替代 Callback，提升集成代码的质量和健壮性。\n- 优化频道事件通知机制，统一频道内事件的命名和回调参数的格式，降低断线重连的处理难度。\n- 提供清晰和完善的错误码，方便错误排查。\n- 支持 TypeScript。\n\n## 示例项目（使用 jQuery 和 Bootstrap）\n\n| 功能           | 示例项目位置                                                 |\n| -------------- | ------------------------------------------------------------ |\n| 基础示例       | [/src/example/basic](/src/example/basic)                     |\n| 进阶示例       | [/src/example/advanced](/src/example/advanced)               |\n| 插件示例       | [/src/example/plugin](/src/example/plugin)                   |\n| 其他示例       | [/src/example/others](/src/example/others)                   |\n| vue 框架示例   | [/src/example/framework/vue](/src/example/framework/vue)     |\n| react 框架示例 | [/src/example/framework/react](/src/example/framework/react) |\n\n### 如何运行示例项目\n\n#### 前提条件\n\n- 你必须使用 SDK 支持的浏览器运行示例项目。 关于支持的浏览器列表参考 [浏览器兼容性和已知问题](https://doc.shengwang.cn/doc/rtc/javascript/overview/browser-compatibility)。\n\n#### 运行步骤\n\n1. 在项目根路径运行下面的命令安装依赖项。\n\n   ```shell\n   npm install\n   ```\n\n2. 运行下面的命令启动示例项目。\n\n   ```shell\n   npm run dev\n   ```\n\n3. 在浏览器打开 [http://localhost:3001/index.html](http://localhost:3001/index.html)\n\n4. 在示例项目设置页面上，输入 App ID 和 App Certificate，然后点击设置按钮。\n   - 关于 App ID 和 App Certificate 的获取方法参考 [开始使用 Agora 平台](https://docs.agora.io/cn/Agora%20Platform/get_appid_token)。\n\n## 参考\n\n- [Web SDK 4.x 产品概述](https://doc.shengwang.cn/doc/rtc/javascript/overview/product-overview)\n- [Web SDK 4.x API 参考](https://doc.shengwang.cn/api-ref/rtc/javascript/overview)\n- [基于本仓库部署的在线 demo](https://webdemo.agora.io/)\n\n## 反馈\n\n如果你有任何问题或建议，可以通过 issue 的形式反馈。\n\n## 相关资源\n\n- 你可以先参阅 [常见问题](https://doc.shengwang.cn/faq/list?category=integration-issues\u0026platform=javascript\u0026product=rtc)\n- 如果你想了解更多官方示例，可以参考 [官方 SDK 示例](https://github.com/AgoraIO)\n- 如果你想了解声网 SDK 在复杂场景下的应用，可以参考 [官方场景案例](https://github.com/AgoraIO-usecase)\n- 如果你想了解声网的一些社区开发者维护的项目，可以查看 [社区](https://github.com/AgoraIO-Community)\n- 若遇到问题需要开发者帮助，你可以到 [开发者社区](https://rtcdeveloper.com/) 提问\n- 如果需要售后技术支持, 你可以在 [Agora Dashboard](https://console.shengwang.cn/overview) 提交工单\n\n## 许可证\n\n示例项目遵守 MIT 许可证。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagoraio%2Fapi-examples-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagoraio%2Fapi-examples-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagoraio%2Fapi-examples-web/lists"}