@api.video/hlsjs-player-analytics
Advanced tools
Comparing version 1.0.4 to 1.0.5
# Changelog | ||
All changes to this project will be documented in this file. | ||
## [1.0.5] - 2021-11-22 | ||
- Bump player-analytics version | ||
## [1.0.4] - 2021-06-30 | ||
@@ -5,0 +8,0 @@ - Add dist/* |
{ | ||
"name": "@api.video/hlsjs-player-analytics", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "api.video player analytics plugin for hls.js based players", | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:apivideo/hlsjs-player-analytics.git" | ||
"url": "git@github.com:apivideo/api.video-flutter-uploader.git" | ||
}, | ||
@@ -26,3 +26,2 @@ "author": "api.video <ecosystem-team@api.video> (https://api.video/)", | ||
}, | ||
"peerDependencies": {}, | ||
"devDependencies": { | ||
@@ -40,7 +39,7 @@ "@types/jest": "^26.0.22", | ||
"typescript": "^4.2.3", | ||
"webpack": "^4.44.1", | ||
"webpack-cli": "^3.3.12" | ||
"webpack": "^5.64.2", | ||
"webpack-cli": "^4.9.1" | ||
}, | ||
"dependencies": { | ||
"@api.video/player-analytics": "^1.0.5", | ||
"@api.video/player-analytics": "^1.0.7", | ||
"@types/hls.js": "^0.13.3", | ||
@@ -47,0 +46,0 @@ "core-js": "^3.10.0", |
@@ -0,12 +1,28 @@ | ||
[![badge](https://img.shields.io/twitter/follow/api_video?style=social)](https://twitter.com/intent/follow?screen_name=api_video) [![badge](https://img.shields.io/github/stars/apivideo/api.video-hlsjs-analytics?style=social)](https://github.com/apivideo/api.video-hlsjs-analytics) [![badge](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.api.video)](https://community.api.video) | ||
![](https://github.com/apivideo/API_OAS_file/blob/master/apivideo_banner.png) | ||
![npm](https://img.shields.io/npm/v/@api.video/hlsjs-player-analytics) ![ts](https://badgen.net/badge/-/TypeScript/blue?icon=typescript&label) | ||
<h1 align="center">api.video hls.js analytics module</h1> | ||
# api.video player analytics module for hls.js based players | ||
[api.video](https://api.video) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app. | ||
# Table of contents | ||
- [Table of contents](#table-of-contents) | ||
- [Project description](#project-description) | ||
- [Getting started](#getting-started) | ||
- [Setup](#setup) | ||
- [Code sample](#code-sample) | ||
- [Documentation](#documentation) | ||
- [Module instanciation](#module-instanciation) | ||
- [Instanciation example](#instanciation-example) | ||
# Project description | ||
hls.js module to call the api.video analytics collector. | ||
# Module usage | ||
# Getting started | ||
## Setup | ||
First include `https://unpkg.com/@api.video/hlsjs-player-analytics` in your web page. | ||
Include `https://unpkg.com/@api.video/hlsjs-player-analytics` in your web page. | ||
@@ -17,2 +33,33 @@ ```html | ||
## Code sample | ||
Include the module in your HTML file like so: | ||
```html | ||
<html> | ||
<head> | ||
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script> | ||
<script src="https://unpkg.com/@api.video/hlsjs-player-analytics"></script> | ||
</head> | ||
<body> | ||
<video id="video" controls width=640 height=480></video> | ||
<script> | ||
var video = document.getElementById('video'); | ||
var videoSrc = 'https://cdn.api.video/vod/vi5oDagRVJBSKHxSiPux5rYD/hls/manifest.m3u8'; | ||
if (Hls.isSupported()) { | ||
var hls = new Hls(); | ||
new HlsJsApiVideoAnalytics(hls); | ||
hls.loadSource(videoSrc); | ||
hls.attachMedia(video); | ||
} | ||
</script> | ||
</body> | ||
</html> | ||
``` | ||
# Documentation | ||
## Module instanciation | ||
@@ -37,3 +84,3 @@ | ||
### instanciation example | ||
## Instanciation example | ||
@@ -43,3 +90,3 @@ ```javascript | ||
new VideoElementApiVideoAnalytics(hls, { | ||
new HlsJsApiVideoAnalytics(hls, { | ||
sequence: { | ||
@@ -54,29 +101,1 @@ start: 10, | ||
``` | ||
# Full example | ||
Include the module in your HTML file like so: | ||
```html | ||
<html> | ||
<head> | ||
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script> | ||
<script src="https://unpkg.com/@api.video/hlsjs-player-analytics"></script> | ||
</head> | ||
<body> | ||
<video id="video" controls width=640 height=480></video> | ||
<script> | ||
var video = document.getElementById('video'); | ||
var videoSrc = 'https://cdn.api.video/vod/vi5oDagRVJBSKHxSiPux5rYD/hls/manifest.m3u8'; | ||
if (Hls.isSupported()) { | ||
var hls = new Hls(); | ||
new VideoElementApiVideoAnalytics(hls); | ||
hls.loadSource(videoSrc); | ||
hls.attachMedia(video); | ||
} | ||
</script> | ||
</body> | ||
</html> | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
115431
14
98
122
2