// Copyright (c) Arlo Godfrey. All Rights Reserved.
// Licensed under the GNU Lesser General Public License, Version 3.0 with additional terms.
// See the LICENSE, LICENSE.LESSER and LICENSE.ADDITIONAL files in the project root for more information.
using System;
using System.IO;
using StrixMusic.Sdk.CoreModels;
namespace StrixMusic.Sdk.MediaPlayback
{
///
/// Defines configuration for a single PlayReady-enabled playback source.
///
public class PlayReadyMediaSourceConfig : IMediaSourceConfig
{
///
/// Constructs a new
///
/// The track that this media source is playing
///
///
///
/// The expiration date for the PlayReady uris.
public PlayReadyMediaSourceConfig(ICoreTrack track, string id, Uri licenseAcquisitionUri, Uri mediaSourceUri, DateTime expirationDate)
{
Track = track;
Id = id;
MediaSourceUri = mediaSourceUri;
ExpirationDate = expirationDate;
LicenseAcquisitionUri = licenseAcquisitionUri;
}
///
/// Constructs a new
///
/// The track that this media source is playing
///
///
/// The content type for the .
/// URL of the License Server
public PlayReadyMediaSourceConfig(ICoreTrack track, string id, Stream fileStream, string contentType, Uri licenseAcquisitionUri)
{
Track = track;
Id = id;
FileStreamSource = fileStream;
FileStreamContentType = contentType;
LicenseAcquisitionUri = licenseAcquisitionUri;
}
///
public ICoreTrack Track { get; }
///
public string Id { get; }
///
public Uri? MediaSourceUri { get; }
///
public DateTime? ExpirationDate { get; }
///
public Stream? FileStreamSource { get; }
///
public string? FileStreamContentType { get; }
///
/// The URI used to acquire the PlayReady license.
///
public Uri LicenseAcquisitionUri { get; }
}
}