{"id":22830888,"url":"https://github.com/mantoufan/yzhanbg","last_synced_at":"2025-04-23T19:13:36.674Z","repository":{"id":164446015,"uuid":"639300652","full_name":"mantoufan/yzhanBG","owner":"mantoufan","description":"Use multiple videos, images, and weather as background, with mute, hide, text, and cherry blossom, rain, snow, firefly, and butterfly animations. 用多个视频、图片、天气作背景，支持静音、隐藏内容、文字，以及樱花、雨、雪、萤火虫和蝴蝶动画","archived":false,"fork":false,"pushed_at":"2023-05-12T13:35:45.000Z","size":1955,"stargazers_count":55,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T19:13:07.703Z","etag":null,"topics":["background-video","butterfly","dynamic-wallpaper","firefly","rainbow","sakura","snow","video-wallpapers","yzhan1kb"],"latest_commit_sha":null,"homepage":"https://mantoufan.github.io/yzhanBG","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/mantoufan.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,"governance":null}},"created_at":"2023-05-11T07:30:04.000Z","updated_at":"2024-12-01T05:51:09.000Z","dependencies_parsed_at":"2023-09-30T03:49:01.646Z","dependency_job_id":null,"html_url":"https://github.com/mantoufan/yzhanBG","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"bf688003434eec8b8d9c78f4c8aa6ceb8e1863ee"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantoufan%2FyzhanBG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantoufan%2FyzhanBG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantoufan%2FyzhanBG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantoufan%2FyzhanBG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mantoufan","download_url":"https://codeload.github.com/mantoufan/yzhanBG/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250496991,"owners_count":21440231,"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":["background-video","butterfly","dynamic-wallpaper","firefly","rainbow","sakura","snow","video-wallpapers","yzhan1kb"],"created_at":"2024-12-12T20:15:50.277Z","updated_at":"2025-04-23T19:13:36.606Z","avatar_url":"https://github.com/mantoufan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yzhanBG\n![npm](https://img.shields.io/npm/v/yzhanbg)\n![npm bundle size](https://img.shields.io/bundlephobia/minzip/yzhanbg)\n![npm](https://img.shields.io/npm/dt/yzhanbg)\n[![GitHub license](https://img.shields.io/github/license/mantoufan/yzhanbg)](https://github.com/mantoufan/yzhanbg/blob/main/LICENSE)\n![ie10+](https://img.shields.io/badge/IE-10-skyblue)  \nUse multiple videos, images, and weather as background, with mute, hide, text, and cherry blossom, rain, snow, firefly, and butterfly animations.  \n用多个视频、图片、天气作背景，支持静音、隐藏内容、文字，以及樱花、雨、雪、萤火虫和蝴蝶动画\n## Demo\n[Online Demo](https://mantoufan.github.io/yzhanBG)  \n![DEMO GIF](https://s2.loli.net/2023/05/12/3xwLHqyRthi2EYJ.gif)\n## Setup\n### Node.js\n```javascript\nnpm i yzhanbg\nimport YZhanBG from 'yzhanbg'\n```\n### Browser\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/yzhanbg@latest/docs/yzhanbg.min.js\"\u003e\u003c/script\u003e\n```\n## Usage\n```javascript \nconst yzhanbg = new YZhanBG()\nyzhanbg.run([{\n  url: './bg/1.mp4',\n  weather: {\n    type: 'firefly', // Options: sakura | snow | firefly | rain | butterfly \n    maxDuration: 10 // Default: 10s, this option can determine the speed of animations\n  },\n  text: '©ナルトMinh'\n},{\n  url: './bg/2.jpg',\n  duration: 3, // Default: undefined. Units: seconds. If video duration \u003c this, it ends early\n  weather: {\n    type: 'sakura',\n    maxDuration: 5\n  },\n  text: '©narumilk'\n},{\n  url: './bg/3.mp4',\n  weather: {\n    type: 'butterfly',\n    maxDuration: 5\n  },\n  text: '©DeRanK'\n}]) // Add multiple objects with videos, weather, and text to the list in the shown format.\nyzhanbg.pause() // Pause the video and clear the weather\nyzhanbg.resume() // Resume the video and the weather\nyzhanbg.mute() // Mute the video\nyzhanbg.unmute() // Unmute the video\nyzhanbg.current() // { url: './bg/1.mp4', weather: { type: 'firefly', maxDuration: 10 }, text: '@author' }\nyzhanbg.destory() // Destory the instance and free up memory\n```\n## Development\n### Build\n```shell\nnpm run build\n```\n### Preview\n```shell\nnpm run dev\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmantoufan%2Fyzhanbg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmantoufan%2Fyzhanbg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmantoufan%2Fyzhanbg/lists"}