Skip to content

Commit

Permalink
add Abnormal M3U8 segment size alert for live stream health beacons
Browse files Browse the repository at this point in the history
  • Loading branch information
amirch1 committed Sep 22, 2021
1 parent 1edb730 commit 44eefd8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export enum DiagnosticsErrorCodes {
ResolutionLimitedByCPU = 120,
BandwidthBackToNormal = 121,
CPUBackToNormal = 122,
M3U8ChunkWithInvalidDurationAlert = 123,
}

export enum AlertSeverity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { AlertSeverity, DiagnosticsErrorCodes } from '../live-stream-health.type
})
export class CodeToSeverityPipe implements PipeTransform {
transform(code: number): number {

switch (code) {
case DiagnosticsErrorCodes.BitrateUnmatched:
case DiagnosticsErrorCodes.EntryStopped:
Expand All @@ -17,13 +17,13 @@ export class CodeToSeverityPipe implements PipeTransform {
case DiagnosticsErrorCodes.BandwidthBackToNormal:
case DiagnosticsErrorCodes.CPUBackToNormal:
return AlertSeverity.info;

case DiagnosticsErrorCodes.EntryRestarted:
case DiagnosticsErrorCodes.BackupOnlyStreamRecording:
case DiagnosticsErrorCodes.ResolutionLimitedByBandwidth:
case DiagnosticsErrorCodes.ResolutionLimitedByCPU:
return AlertSeverity.warning;

case DiagnosticsErrorCodes.NoAudioSignal:
case DiagnosticsErrorCodes.NoVideoSignal:
case DiagnosticsErrorCodes.PtsDrift:
Expand All @@ -34,8 +34,9 @@ export class CodeToSeverityPipe implements PipeTransform {
case DiagnosticsErrorCodes.AuthenticationNoLivePermission:
case DiagnosticsErrorCodes.AuthenticationTooManyStreams:
case DiagnosticsErrorCodes.AuthenticationTooManyTranscodedStreams:
case DiagnosticsErrorCodes.M3U8ChunkWithInvalidDurationAlert:
return AlertSeverity.critical;

default:
return AlertSeverity.info;
}
Expand Down
5 changes: 5 additions & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,11 @@
},
"122": {
"message-log": "CPU back to normal"
},
"123": {
"message-log": "Abnormal M3U8 segment size",
"self-serve-message-log": "Abnormal M3U8 segment size",
"message-text-box": "Segment reported in m3u8 is with irregular duration"
}
},
"exportLabels": {
Expand Down

0 comments on commit 44eefd8

Please sign in to comment.