pili_sdk_csharp.pili.API.hlsLiveUrl C# (CSharp) Méthode

hlsLiveUrl() public static méthode

public static hlsLiveUrl ( Stream stream ) : string>.IDictionary
stream Stream
Résultat string>.IDictionary
        public static IDictionary<string, string> hlsLiveUrl(Stream stream)
        {
            const string defaultScheme = "http";
            string url = string.Format("{0}://{1}/{2}/{3}", defaultScheme, stream.LiveHttpHost, stream.HubName, stream.Title);
            IDictionary<string, string> dictionary = new Dictionary<string, string>();
            dictionary[Stream.ORIGIN] = url + ".m3u8";
            string[] profiles = stream.Profiles;
            if (profiles != null)
            {
                foreach (string p in profiles)
                {
                    dictionary[p] = url + '@' + p + ".m3u8";
                }
            }
            return dictionary;
        }

Usage Example

Exemple #1
0
 public virtual IDictionary <string, string> hlsLiveUrls()
 {
     return(API.hlsLiveUrl(this));
 }