{"id":13694977,"url":"https://github.com/zxlie/FullPageCaptureWithVideo","last_synced_at":"2025-05-03T04:31:26.894Z","repository":{"id":68068031,"uuid":"154514405","full_name":"zxlie/FullPageCaptureWithVideo","owner":"zxlie","description":"网页截图，支持Video截图","archived":false,"fork":false,"pushed_at":"2018-10-31T09:48:51.000Z","size":5,"stargazers_count":13,"open_issues_count":1,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T02:27:01.894Z","etag":null,"topics":["capture-with-video","html2image","page2image","pagecapture","screen-capture"],"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/zxlie.png","metadata":{"files":{"readme":"README.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}},"created_at":"2018-10-24T14:20:12.000Z","updated_at":"2024-04-18T07:33:02.000Z","dependencies_parsed_at":"2023-04-04T05:15:55.527Z","dependency_job_id":null,"html_url":"https://github.com/zxlie/FullPageCaptureWithVideo","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/zxlie%2FFullPageCaptureWithVideo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zxlie%2FFullPageCaptureWithVideo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zxlie%2FFullPageCaptureWithVideo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zxlie%2FFullPageCaptureWithVideo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zxlie","download_url":"https://codeload.github.com/zxlie/FullPageCaptureWithVideo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252144560,"owners_count":21701434,"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":["capture-with-video","html2image","page2image","pagecapture","screen-capture"],"created_at":"2024-08-02T17:01:54.405Z","updated_at":"2025-05-03T04:31:22.502Z","avatar_url":"https://github.com/zxlie.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# FullPageCaptureWithVideo\n\nJS网页截图，支持Video截图\n\n## 使用方法\n```html\n\u003cscript type=\"text/javascript\" src=\"name/to/path/FullPageCaptureWithVideo.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\"\u003e\n    FullPageCaptureWithVideo.capture(YourDomElement, function (imageDataURL) {\n        // TODO：处理图片\n    });\n\u003c/script\u003e\n```\n\n## 示例1：全网页截图\n```javascript\nFullPageCaptureWithVideo.capture(null, function (data) {\n    // 新窗口打开图片\n    window.open().document.write(\"\u003cimg src=\" + data + \" /\u003e\");\n    // 当然，你也可以直接上传保存图片\n    // Upload(data)\n});\n```\n\n## 示例2：截取某个节点/区域\n```javascript\nFullPageCaptureWithVideo.capture({\n    dom: document.getElementById('video_chat_container')\n}, function (data) {\n    // 新窗口打开图片\n    window.open().document.write(\"\u003cimg src=\" + data + \" /\u003e\");\n    // 当然，你也可以直接上传保存图片\n    // Upload(data)\n});\n```\n\n\n## 示例3：还可以自行指定html2canvas.min.js的地址\n```javascript\nFullPageCaptureWithVideo.capture({\n    // 默认: 'https://html2canvas.hertzen.com/dist/html2canvas.min.js'\n    h2cUrl: 'your html2canvas.min.js absolute url here...' \n}, function (data) {\n    // 新窗口打开图片\n    window.open().document.write(\"\u003cimg src=\" + data + \" /\u003e\");\n    // 当然，你也可以直接上传保存图片\n    // Upload(data)\n});\n```\n\n## 示例4：加个水印也是OK的\n```javascript\n// 设置水印\nFullPageCaptureWithVideo.capture({ \n    waterMark: {\n        text:'抓取于：' + new Date().toLocaleString(),\n        font: \"20px Arial\",\n        color: '#f00',\n        position: {\n            x: 20,\n            y: 20\n        } \n    }\n}, function (data) {\n    // 新窗口打开图片\n    window.open().document.write(\"\u003cimg src=\" + data + \" /\u003e\");\n    // 当然，你也可以直接上传保存图片\n    // Upload(data)\n});\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzxlie%2FFullPageCaptureWithVideo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzxlie%2FFullPageCaptureWithVideo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzxlie%2FFullPageCaptureWithVideo/lists"}