added parameter in the appsettings for audio play

This commit is contained in:
ruoccofabrizio 2021-04-21 18:51:49 +02:00
Родитель 8b8008e49e
Коммит 0ca6d626da
3 изменённых файлов: 15 добавлений и 5 удалений

Просмотреть файл

@ -432,7 +432,7 @@ namespace CognitiveSearch.UI
int storageIndex;
string tokenToUse = GetToken(decodedPath, out storageIndex);
if (AudioContainer != null) {
if (AudioContainer != "") {
Uri blobUri = new Uri(decodedPath);
string audioPath = AudioContainer + "/" + String.Join("", blobUri.Segments[2..]);
audioPath = blobUri.Scheme + "://" + blobUri.Host + "/" + audioPath.Replace(".json", "");

Просмотреть файл

@ -35,5 +35,10 @@
"Customizable": "true",
"OrganizationName": "Microsoft",
"OrganizationLogo": "~/images/logo.png",
"OrganizationWebSiteUrl": "https://www.microsoft.com"
"OrganizationWebSiteUrl": "https://www.microsoft.com",
// Define the Audio container to enable audio streaming in the application.
// Please also add the container in the StorageContainerAddressX property
// Leave it blank if you do not have audio files
"AudioContainer": ""
}

Просмотреть файл

@ -39,12 +39,17 @@ function getTimelineHtml(data) {
</div>
<div id="${messages[i].Id}" class="desc">
${messageText}
${messageText}`;
if (audioPath !== undefined) {
item += `
<audio controls preload="none">
<source type="audio/wav" src="${audioPath}#t=${starTime},${endTime}">
</audio>
</audio>`;
}
item +=`
</div>`;
result += item;