{"id":16210041,"url":"https://github.com/bian-sh/rtsp-player-for-unity-webgl","last_synced_at":"2025-03-19T08:31:16.810Z","repository":{"id":43376837,"uuid":"465254152","full_name":"Bian-Sh/RTSP-Player-For-Unity-WebGL","owner":"Bian-Sh","description":"测试网页居中弹窗播放 RTSP 视频，可用于接 rtsp 监控，同时演示怎么接入到 webgl 上","archived":false,"fork":false,"pushed_at":"2022-03-05T11:55:51.000Z","size":53193,"stargazers_count":54,"open_issues_count":1,"forks_count":16,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-28T17:12:42.990Z","etag":null,"topics":["rtsp-player","rtsp-server","unity","webgl","webserver"],"latest_commit_sha":null,"homepage":"https://www.jianshu.com/p/9bb7fd966710","language":"JavaScript","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/Bian-Sh.png","metadata":{"files":{"readme":"readme.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}},"created_at":"2022-03-02T10:15:28.000Z","updated_at":"2025-01-08T02:48:19.000Z","dependencies_parsed_at":"2022-07-15T02:01:07.666Z","dependency_job_id":null,"html_url":"https://github.com/Bian-Sh/RTSP-Player-For-Unity-WebGL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bian-Sh%2FRTSP-Player-For-Unity-WebGL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bian-Sh%2FRTSP-Player-For-Unity-WebGL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bian-Sh%2FRTSP-Player-For-Unity-WebGL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bian-Sh%2FRTSP-Player-For-Unity-WebGL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bian-Sh","download_url":"https://codeload.github.com/Bian-Sh/RTSP-Player-For-Unity-WebGL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243976381,"owners_count":20377691,"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":["rtsp-player","rtsp-server","unity","webgl","webserver"],"created_at":"2024-10-10T10:34:56.950Z","updated_at":"2025-03-19T08:31:11.798Z","avatar_url":"https://github.com/Bian-Sh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e 这是一个在 Unity 开发的 WebGL 应用中弹窗播放 RTSP 视频的测试项目\n\n# 功能：\n\n1. 弹窗并播放 RTSP 视频 （基于 webrtc 推流）\n\n2. 弹窗动态适应浏览器窗口保持居中\n\n3. 蒙版渐隐渐显\n\n4. 在 Unity 开发的 WebGL 应用中弹窗播放 RTSP 监控\n\n# 演示：\n\n\u003e 图中展示的控制台程序是 RTSP 推流服务器\n\n![](./doc/rtspplayer.gif)\n\n# 如何使用：\n\n1. 开启 ``WebServer`` ，路径是 **WebServer/MyWebServer.exe**\n   \n   请留意，默认的端口是 ：80 ，如遇端口冲突请通过此服务器设置页指定其他端口。\n\n2. 开启 ``RTSPtoWebServer`` , 路径是 **RTSPtoWebServer/RTSPtoWeb.exe**\n   \n   此服务器默认端口是 ：8083，如遇端口冲突，修改 config.json 中``\"http_port\": \":8083\"`` 的值即可。\n\n3. 现在可以测试 RTSP 视频播放了：\n   \n   * 浏览器输入：``http://127.0.0.1:8083`` 可以开启 [RTSPtoWeb](https://github.com/deepch/RTSPtoWeb) 提供的测试页面。\n   \n   * 浏览器输入：`http://localhost/player/` 即可测试笔者整理的中间弹窗播放 RTSP 视频的功能\n   \n   * 浏览器输入：`http://localhost/webgl/` 即可测试笔者实现的 Webgl 弹窗播放RTSP 视频的功能\n\n4. 如何使用自己的 rtsp 链接呢？\n   \n   \u003e 前提： 只支持 H264 编码的视频\n   \n   a. 打开 **RTSPtoWebServer/config.json** \n   \n   b. 按照原来的格式添加自己的 rtsp 数据，id 不可重复。\n   \n   ![](./doc/config.png)\n   \n   c. 打开 **RTSPPlayer/index.html** 修改 ShowPanel 方法中 player.load(\"demo\");  的 ``demo`` 字眼为你写的id \n   \n   d. 请注意，修改了 config.json ，Unity工程中的 相机绑定的相机数据需要一并修改，为方便外部修改和避免重新打包，可以将此类数据外部动态加载。\n\n# 写到最后：\n\n* 本仓库作者为 Unity 前端， Web 前端大佬轻拍。\n\n* 如果希望弹窗的动效更丰富，可以使用类似 [layer.js](http://www.h-ui.net/lib/layer.js.shtml) 弹窗类的插件\n\n* 这个仓库使用了 [jquery](https://github.com/jquery/jquery)\n\n* 这个测试视频卡卡且 2022.6.1 就无法访问了，有条件的使用监控测试吧。\n\n# Reference：\n\n* [vdalex25/WebRtcPlayer: example player for RTSPtoWebRTC project ](https://github.com/vdalex25/WebRtcPlayer)\n\n* [deepch/RTSPtoWeb: RTSP Stream to WebBrowser](https://github.com/deepch/RTSPtoWeb)\n\n* [greggman/better-unity-webgl-template](https://github.com/greggman/better-unity-webgl-template/)\n\n\u003e License MIT \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbian-sh%2Frtsp-player-for-unity-webgl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbian-sh%2Frtsp-player-for-unity-webgl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbian-sh%2Frtsp-player-for-unity-webgl/lists"}