大家好,我在亚马逊网络服务中使用 S3 服务,我执行以下代码从服务器获取我的数据视频:
S3GetObjectRequest *getObjectRequest = [[S3GetObjectRequest alloc] initWithKey:video1 withBucket:@"videoFolder"];
S3GetObjectResponse *getObjectResponse = [[AmazonClientManager s3] getObject:getObjectRequest];
然后我做:
NSString *urlString = [[NSString alloc] initWithData:getObjectResponse.body encoding:NSUTF8StringEncoding];
NSURL *url = [[NSURL alloc] initWithString:[urlString autorelease]];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:url];
player.view.frame = CGRectMake(184, 200, 400, 300);
[self.view addSubview:player.view];
[player play];
完成此操作后,我得到了一个黑屏,如果您有任何建议,请帮助我