{"id":13616880,"url":"https://github.com/clappr/clappr-stats","last_synced_at":"2025-08-01T16:37:58.271Z","repository":{"id":8901728,"uuid":"60117030","full_name":"clappr/clappr-stats","owner":"clappr","description":"A clappr plugin to report playback statuses (timers: session, buffering, watch and counters: play, pause, error, fps)","archived":false,"fork":false,"pushed_at":"2024-07-31T23:42:53.000Z","size":1077,"stargazers_count":41,"open_issues_count":23,"forks_count":15,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-07T21:09:27.443Z","etag":null,"topics":["analytics","clappr-player","metrics","plugin","statistics","video-player"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clappr.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":"2016-05-31T19:22:30.000Z","updated_at":"2025-01-27T22:25:32.000Z","dependencies_parsed_at":"2024-09-18T18:06:49.402Z","dependency_job_id":"000bf48f-280c-4d0e-818b-89ae91aa45b3","html_url":"https://github.com/clappr/clappr-stats","commit_stats":{"total_commits":110,"total_committers":14,"mean_commits":7.857142857142857,"dds":0.6636363636363636,"last_synced_commit":"14368af19cb42d07346765b74297e02cefac6d69"},"previous_names":["leandromoreira/clappr-stats"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clappr%2Fclappr-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clappr%2Fclappr-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clappr%2Fclappr-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clappr%2Fclappr-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clappr","download_url":"https://codeload.github.com/clappr/clappr-stats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248815589,"owners_count":21165952,"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":["analytics","clappr-player","metrics","plugin","statistics","video-player"],"created_at":"2024-08-01T20:01:34.378Z","updated_at":"2025-04-14T03:31:47.160Z","avatar_url":"https://github.com/clappr.png","language":"JavaScript","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"[![npm version](https://badge.fury.io/js/clappr-stats.svg)](https://badge.fury.io/js/clappr-stats)\n[![license](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)\n\n# Usage\n\nYou can use it from JSDelivr `https://cdn.jsdelivr.net/npm/@clappr/stats-plugin@latest/dist/clappr-stats.min.js` or as a npm package.\n\n```html\n\u003cscript\u003e\n    var player = new Clappr.Player({\n      parentId: '#player',\n      plugins: [ClapprStats],\n      source: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4',\n      height: 360,\n      width: 640,\n      clapprStats: {\n        // optional: time in miliseconds for each report.\n        // default: 5000\n        runEach: 5000,\n        // optional: callback function.\n        // default: console.log\n        onReport: (metrics) =\u003e {console.log(metrics)},\n        // Fire PERCENTAGE_EVENT when video complete some percentage.\n        // default: []\n        onCompletion: [10, 20, 55, 100],\n        // optional: provide an img uri hosted at the same place as your farm\n        // or near of it prefferable 1x1px, without caching.\n        // default: none\n        uriToMeasureLatency: 'http://www.example.com/images/tv/pixel-1x1-red.gif',\n        // optional: provide some assets uris hosted at the same place as your farm\n        // or near of it prefferable in an uncompressible file format, without caching.\n        // default: none\n        urisToMeasureBandwidth: [\n          {url: 'http://www.example.com/images/tv/500kb.jpg', timeout: 3000},\n          {url: 'http://www.example.com/images/tv/1mb.jpg', timeout: 6000},\n          {url: 'http://www.example.com/images/tv/5mb.jpg', timeout: 12000}\n        ],\n        // optional: number of reports between two consecutive bandwidth tests.\n        // default: 10\n        runBandwidthTestEvery: 10\n      }\n    })\n\u003c/script\u003e\n```\n\n# Metrics\n\n```javascript\n{\n  counters: {\n    play: 0, // number of plays\n    pause: 0, // number of pauses\n    error: 0, // number of errors\n    buffering: 0, // number of bufferings\n    decodedFrames: 0, // number of decoded frames (when available)\n    droppedFrames: 0, // number of dropped frames (when available)\n    fps: 0, // frames per second (when available)\n    changeLevel: 0, // number of adaptative bitrate changes\n    seek: 0, // number of seeks\n    fullscreen: 0, // number of times that user went to fullscreen\n    dvrUsage: 0 // number of time that user used dvr seek (at live stream)\n  },\n  timers: {\n    startup: 0, // time (ms) since user click/touch play (intent to play) to the play\n    watch: 0, // time (ms) of watched content (does not include pause and buffering)\n    pause: 0, // time (ms) of paused content\n    buffering: 0, // time (ms) of buffering\n    session: 0, // time (ms) of session (sum of watch+pause+buffering)\n    latency: 0, // time (ms) of latency between user and the provided uri\n  },\n  extra: {\n    playbackName: '', // playback name (hls, html5_video, flashls)\n    playbackType: '', // vod or live\n    buffersize: 0, // buffersize in ms\n    duration: 0, // duration time in ms\n    currentTime: 0, // current time in ms\n    bitratesHistory: [], // the bitrates changes history\n    bitrateWeightedMean: 0, // bitrate weighted mean (bps)\n    bitrateMostUsed: 0, // most used (based on time) bitrate (bps)\n    watchHistory: [], // an array of an array of watched range time ex: [0, 2200]\n    watchedPercentage: 0, // % of watched time\n    bufferingPercentage: 0, // % of buffering time\n    bandwidth: 0, // user bandwidth (bps)\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclappr%2Fclappr-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclappr%2Fclappr-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclappr%2Fclappr-stats/lists"}