Skip to content

Commit 27c0dee

Browse files
authored
Add notification pane in reference UI (Dash-Industry-Forum#4977)
1 parent 0f4d94e commit 27c0dee

9 files changed

Lines changed: 456 additions & 146 deletions

File tree

contrib/controlbar/controlbar.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@
301301
padding: 0.35rem 0.75rem;
302302
font-size: 0.7rem;
303303
font-weight: 600;
304-
color: var(--cb-accent);
304+
color: rgba(255, 255, 255, 0.5);
305305
text-transform: uppercase;
306306
letter-spacing: 0.03em;
307307
}

samples/dash-if-reference-player/app/css/main.css

Lines changed: 126 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -769,22 +769,130 @@ body {
769769
height: 100% !important;
770770
}
771771

772-
/* ---- Conformance Panel ---- */
773-
.conformance-panel {
774-
margin-top: 1rem;
772+
/* ---- Notification Panel ---- */
773+
.notification-panel {
774+
margin-top: 0.75rem;
775+
background: var(--rp-bg-secondary);
776+
border-radius: 8px;
777+
border: 1px solid var(--rp-border);
778+
overflow: hidden;
779+
}
780+
781+
.notification-header {
782+
padding: 0.5rem 0.75rem;
783+
border-bottom: 1px solid var(--rp-border);
784+
}
785+
786+
.notification-header h6 {
787+
margin: 0;
788+
font-size: 0.85rem;
789+
color: var(--rp-text);
790+
}
791+
792+
.notification-header-row {
793+
display: flex;
794+
justify-content: space-between;
795+
align-items: center;
796+
}
797+
798+
.notification-header-row + .notification-header-row {
799+
margin-top: 0.4rem;
800+
}
801+
802+
.notification-filters {
803+
display: flex;
804+
gap: 0.25rem;
805+
}
806+
807+
.notification-filter-btn {
808+
font-size: 0.65rem;
809+
padding: 1px 8px;
810+
border-radius: 10px;
811+
font-weight: 600;
812+
text-transform: uppercase;
813+
border: 1px solid var(--rp-border);
814+
color: var(--rp-text-muted);
815+
background: transparent;
816+
opacity: 0.5;
817+
transition: all 0.15s;
818+
cursor: pointer;
819+
}
820+
821+
.notification-filter-btn:hover {
822+
opacity: 0.8;
823+
}
824+
825+
.notification-filter-btn.active[data-filter="error"] {
826+
background: rgba(220, 53, 69, 0.2);
827+
color: var(--rp-danger);
828+
border-color: var(--rp-danger);
829+
opacity: 1;
830+
}
831+
832+
.notification-filter-btn.active[data-filter="warning"] {
833+
background: rgba(255, 193, 7, 0.2);
834+
color: var(--rp-warning);
835+
border-color: var(--rp-warning);
836+
opacity: 1;
837+
}
838+
839+
.notification-filter-btn.active[data-filter="suggestion"] {
840+
background: rgba(13, 202, 240, 0.2);
841+
color: var(--rp-info);
842+
border-color: var(--rp-info);
843+
opacity: 1;
844+
}
845+
846+
.notification-search {
847+
max-width: 180px;
848+
font-size: 0.75rem !important;
849+
padding: 2px 8px !important;
850+
background: var(--rp-bg-primary);
851+
border-color: var(--rp-border);
852+
color: var(--rp-text);
853+
}
854+
855+
.notification-search:focus {
856+
border-color: var(--rp-accent);
857+
box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
858+
}
859+
860+
.notification-list {
861+
max-height: 200px;
862+
overflow-y: auto;
863+
}
864+
865+
.notification-empty {
866+
padding: 1rem 0.75rem;
867+
text-align: center;
868+
font-size: 0.78rem;
869+
color: var(--rp-text-muted);
775870
}
776871

777-
.conformance-item {
872+
.notification-item {
778873
display: flex;
779874
align-items: flex-start;
780875
gap: 0.5rem;
781-
padding: 0.4rem 0.75rem;
782-
font-size: 0.8rem;
876+
padding: 0.35rem 0.75rem;
877+
font-size: 0.78rem;
783878
border-bottom: 1px solid var(--rp-separator);
784879
}
785880

786-
.conformance-badge {
787-
font-size: 0.65rem;
881+
.notification-item:last-child {
882+
border-bottom: none;
883+
}
884+
885+
.notification-timestamp {
886+
font-family: monospace;
887+
font-size: 0.7rem;
888+
color: var(--rp-text-muted);
889+
white-space: nowrap;
890+
flex-shrink: 0;
891+
padding-top: 1px;
892+
}
893+
894+
.notification-badge {
895+
font-size: 0.6rem;
788896
font-weight: 600;
789897
padding: 2px 6px;
790898
border-radius: 3px;
@@ -793,26 +901,24 @@ body {
793901
flex-shrink: 0;
794902
}
795903

796-
.conformance-badge.badge-warning {
797-
background: rgba(255, 193, 7, 0.2);
798-
color: var(--rp-warning);
799-
}
800-
801-
.conformance-badge.badge-error {
904+
.notification-badge.badge-error {
802905
background: rgba(220, 53, 69, 0.2);
803906
color: var(--rp-danger);
804907
}
805908

806-
.conformance-badge.badge-suggestion {
909+
.notification-badge.badge-warning {
910+
background: rgba(255, 193, 7, 0.2);
911+
color: var(--rp-warning);
912+
}
913+
914+
.notification-badge.badge-suggestion {
807915
background: rgba(13, 202, 240, 0.2);
808916
color: var(--rp-info);
809917
}
810918

811-
/* ---- Error Modal ---- */
812-
.error-modal .modal-header {
813-
background: var(--rp-danger);
814-
color: #fff;
815-
border-bottom: none;
919+
.notification-message {
920+
word-break: break-word;
921+
min-width: 0;
816922
}
817923

818924
/* ---- Footer ---- */

samples/dash-if-reference-player/app/data/dashjs_config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"debug": {
3-
"logLevel": 5
3+
"logLevel": 5,
4+
"dispatchEvent": true
45
},
56
"streaming": {
67
"buffer": {

samples/dash-if-reference-player/app/js/ConformancePanel.js

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

samples/dash-if-reference-player/app/js/DrmController.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,15 @@ export class DrmController {
187187
}
188188
this._extractHeaders(ck.httpRequestHeaders, this._ckHeaders, 'drm-ck-headers');
189189
}
190+
191+
// Enable DRM prioritization checkbox if any system has a priority set
192+
const hasPriority = [pr, wv, fp].some(d => d && d.priority !== undefined && d.priority !== null);
193+
if (hasPriority) {
194+
const prioritize = $('#drm-prioritize');
195+
if (prioritize) {
196+
prioritize.checked = true;
197+
}
198+
}
190199
}
191200

192201
/**

0 commit comments

Comments
 (0)