Пример #1
0
        static public MediaProtectionManager InitializeProtectionManager(ServiceRequestedEventHandler serviceRequestHandler)
        {
            var protectionManager = new MediaProtectionManager();

            //A setting to tell MF that we are using PlayReady.
            var props = new Windows.Foundation.Collections.PropertySet();

            props.Add("{F4637010-03C3-42CD-B932-B48ADF3A6A54}", "Windows.Media.Protection.PlayReady.PlayReadyWinRTTrustedInput");
            protectionManager.Properties.Add("Windows.Media.Protection.MediaProtectionSystemIdMapping", props);
            protectionManager.Properties.Add("Windows.Media.Protection.MediaProtectionSystemId", "{F4637010-03C3-42CD-B932-B48ADF3A6A54}");
            //Maps the conatiner guid from the manifest or media segment
            protectionManager.Properties.Add("Windows.Media.Protection.MediaProtectionContainerGuid", "{9A04F079-9840-4286-AB92-E65BE0885F95}");

            protectionManager.ServiceRequested    += new ServiceRequestedEventHandler(serviceRequestHandler);
            protectionManager.ComponentLoadFailed += new ComponentLoadFailedEventHandler(ComponentLoadFailed);

            // Windows 10 provides built in support for Dash and does not require additional configuration.
            // This would be be good place to configure a MediaExtensionManager to support another stream source
            // such as the Smooth Streaming SDK

            return(protectionManager);
        }
        static public MediaProtectionManager InitializeProtectionManager(ServiceRequestedEventHandler serviceRequestHandler)
        {

            var protectionManager = new MediaProtectionManager();

            //A setting to tell MF that we are using PlayReady.
            var props = new Windows.Foundation.Collections.PropertySet();
            props.Add("{F4637010-03C3-42CD-B932-B48ADF3A6A54}", "Windows.Media.Protection.PlayReady.PlayReadyWinRTTrustedInput");
            protectionManager.Properties.Add("Windows.Media.Protection.MediaProtectionSystemIdMapping", props);
            protectionManager.Properties.Add("Windows.Media.Protection.MediaProtectionSystemId", "{F4637010-03C3-42CD-B932-B48ADF3A6A54}");
            //Maps the conatiner guid from the manifest or media segment
            protectionManager.Properties.Add("Windows.Media.Protection.MediaProtectionContainerGuid", "{9A04F079-9840-4286-AB92-E65BE0885F95}");

            protectionManager.ServiceRequested += new ServiceRequestedEventHandler(serviceRequestHandler);
            protectionManager.ComponentLoadFailed += new ComponentLoadFailedEventHandler(ComponentLoadFailed);

            // Windows 10 provides built in support for Dash and does not require additional configuration. 
            // This would be be good place to configure a MediaExtensionManager to support another stream source 
            // such as the Smooth Streaming SDK

            return protectionManager;

        }