Skip to content
Open
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
30 changes: 30 additions & 0 deletions tools/wave/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<script src="lib/wave-service.js"></script>
<script src="lib/davidshimjs/qrcode.js"></script>
<script src="lib/hbbtv.js"></script>
<script src="lib/ui.js"></script>
</head>

<body>
Expand All @@ -31,6 +32,7 @@ <h1 class="title is-spaced">
</div>

<div class="container" style="margin-top: 2em;">
<p id="mse-warning" style="max-width: 49em; margin-bottom: 1rem;"></p>
<h2 class="title is-5">
New test session
</h2>
Expand Down Expand Up @@ -157,6 +159,19 @@ <h2 class="title is-5">
addClass(tabbables[selectedTabbable], "focused");
}

function createErrorMessage(message) {
return {
element: "article",
className: "message is-warning",
children: [
{
className: "message-body",
text: message,
},
],
};
}

function focusNext() {
skipFocus(1);
}
Expand Down Expand Up @@ -236,6 +251,21 @@ <h2 class="title is-5">
expiaryDateElement.innerText = config.expirationDate.toLocaleString();
});

var mseWarningElement = UI.getElement("mse-warning");
if (!mseWarningElement) return;
mseWarningElement.innerHTML = "";

if (!('MediaSource' in window) && !('MediaKeys' in window)) {
var error = createErrorMessage('Warning: MSE and EME APIs are not supported');
mseWarningElement.appendChild(UI.createElement(error));
} else if (!('MediaSource' in window)) {
var error = createErrorMessage('Warning: MSE API is not supported');
mseWarningElement.appendChild(UI.createElement(error));
} else if (!('MediaKeys' in window)) {
var error = createErrorMessage('Warning: EME API is not supported');
mseWarningElement.appendChild(UI.createElement(error));
}

var configurationUrl =
location.origin +
WEB_ROOT +
Expand Down