Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

设置播放资源时,报错501!!! 求解! #11

Open
syg1128 opened this issue May 15, 2018 · 2 comments
Open

设置播放资源时,报错501!!! 求解! #11

syg1128 opened this issue May 15, 2018 · 2 comments

Comments

@syg1128
Copy link

syg1128 commented May 15, 2018

设置播放资源时,报错501!!! 求解!

@yunzhongguyan
Copy link

需要修改两个点
1.CLUPnPAction里面修改

  • (instancetype)initWithAction:(NSString *)action{
    self = [super init];
    if (self) {
    _action = action;
    _serviceType = CLUPnPServiceAVTransport;
    NSString *name = [NSString stringWithFormat:@"u:%@", _action];
    self.XMLElement = [MGDataXMLElement elementWithName:name];
    [self.XMLElement addChild:[MGDataXMLElement attributeWithName:@"xmlns:u" stringValue:
    [self getServiceType]]];
    }
    return self;
    }
    2.某些机型需要适配完整的 metaData
    NSString metaData = [NSString stringWithFormat:@"<DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/""
    " xmlns:dc="http://purl.org/dc/elements/1.1/""
    " xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/""
    " xmlns:sec="http://www.sec.co.kr/"><item id="0" parentID="0" restricted="0">dc:title%@</dc:title>upnp:classobject.item.videoItem</upnp:class><res protocolInfo="http-get:
    :video/mp4:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000000000000000000000000">%@upnp:classobject.item.videoItem</upnp:class>", videoName, urlStr];
    [action setArgumentValue:metaData forName:@"CurrentURIMetaData"];

@syg1128
Copy link
Author

syg1128 commented Jul 24, 2018

请问metadata数据怎么获取?能说下吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants