{"id":16325312,"url":"https://github.com/murrayee/usevideostate","last_synced_at":"2025-11-01T00:30:32.227Z","repository":{"id":57347287,"uuid":"259493216","full_name":"murrayee/useVideoState","owner":"murrayee","description":"初始化视频状态","archived":false,"fork":false,"pushed_at":"2024-03-07T04:00:58.000Z","size":66,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T19:07:46.002Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/murrayee.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,"publiccode":null,"codemeta":null}},"created_at":"2020-04-28T00:54:18.000Z","updated_at":"2024-03-07T04:00:13.000Z","dependencies_parsed_at":"2024-11-06T17:52:47.230Z","dependency_job_id":"4014bef8-9177-46ca-a6bc-dcd7cc71541c","html_url":"https://github.com/murrayee/useVideoState","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"96104cce50d85a7081a3dd5c627e1f1602a72954"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murrayee%2FuseVideoState","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murrayee%2FuseVideoState/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murrayee%2FuseVideoState/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murrayee%2FuseVideoState/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/murrayee","download_url":"https://codeload.github.com/murrayee/useVideoState/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239242106,"owners_count":19605954,"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-10-10T23:04:45.069Z","updated_at":"2025-11-01T00:30:32.173Z","avatar_url":"https://github.com/murrayee.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-hooks react-usevideostate\n\n**react-usevideostate** 初始化 video 属性以及事件绑定\n\n## Installation\n\n```bash\n# with NPM\nnpm install react-usevideostate --save-dev\n\n# with Yarn\nyarn add react-usevideostate\n```\n\n## Usage\n\n```jsx\nimport useVideoState from \"react-usevideostate\";\n\nconst Example = () =\u003e {\n  const videoRef = useRef(null);\n  const videoState = useVideoState(videoRef);\n  useEffect(() =\u003e {\n    console.log(videoState);\n  }, [videoState]);\n\n  return (\n    \u003cdiv\u003e\n      \u003cvideo\n        width=\"500\"\n        height=\"400\"\n        controls\n        ref={videoRef}\n        src=\"https://download.blender.org/durian/trailer/sintel_trailer-720p.mp4\"\n      \u003e\u003c/video\u003e\n    \u003c/div\u003e\n  );\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurrayee%2Fusevideostate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmurrayee%2Fusevideostate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurrayee%2Fusevideostate/lists"}