Xamarin AWS GetMedia返回未知错误

时间:2018-06-12 09:30:07

标签: amazon-web-services xamarin amazon-kinesis

我正在Xamarin开发一个Xamarin视频消费者应用程序,我收到以下错误:

Amazon.KinesisVideoMedia.AmazonKinesisVideoMediaException:该服务返回错误。请参阅内部异常了解详细信---> Amazon.Runtime.Internal.HttpErrorResponseException:类型异常' Amazon.Runtime.Internal.HttpErrorResponseException'被扔了。

异常中的错误代码为null。我的屏幕快照包含详细错误。

代码:

async Task TaskeGetMedia()
        {
            var cancelToken = new CancellationToken();
            var config = new  AmazonKinesisVideoMediaConfig();
            Console.WriteLine(config.ToString());
            AmazonKinesisVideoMediaClient client = new AmazonKinesisVideoMediaClient("AKIAI33DOGUTJP4VOOBQ", "ZLMkUv/j6PGJCtqxIJW4/d4tI24AFA1iV0l22Wn5", "https://541221181757.signin.aws.amazon.com/console");
            GetMediaRequest Myrequest = new GetMediaRequest();
            Myrequest.StreamARN = "arn:aws:kinesisvideo:us-west-2:541321181757:stream/demo/1528677884275";
            Myrequest.StreamName = "demo";
            Myrequest.StartSelector = new StartSelector();
            Myrequest.StartSelector.StartSelectorType = StartSelectorType.EARLIEST;
            while (true)
            {
                try
                {
                var request = await client.GetMediaAsync(Myrequest, cancelToken);
                Console.WriteLine(request);
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Something is thrown ! " + ex.ToString());
                    break;
                }
            }

        }

enter image description here

0 个答案:

没有答案