Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conviva #2

Merged
merged 118 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from 117 commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
5ea5ee9
Add initial connector project code
Jeroen-Veltmans Jul 1, 2022
2ecae32
Merged in feature/conviva-implementation (pull request #1)
georgechoustoulakis Aug 2, 2022
8f7f713
Update prettier ignore files
georgechoustoulakis Aug 2, 2022
99dd4b2
Merged in fix-ci (pull request #2)
georgechoustoulakis Aug 3, 2022
92a3128
Update theoplayer to latest version
Jeroen-Veltmans Jan 31, 2023
8702fb9
Update conviva dependency
Jeroen-Veltmans Feb 1, 2023
78181fb
Allow passing metadata during playback
Jeroen-Veltmans Feb 6, 2023
d6f341a
Improve error message
Jeroen-Veltmans Feb 8, 2023
f81fe38
Update metadata collected
Jeroen-Veltmans Feb 9, 2023
b1b0793
Handle going to back/foreground
Jeroen-Veltmans Feb 23, 2023
28b29e9
Handle exiting page abruptly
Jeroen-Veltmans Feb 23, 2023
2714e7a
Handle replaying the same source
Jeroen-Veltmans Feb 23, 2023
31c2a07
End session when setting the same source
Jeroen-Veltmans Feb 23, 2023
cbfb438
Add default player name
Jeroen-Veltmans Feb 24, 2023
6c20cdf
Release session on fatal error
Jeroen-Veltmans Feb 24, 2023
8fb37f6
Adjust default assetName
Jeroen-Veltmans Feb 27, 2023
be8e711
Expose reportPlaybackFailed
Jeroen-Veltmans Feb 27, 2023
b780c8e
Remove unused parameter
Jeroen-Veltmans Feb 27, 2023
d953189
Rename framework name
Jeroen-Veltmans Feb 27, 2023
72d54e3
Remove unused parameter
Jeroen-Veltmans Feb 27, 2023
ae258f7
Remove redundant reset
Jeroen-Veltmans Feb 27, 2023
2b24811
Pass playerinfo for ad
Jeroen-Veltmans Feb 27, 2023
b6236ad
Report play_head_time for an ad
Jeroen-Veltmans Feb 27, 2023
5912579
Remove setting redundant metadata
Jeroen-Veltmans Feb 27, 2023
d5d8796
Destroy all ad reporters on session end
Jeroen-Veltmans Mar 6, 2023
ddcf808
Rework POD_INDEX value
Jeroen-Veltmans Mar 6, 2023
9e5eecf
Remake yospaceConnector if configured
Jeroen-Veltmans Mar 6, 2023
c2a9619
Run prettier
Jeroen-Veltmans Mar 6, 2023
f246efe
Update conviva version
Jeroen-Veltmans Mar 9, 2023
e60b50f
Set normal metadata as initial custom metadata
Jeroen-Veltmans Mar 10, 2023
5b2e7a4
Start podIndex from 1
Jeroen-Veltmans Mar 13, 2023
dd168f0
Remove unused variable
Jeroen-Veltmans Mar 16, 2023
d0c0ff5
Possibly end conviva ad break when destroying the ad reporter
Jeroen-Veltmans Mar 29, 2023
eee832f
Add StopAndStartNewSession
Jeroen-Veltmans Mar 29, 2023
fbc20bf
Update version
Jeroen-Veltmans Mar 29, 2023
604d89c
Add connector version as custom metadata
Jeroen-Veltmans Mar 29, 2023
4ba1af1
Update documentation
Jeroen-Veltmans Mar 30, 2023
f92a017
Run Prettier
Jeroen-Veltmans Mar 30, 2023
508d77c
Update demo pages
Jeroen-Veltmans Mar 30, 2023
88de334
Remove unnecessary play eventlistener
Jeroen-Veltmans Apr 3, 2023
ea3070b
Update theoplayer dependency
Jeroen-Veltmans Apr 7, 2023
407f7b0
Bump version
Jeroen-Veltmans Apr 7, 2023
fa25a39
Update passing content length
Jeroen-Veltmans Apr 13, 2023
5a85eb0
Never pass Infinity as content length
Jeroen-Veltmans Apr 14, 2023
0c9e210
Bump version
Jeroen-Veltmans Apr 13, 2023
2481a44
Run prettier
Jeroen-Veltmans Apr 14, 2023
3f4c3d7
Make theoplayer an external dependency
Apr 20, 2023
9a299e7
1.1.3
Apr 21, 2023
e82959e
Require a source to create a session
Jeroen-Veltmans Apr 26, 2023
3314d0a
Bump version
Jeroen-Veltmans Apr 26, 2023
55094d2
Remove temporary connectorVersion
Jeroen-Veltmans May 3, 2023
5a9d2fb
Add changelog
Jeroen-Veltmans May 4, 2023
21ac714
Merged in maintenance/expand-functionality (pull request #3)
Jeroen-Veltmans May 8, 2023
0fe87d3
Less strict yospace peer dependency
Jeroen-Veltmans May 8, 2023
741b7b8
Update changelog
Jeroen-Veltmans May 8, 2023
5dedfa1
Merged in maintenance/update-dependency (pull request #4)
Jeroen-Veltmans May 8, 2023
8902280
Update changelog
tvanlaerhoven May 9, 2023
b217b90
1.1.5
tvanlaerhoven May 9, 2023
c06dd89
Merged in release/v1.1.5 (pull request #5)
Jun 1, 2023
c065384
Report content session id on ad info
tvanlaerhoven Jun 26, 2023
b689c2c
Pass contentAssetName with ad metadata
tvanlaerhoven Jun 28, 2023
598f909
Run prettier
tvanlaerhoven Jun 29, 2023
af9d4db
Separate adBreakInfo and adBreakPosition
tvanlaerhoven Jul 26, 2023
ee84482
Add additional ad metadata
tvanlaerhoven Jul 26, 2023
b73f91a
Fix c3.csid as a string
tvanlaerhoven Jul 26, 2023
fdf4d67
Run prettier
tvanlaerhoven Jul 26, 2023
3eeb501
Merged in feature/ad_metadata (pull request #6)
Jul 27, 2023
ddc216d
Update changelog
tvanlaerhoven Jul 27, 2023
dba9035
1.1.6
tvanlaerhoven Jul 27, 2023
8f9813a
Merged in release/v1.1.6 (pull request #7)
Jul 27, 2023
d29a13c
Remove unnecessary emptied event
Jeroen-Veltmans Aug 8, 2023
ac24291
Update changelog
Jeroen-Veltmans Aug 8, 2023
d8ef4d6
Bump version
Jeroen-Veltmans Aug 9, 2023
6b54c92
Merged in bugfix/redundant-emptied-listener (pull request #8)
Jeroen-Veltmans Aug 9, 2023
562b6d6
Pass error event with additional error details
tvanlaerhoven Sep 15, 2023
518b089
Add changelog entry
tvanlaerhoven Sep 15, 2023
ffae126
Run prettier
tvanlaerhoven Sep 15, 2023
335b19f
Do not send empty error details event
tvanlaerhoven Sep 15, 2023
90161e3
Merged in feature/error_body (pull request #9)
Sep 15, 2023
0f2786c
Update changelog
tvanlaerhoven Sep 15, 2023
bb70e0b
Merged in release/v1.2.0 (pull request #10)
Sep 15, 2023
5d2ffd2
1.2.0
tvanlaerhoven Sep 15, 2023
93db051
Merged in release/v1.2.0 (pull request #11)
Sep 15, 2023
0cdf01b
Update theoplayer peer dependecy
georgechoustoulakis Nov 3, 2023
7ff87c5
Version bump
georgechoustoulakis Nov 3, 2023
8278cad
Merged in maintenance/update-peer-dependecy (pull request #12)
georgechoustoulakis Nov 3, 2023
759e1e6
Move to conviva folder
georgechoustoulakis Feb 16, 2024
001cbb9
Merge remote-tracking branch 'origin/conviva' into add-conviva
georgechoustoulakis Feb 16, 2024
a02a68a
Add conviva to workspace
georgechoustoulakis Feb 16, 2024
3da08ff
Remove old pipelines
georgechoustoulakis Feb 16, 2024
0f2951a
Update changelog format to the changeset format
georgechoustoulakis Feb 16, 2024
8a51c68
Fix rollup build
georgechoustoulakis Feb 16, 2024
2016648
Remove SDK from repo
georgechoustoulakis Feb 16, 2024
a6bb295
Align dependencies of workspaces
georgechoustoulakis Feb 16, 2024
2a8b215
Extract shared build config
georgechoustoulakis Feb 16, 2024
275498d
Bump date
georgechoustoulakis Feb 16, 2024
9d37a97
Use single prettier config
georgechoustoulakis Feb 16, 2024
6a34364
Run prettier
georgechoustoulakis Feb 16, 2024
1988654
Align eslint configs
georgechoustoulakis Feb 16, 2024
3b46fcf
Fix eslint issues
georgechoustoulakis Feb 16, 2024
3831672
Remove old pipelines
georgechoustoulakis Feb 16, 2024
96cd737
Remove
georgechoustoulakis Feb 16, 2024
b2f09c6
Add IDE folder
georgechoustoulakis Feb 16, 2024
fccec11
Add scripts
georgechoustoulakis Feb 16, 2024
c6110e0
Cleanup package.json
georgechoustoulakis Feb 16, 2024
9b292f6
Move prettier to top level package
georgechoustoulakis Feb 16, 2024
09efd39
Move eslint to top level package
georgechoustoulakis Feb 16, 2024
04b8f6b
Run lint
georgechoustoulakis Feb 16, 2024
09538d7
Fix error reporting
georgechoustoulakis Feb 20, 2024
3ef282b
Exclude
georgechoustoulakis Feb 20, 2024
b534eb3
Add line when dependencies are updated
georgechoustoulakis Feb 20, 2024
7b23a94
Change build order
georgechoustoulakis Feb 20, 2024
bc9e223
Remove dev dependency
georgechoustoulakis Feb 20, 2024
4f67350
Fix release pipeline
georgechoustoulakis Feb 20, 2024
a5a5956
Add missing changelog version
georgechoustoulakis Feb 20, 2024
07d917e
Tweak script
georgechoustoulakis Feb 20, 2024
7b6dd04
Add changeset for unlinked dependency bump
georgechoustoulakis Feb 20, 2024
9bea384
Expose SessionErrorCode and use in conviva
georgechoustoulakis Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/chilly-cars-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@theoplayer/conviva-connector-web": major
---

Updated dependencies:
- @theoplayer/yospace-connector-web@2.0.0
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"updateInternalDependencies": "minor",
"ignore": []
}
7 changes: 6 additions & 1 deletion .changeset/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ const getReleaseLine = async (changeset, type, changelogOpts) => {
* @type {import('@changesets/types').GetDependencyReleaseLine}
*/
const getDependencyReleaseLine = async (changesets, dependenciesUpdated, changelogOpts) => {
return '';
if (dependenciesUpdated.length === 0) return "";

const updatedDependenciesList = dependenciesUpdated.map(
(dependency) => ` - ${dependency.name}@${dependency.newVersion}`
);
return [['- Updated dependencies:'], ...updatedDependenciesList].join("\n");
}

/**
Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*/dist/
*/test/pages/
35 changes: 29 additions & 6 deletions yospace/.eslintrc.json → .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@
"es2021": true,
"jest": true
},
"extends": ["airbnb-base", "eslint:recommended", "prettier"],
"extends": [
"airbnb-base",
"eslint:recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "import"],
"plugins": [
"@typescript-eslint",
"import"
],
"rules": {
"class-methods-use-this": 0,
"import/extensions": [
Expand All @@ -27,10 +34,23 @@
"import/no-unresolved": 1,
"no-shadow": "off",
"no-use-before-define": 0,
"max-classes-per-file": ["error", 5],
"max-classes-per-file": [
"error",
5
],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["warn", {"argsIgnorePattern": "^_"}],
"@typescript-eslint/no-shadow": 1
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-shadow": 1,
"no-useless-return": 0,
"prefer-destructuring": 0,
"no-console": 0,
"no-plusplus": 0,
"lines-between-class-members": 0
},
"settings": {
"import/resolver": {
Expand All @@ -40,5 +60,8 @@
}
}
},
"ignorePatterns": ["lib/**/*", "dist/**/*"]
"ignorePatterns": [
"lib/**/*",
"dist/**/*"
]
}
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jobs:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci --workspaces
run: npm ci --workspaces --include-workspace-root
- name: Build
run: npm run build
- name: Create release PR or publish to npm
id: changesets
uses: changesets/action@v1
Expand Down
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/prettier.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/web-connectors.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*/dist/
*/test/pages/
6 changes: 5 additions & 1 deletion yospace/.prettierrc.json → .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
"printWidth": 120,
"tabWidth": 4,
"trailingComma": "none",
"singleQuote": true,
"overrides": [
{
"files": ["**/*.json", "**/*.yml"],
"files": [
"**/*.json",
"**/*.yml"
],
"options": {
"tabWidth": 2
}
Expand Down
24 changes: 24 additions & 0 deletions conviva/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# These are some examples of commonly ignored file patterns.
# You should customize this list as applicable to your project.
# Learn more about .gitignore:
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore

# Node artifact files
node_modules/
lib/
dist/

# JetBrains IDE
.idea/

# Unit test reports
TEST*.xml

# Generated by MacOS
.DS_Store

# Generated by Windows
Thumbs.db

# THEOplayer build and TypeScript definitions
local/
59 changes: 59 additions & 0 deletions conviva/BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# conviva-connector-web

A connector implementing Conviva for web.

## Getting started

```
npm install
```

## Testing and code quality

A test stack is set up and can be used by adding tests to the `test/unit/` folder. Run these tests with

```
npm run test
```

This project is set up with [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/). You can run these checks with

```
npm run lint
npm run prettier
```

but it's a good idea to set up the necessary IDE integration for both.

CI will automatically verify whether the code passes all necessary quality gates.

## Manual testing

- Run `npm run serve` to start `http-server` in the root folder by running.
- Run `npm run build` to create the integrations library `conviva-connector.umd.js` under `dist/`.
- Navigate to `localhost:8080/test/pages/main_umd.html` or add an alternative test page.

## Release process

This release process is based on the assumption that the `master` branch is the default branch, and working branches are branched off from it and PR's back to it.
It is mostly automated by creating tags with a specific format on the `master` branch.

### Prerequisites

- All the necesary code for the release is present on the `master` branch.
- The `README.md` file contains the necessary information for an external developer to use the connector. This will be published along with the code.
- Bitbucket Pipelines has been correctly enabled for the repository.
- Github Actions integration is on the roadmap.
- The necessary variables have been configured for Bitbucket Pipelines:
- `NPMRC_CONTENT`: the full content of an `.npmrc` file to be used during publishing. Linebreaks in the file can be substituted by `\n` in the variable.
- `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`: The AWS credentials necessary to publish a bundle to CDN.
- This might be replaced with a Github release artifact later.

### Creating a release

These steps assume that the new release version is `X.Y.Z`.

- Create a new version bump commit on the `master` branch to bump the project version to the release version.
- Create a tag on the version bump commit of the format `vX.Y.Z`.
- Verify that the release pipeline correctly runs for your new tag.
- Verify that the correct artifacts have been published once the pipeline has completed.
82 changes: 82 additions & 0 deletions conviva/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# @theoplayer/conviva-connector-web

## 1.3.0

### ✨ Features

- Updated to be compatible with THEOplayer `6.X`.

## 1.2.0

### ✨ Features

- Added error event with addition error information on playback failed.

## 1.1.7

### 🐛 Issues

- Removed reporting a buffering state on getting an `emptied` event.

## 1.1.6

### ✨ Features

- Added ad metadata for CSAI.

### 🐛 Issues

- Fixed an issue where the ad break position would be incorrectly reported.

## 1.1.5

### 🐛 Issues

- Updated yospace connector peer dependency.

## 1.1.4

### 🐛 Issues

- Fixed an issue where a session could be created without a source.

## 1.1.3

### Changed

- Made THEOplayer an external dependency.

## 1.1.2

### 🐛 Issues

- Fixed passing content length for a live stream or on early error.

## 1.1.1

### Changed

- Updated THEOplayer version to 5.X.

## 1.1.0

### ✨ Features

- Added `setContentInfo` to pass video metadata during playback.
- Added `setAdInfo` to pass ad metadata during playback.
- Added `reportPlaybackFailed` to notify Conviva of non-video errors.
- Added `stopAndStartNewSession` to enable explicitly stopping the current session and starting a new one.
- Added visibility change reporting.
- Updated THEOplayer version to 4.X.
- Improved error handling.
- Improved default metadata.

### 🐛 Issues

- Fixed handling a replay of the same source.

## 1.0.0

### ✨ Features

- Initial release
21 changes: 21 additions & 0 deletions conviva/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 THEO Technologies NV

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading