Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
types: [completed]
branches: [main]
workflow_dispatch:
branches: [main]

permissions:
contents: read
Expand All @@ -14,7 +13,7 @@ jobs:
build-and-deploy:
name: build and deploy docs
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
if: ${{ (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') }}
permissions:
contents: write
steps:
Expand All @@ -24,7 +23,6 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
cache: npm
node-version: lts/*

- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"build": "rollup -c",
"build:es5": "rollup -c --format umd",
"build:docs": "typedoc index.ts",
"test": "vitest",
"test": "vitest --run",
"test:coverage": "vitest --run --coverage",
"lint": "eslint . && prettier --check .",
"eslint": "eslint --fix .",
Expand All @@ -32,8 +32,8 @@
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged",
"pre-push": "npm run build",
"prepare-commit-msg": "npx --no -- commitlint --edit $1"
"pre-push": "npm run build && npm run test && npm run build:docs",
"commit-msg": "npx --no -- commitlint --edit $1"
},
"author": "Ceeblue B.V.",
"license": "AGPL-3.0-or-later",
Expand Down
2 changes: 1 addition & 1 deletion src/stats/PlayerStats.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('PlayerStats', () => {
stats.playbackRate = 1.5;
stats.audioByteRate = 60;
stats.videoByteRate = 1500;
stats.waitingData = true;
stats.buffering = true;
stats.stallCount = 3;
stats.videoTrackId = 1;
stats.videoTrackBandwidth = 1500;
Expand Down
6 changes: 3 additions & 3 deletions src/stats/PlayerStats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Loggable } from '../Log';
export class PlayerStats extends Loggable {
protocol?: string; // protocol: HLS, DASH, WRTS, HESP, SMOOTH
currentTime?: number; // current time in ms
waitingData?: boolean;
buffering?: boolean; // true on startup or when rebuffering after a stall

bufferAmount?: number; // buffer amount in ms
latency?: number; // latency in ms
Expand Down Expand Up @@ -104,8 +104,8 @@ export class PlayerStats extends Loggable {
if (proto != null) {
cmcd.sf = (sfByProtocol[proto as keyof typeof sfByProtocol] ?? 'o') as CML.CmcdStreamingFormat; // Streaming Format
}
if (this.waitingData != null) {
cmcd.su = this.waitingData; // Startup
if (this.buffering != null) {
cmcd.su = this.buffering; // Startup
}
return cmcd;
}
Expand Down
Loading