Skip to content

Commit e2e1a34

Browse files
committed
Merge remote-tracking branch 'origin' into smp-imscjs-1.0.11
2 parents c7e2db3 + 04a6dd1 commit e2e1a34

File tree

93 files changed

+8565
-7217
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+8565
-7217
lines changed

.eslintignore

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
# unsupported
2-
*.html
3-
*.md
4-
*.sh
5-
*.yaml
1+
# Exclude everything
2+
*
63

7-
# deps
8-
node_modules/
9-
10-
# build
11-
docs/
12-
dist/
13-
dist-local/
14-
15-
# configs
16-
.nvmrc
17-
*.config.*
18-
rollup.*.js
19-
.*ignore
4+
# Re-include supported file formats and locations
5+
!./*.js
6+
!./*.cjs
7+
!./*.mjs
8+
!./*.ts
9+
!./*.cts
10+
!./*.mts
11+
!src/**/*.js
12+
!src/**/*.cjs
13+
!src/**/*.mjs
14+
!src/**/*.ts
15+
!src/**/*.cts
16+
!src/**/*.mts

.eslintrc.yaml

Lines changed: 0 additions & 167 deletions
This file was deleted.

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
node_modules/
33

44
# build
5-
docs/
65
dist/
76
dist-local/
7+
docs/api/

.prettierrc.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
semi: false
22
tabWidth: 2
3+
endOfLine: lf
34
printWidth: 120
45
singleQuote: false
5-
trailingComma: "es5"
6+
trailingComma: es5
67
bracketSameLine: true
7-
endOfLine: "lf"
8+
quoteProps: consistent
89
overrides:
910
- files:
1011
- "*.html"

babel.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"presets": [["@babel/preset-env"]]
2+
"presets": [["@babel/preset-env"], ["@babel/preset-typescript"]]
33
}

docs/tutorials/02-settings-and-overrides.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type failoverResetTime = number is FiniteNumber
3939
Provide a sorting algorithm to reorder the available media sources after a failover.
4040
4141
```ts
42-
type failoverSort = (...sources: [...string]) => [...string]
42+
type failoverSort = (sources: string[]) => string[]
4343
```
4444
4545
### `streaming.seekDurationPadding`

docs/tutorials/Debugging.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1-
During development, `bigscreen-player` offers a form of debugging with an on-screen debugger. Using this tool, specific events can be monitored to check successful execution of the program logic. This is particularly useful where no native JS consoles are accessible on certain devices.
1+
BigscreenPlayer offers logging through "Chronicle", our own debugging solution. This tool can be used to monitor specific events and changes in metrics over time in order to validate execution of the program logic.
2+
3+
## On-Screen Debugging
4+
5+
We offer an on-screen debugger as part of our solution. This is particularly useful where no native JavaScript consoles are natively accessible on devices.
26

37
The on-screen debugger can be shown using:
4-
```
8+
9+
```js
510
bigscreenPlayer.toggleDebug()
611
```
712

8-
### The Chronicle
9-
The debug-tool latches on top of the `chronicle` which acts similarly to the plugin interface. It has a reference to all of the callbacks that need to be updated upon a debug event occurring.
13+
## Structured Logging
14+
15+
Logs in the Chronicle are _structured_. What is more, logs are captured even when the on-screen debugger isn't active. You can access the complete record of the playback session using:
16+
17+
```js
18+
bigscreenPlayer.getDebugLogs()
19+
```
20+
21+
You can find the full structure of the data returned by this function in the source file `chronicle.ts`. In short, `getDebugLogs` returns the Chronicle record as a flat array of entries. Each entry falls into one of three (3) categories:
1022

11-
This could allow for a possible extension of the debugging interface *if* needed.
23+
1. Message: Unstructured string data. Think `console` output.
24+
2. Metrics: Values that change over time, such as dropped frames.
25+
3. Traces: Snapshots and one-of data, such as errors and events.

docs/tutorials/tutorials.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"cdn-failover": {
1212
"title": "CDN Failover"
1313
},
14+
"debugging": {
15+
"title": "Debugging"
16+
},
1417
"live-streaming": {
1518
"title": "Live"
1619
}

eslint.compat.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { FlatCompat } from "@eslint/eslintrc"
2+
import js from "@eslint/js"
3+
import path from "node:path"
4+
import { fileURLToPath } from "node:url"
5+
6+
// Mimick CommonJS variables
7+
const __filename = fileURLToPath(import.meta.url)
8+
const __dirname = path.dirname(__filename)
9+
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
resolvePluginsRelativeTo: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all,
15+
})
16+
17+
export const sonarjs = {
18+
configs: { recommended: compat.extends("plugin:sonarjs/recommended") },
19+
}

0 commit comments

Comments
 (0)