{"id":13426252,"url":"https://github.com/ineventapp/musjs","last_synced_at":"2025-03-15T21:30:51.529Z","repository":{"id":49248004,"uuid":"132194675","full_name":"ineventapp/musjs","owner":"ineventapp","description":"🐁 Mouse tracking javascript library - Follow me on Twitter @mauriciogior","archived":false,"fork":false,"pushed_at":"2021-06-22T01:06:33.000Z","size":24,"stargazers_count":150,"open_issues_count":2,"forks_count":32,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-28T04:25:47.585Z","etag":null,"topics":["javascript","javascript-library","js","mouse-tracking"],"latest_commit_sha":null,"homepage":"http://goo.gl/einFY6","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/ineventapp.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":"2018-05-04T22:26:22.000Z","updated_at":"2024-08-26T06:44:51.000Z","dependencies_parsed_at":"2022-08-28T02:41:54.831Z","dependency_job_id":null,"html_url":"https://github.com/ineventapp/musjs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineventapp%2Fmusjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineventapp%2Fmusjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineventapp%2Fmusjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineventapp%2Fmusjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ineventapp","download_url":"https://codeload.github.com/ineventapp/musjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243792299,"owners_count":20348611,"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":["javascript","javascript-library","js","mouse-tracking"],"created_at":"2024-07-31T00:01:30.071Z","updated_at":"2025-03-15T21:30:51.189Z","avatar_url":"https://github.com/ineventapp.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\u003cimg width=\"100\" height=\"100\" src=\"https://i.imgur.com/6QGo4Zn.jpg\"/\u003e\u003c/p\u003e\n\n[![GitHub license](https://img.shields.io/github/license/ineventapp/musjs.svg)](https://github.com/ineventapp/musjs/blob/master/LICENSE)\n![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen.svg)\n\n# mus.js\nA simple mouse tracking library to provide insights on how your users are handling your layout / user experience.\n\nThis library was created so you don't need an external service to \"record\" your users mouse events and \"play\" them in a later moment.\n\n**mus** works with any AMD you wish and its setup is extremely simple - **5.6kb**\n\n## Recording\n```js\n// Instantiate a mus object\nvar mus = new Mus();\n\n// Start recording\nmus.record();\n\n// After a while, stops\nsetTimeout(function() {\n  mus.stop();\n}, 5000);\n```\n\n## Playing\n```js\n// Sets playback speed (optional, default NORMAL)\nmus.setPlaybackSpeed(mus.speed.SLOW);\n\n// Starts playing and enjoy\nmus.play();\n```\n\n## Example\n\n\n\u003cimg height=\"300\" src=\"https://i.imgur.com/GCYD9EP.gif\"/\u003e\n\n\n## Public methods\n\n### Controls\n\n#### record()\nStarts a recording session for current screen. If there is already a session recorded, it appends to it.\n\n#### stop()\nStops a recording or a playback.\n\n#### play(onfinish)\nPlays current recording session.\n\n#### pause()\nPauses current playback.\n\n#### release()\nReleases all data recorded or set.\n\n\n### Getters and setters\n\n#### getData()\nReturns all data collected during recording.\n\n#### setData(data)\nSets custom data for playback. It must be a JSON object collected from `getData`.\n\n#### setFrames(frames)\nSame as `setData`, but allows only to set the `frames` array.\n\n#### setWindowSize(width, height)\nDuring recording, all data collected contains window dimensions as well, so if your recorded data comes from a different window dimension, **mus** automatically adapts to current window size. This function allows you to set a custom playback window size if you decide to use `setFrames` instead of `setData` (that already sets windows dimensions).\n\n#### setPlaybackSpeed(speed)\nAllows playback to be faster or slower.\nDefault constants: `mus.speed.SLOW` (35), `mus.speed.NORMAL` (15), `mus.speed.FAST` (5)\nYou may decide to use custom values as you wish.\n\n#### setTimePoint(bool)\nRecords time elapsed for each point for a precise data recording.\nDefault: disabled\n\n#### isRecording()\nInforms if **mus** is currently recording something.\n\n#### isPlaying()\nInforms if **mus** is currently playing something.\n\n#### isTimePoint()\nInforms if **mus** is recording time for each data point.\n\n# Roadmap\n- Detect touch movements and clicks;\n- Get form inputs;\n- Allows real clicks during setup (default false);\n- Suggestions are greatly appreciated!\n\n# Version history\n\n## v1.1.0\n- Added time point recording for precise data;\n\n## v1.0.1\n- Added minified file for distribution;\n\n# License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fineventapp%2Fmusjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fineventapp%2Fmusjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fineventapp%2Fmusjs/lists"}