{"id":20285832,"url":"https://github.com/tpkn/quartile-tracker","last_synced_at":"2025-10-29T18:02:55.061Z","repository":{"id":74204166,"uuid":"160874552","full_name":"tpkn/quartile-tracker","owner":"tpkn","description":"Easy way to track video quartiles","archived":false,"fork":false,"pushed_at":"2023-07-19T13:05:03.000Z","size":33,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T08:12:53.849Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tpkn.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-07T20:55:33.000Z","updated_at":"2023-02-13T07:40:54.000Z","dependencies_parsed_at":"2024-11-14T14:31:46.824Z","dependency_job_id":null,"html_url":"https://github.com/tpkn/quartile-tracker","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/tpkn%2Fquartile-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpkn%2Fquartile-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpkn%2Fquartile-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpkn%2Fquartile-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpkn","download_url":"https://codeload.github.com/tpkn/quartile-tracker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241780513,"owners_count":20019061,"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-11-14T14:29:08.245Z","updated_at":"2025-10-29T18:02:50.028Z","avatar_url":"https://github.com/tpkn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quartile Tracker\nEasy way to track video quartiles\n\n \n\n## API\n\n```text\nnew QuartileTracker(video, trackers[, options])\n```\n\n\n### video   \n**Type**: _Object_   \n\n\n### trackers\n**Type**: _Array_   \n\nArray of trackers with following options:\n- `time` _Number | String_ Can be a seconds or percent\n- `pixel` _String_ This link would be called when `time` has come\n- `callback` _Function_ Also you can call some callback function\n\n\n### options\n**Type**: _Object_   \n\n\n### options.threshold\n**Type**: _Number_   \n**Default**: `1`   \n\nTracker fire time threshold in seconds (doesn't matter if time is in percent). \n\nIf it's `0` and you'll jump to the end of the video, then **all the trackers will be triggered right away**. \n\nIf it's set to `0.5` and your tracker is at `2 sec`, then tracker will be called between `2 and 2.5 sec`.\n\n**_(!) Too small threshold may cause trackers to be jumped over._**\n\n\n\n### options.auto_rest\n**Type**: _Boolean_   \n**Default**: `true`   \n\nReenable all trackers after end of videos\n\n\n### options.verbose\n**Type**: _Boolean_   \n**Default**: `false`   \n\nTurns on/off events trace\n\n\n\n\n## Methods\n\n\n### reset()\n\nReenables all trackers\n\n\n\n### destroy()\n\n\n\n\n## Usage\n```javascript\nlet video = document.getElementById('video');\nlet trackers = [\n   { time: '1s', callback: () =\u003e {\n      console.log('1s callback');\n   }},\n   { time: '25%', pixel: 'https://localhost/pixel1.gif' },\n   { time: 10, pixel: 'https://localhost/pixel2.gif' },\n];\n\nlet qt = new QuartileTracker(video, trackers, { threshold: 1.5, verbose: true });\n```\n\n\n\n## Changelog \n#### 2023-02-02:\n- Added `threshold` option to limit max fire time for trackers\n- A few small optimizations...\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpkn%2Fquartile-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpkn%2Fquartile-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpkn%2Fquartile-tracker/lists"}