Example #1
0
        void ProtectionManager_ServiceRequested(MediaProtectionManager sender, ServiceRequestedEventArgs srEvent)
        {
            _serviceCompletionNotifier = srEvent.Completion;
            IPlayReadyServiceRequest serviceRequest = (IPlayReadyServiceRequest)srEvent.Request;

            _requestChain = new RequestChain(serviceRequest);
            _requestChain.LicenseRequestUri = new Uri(LAURL);
            _requestChain.RequestConfigData = this.RequestConfigData;
            _requestChain.FinishAndReportResult(new ReportResultDelegate(HandleServiceRequest_Finished));
        }
        void ProtectionManager_ServiceRequested(MediaProtectionManager sender, ServiceRequestedEventArgs srEvent)
        {
            _serviceCompletionNotifier = srEvent.Completion;
            IPlayReadyServiceRequest serviceRequest = (IPlayReadyServiceRequest)srEvent.Request;

            _requestChain = new RequestChain(serviceRequest);
            _requestChain.LicenseRequestUri = new Uri(LAURL);
            _requestChain.RequestConfigData = this.RequestConfigData;
            _requestChain.FinishAndReportResult(new ReportResultDelegate(HandleServiceRequest_Finished));
        }
        protected bool PerformEnablingActionIfRequested(Exception ex)
        {
            bool bPerformed = false;

            if (IsEnablingActionRequested(ex))
            {
                IPlayReadyServiceRequest nextServiceRequest = _serviceRequest.NextServiceRequest();
                if (nextServiceRequest != null)
                {
                    _requestChain = new RequestChain(nextServiceRequest);
                    _requestChain.LicenseRequestUri = LicenseRequestUri;
                    _requestChain.RequestConfigData = _requestConfigData;
                    _requestChain.FinishAndReportResult(new ReportResultDelegate(RequestChain_Finished));

                    bPerformed = true;
                }
            }

            return(bPerformed);
        }
 protected bool PerformEnablingActionIfRequested(Exception ex)
 {
     bool bPerformed = false;
     
     if ( IsEnablingActionRequested(ex) ) 
     {
         IPlayReadyServiceRequest nextServiceRequest = _serviceRequest.NextServiceRequest();
         if( nextServiceRequest != null )
         {
             _requestChain = new RequestChain( nextServiceRequest);
             _requestChain.LicenseRequestUri = LicenseRequestUri;
             _requestChain.RequestConfigData = _requestConfigData;
             _requestChain.FinishAndReportResult( new ReportResultDelegate(RequestChain_Finished));
             
             bPerformed = true;
         }
     }
     
     return bPerformed;
 }