{"id":19725499,"url":"https://github.com/easychen/autoplay-web-specification","last_synced_at":"2025-11-21T19:03:20.484Z","repository":{"id":145557670,"uuid":"388415232","full_name":"easychen/autoplay-web-specification","owner":"easychen","description":"自播放网页规范 specification of autoplay web","archived":false,"fork":false,"pushed_at":"2021-07-23T03:08:20.000Z","size":71,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T01:47:36.820Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/easychen.png","metadata":{"files":{"readme":"README.cn.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-07-22T10:03:53.000Z","updated_at":"2023-03-01T03:44:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"c4e911a2-7230-4c43-b84d-fb1f25e3e9ac","html_url":"https://github.com/easychen/autoplay-web-specification","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/easychen/autoplay-web-specification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2Fautoplay-web-specification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2Fautoplay-web-specification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2Fautoplay-web-specification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2Fautoplay-web-specification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/easychen","download_url":"https://codeload.github.com/easychen/autoplay-web-specification/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2Fautoplay-web-specification/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285672863,"owners_count":27212148,"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","status":"online","status_checked_at":"2025-11-21T02:00:06.175Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11T23:30:37.913Z","updated_at":"2025-11-21T19:03:20.469Z","avatar_url":"https://github.com/easychen.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 浏览器录制工具和自播放网页规范\n\n- 规范编号 BROWSER-REC 简称 BRREC \n- 规范编号 BROWSER-REC-SELF-PLAYING-WEB 简称 BRSPW \n\n## 什么是浏览器录制工具\n\n录屏工具可以录制电脑屏幕，浏览器录制工具则录制浏览器。录制浏览器的意义在于，可以用过纯粹的 Web 技术来组织内容。\n\n## 什么是自播放网页\n录制静态网页没有意义，但我们可以通过 JavaScript 让网页可以在访问时自动的、按时间顺序显示不同的内容。这一类网页，我们称其为「自播放网页」。\n\n## 「浏览器录制工具」和「自播放网页」的交互\n\n为了让网页内容和录制操作可以同步，我们需要在「网页」和「录制工具」之间进行交互。至少需要一个单向通知机制。\n\n一个常见的实现是在「浏览器录制工具」启动一个 http 服务，监听请求响应控制。\n\n![](pic1.png)\n\n本规范描述了一个简单的交互接口，以方便遵守规范的网页可以被更多的录制工具兼容。\n\n## 规范内容\n\n### 协议\n提供一个 http 协议接受请求\n\n### 接口\n\n#### /start \n\n- 接口描述：开始录制\n- 参数：没有参数\n- 方法：GET 和 POST\n- 成功返回：{\"code\":\"0\",\"message\":\"done\"，\"task_id\":\"\"} task_id 为可选\n- 错误返回：{\"code\":\"错误编号\",\"error\":\"错误信息\"}\n- 备注：为方便调用，此接口需支持 CORS 调用\n\n#### /stop\n\n- 接口描述：停止录制\n- 参数：task_id（可选）\n- 方法：GET 和 POST\n- 成功返回：{\"code\":\"0\",\"message\":\"done\"}\n- 错误返回：{\"code\":\"错误编号\",\"error\":\"错误信息\"}\n- 备注：为方便调用，此接口需支持 CORS 调用\n\n#### /detail - 可选\n\n- 接口描述：查看录制任务状态\n- 参数：task_id（可选）\n- 方法：GET 和 POST\n- 成功返回：{\"code\":\"0\",\"message\":{\"录制任务状态对象\"}}\n- 错误返回：{\"code\":\"错误编号\",\"error\":\"错误信息\"}\n- 备注：为方便调用，此接口需支持 CORS 调用\n\n### 其他说明\n\n如果「浏览器录制工具」包含浏览器，那么除了从外部访问 http 接口，被录制的网页本身也可以访问到这个接口。这使得网页可以主动控制录制操作。\n\n![](pic2.png)\n\n比如，当内容加载完成后，可以通过 JavaScript 调用 /start 端口；当内容播放完后，可以通过 Javascript 调用 /stop 端口结束录制。\n\n通过以上接口控制录制操作的自播放网页，被认为遵守 BRSPW 规范。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasychen%2Fautoplay-web-specification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasychen%2Fautoplay-web-specification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasychen%2Fautoplay-web-specification/lists"}