DLNA投屏失败时添加标签

在使用DLNA_UPnP 进行iOS投屏时发现失败
失败信息是

501Current state of service prevents invoking that action. Action method invocation failed: java.lang.reflect.UndeclaredThrowableException
  • 解决办法是要加一个DIDL-Lite标签
#define VideoDIDL @"VideoAnonymousobject.item.videoItem%@"



- (void)setAVTransportURL:(NSString *)urlStr{
    CLUPnPAction *action = [[CLUPnPAction alloc] initWithAction:@"SetAVTransportURI"];
    [action setArgumentValue:@"0" forName:@"InstanceID"];
    [action setArgumentValue:urlStr forName:@"CurrentURI"];
    [action setArgumentValue:VideoDIDL forName:@"CurrentURIMetaData"];
    [self postRequestWith:action];
}

你可能感兴趣的:(DLNA投屏失败时添加标签)