HLS を使用したライブ ラジオ ストリームがあり、曲の再生中にトラック/アーティスト情報を表示したいと考えています。
API ドキュメントと質問ストリームから理解できる限り、hasOutOfBandMetadata が true に設定されている場合、HLS に対してhasOutOfBandMetadata と getStreamingMetadataを呼び出す必要があります。
返される MIME タイプは「application/vnd.apple.mpegurl」です。
getMetaData はチャネルのリストを返します。ここで、次のようなもので各チャネルを構築します
return new mediaMetadata
{
id = string.Format("{0}:{1}", Prefix, (string)channel["id"]),
title = (string)channel["title"],
itemType = itemType.stream,
mimeType = "application/vnd.apple.mpegurl",
onDemand = false,
liveNow = true,
Item = new streamMetadata
{
currentShow = "Test title",
currentHost = "Someone"
}
};
getMediaMetadata が返されます
return new getMediaMetadataResponse
{
getMediaMetadataResult = new getMediaMetadataResponseGetMediaMetadataResult
{
Items = new object[] {
new streamMetadata
{
title = (string)mediaElement["title"],
hasOutOfBandMetadata = true,
currentShow = "Test",
currentShowId = "MKDF24444",
description = "this is the description",
hasOutOfBandMetadataSpecified = true
}
},
ItemsElementName = new[] { ItemsChoiceType.streamMetadata }
}
};
この構成では、getStreamingMetadata への呼び出しが表示されません。
ありがとう