| Index: webrtc/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m
|
| diff --git a/webrtc/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m b/webrtc/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m
|
| index b5655e0e8224d129672d4886616896acd37d7b74..a6059f77a8a850d4613793e3ab95a2d8ba277d4c 100644
|
| --- a/webrtc/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m
|
| +++ b/webrtc/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m
|
| @@ -17,15 +17,17 @@ static NSString const *kRTCSessionDescriptionSdpKey = @"sdp";
|
|
|
| + (RTCSessionDescription *)descriptionFromJSONDictionary:
|
| (NSDictionary *)dictionary {
|
| - NSString *type = dictionary[kRTCSessionDescriptionTypeKey];
|
| + NSString *typeString = dictionary[kRTCSessionDescriptionTypeKey];
|
| + RTCSdpType type = [[self class] typeForString:typeString];
|
| NSString *sdp = dictionary[kRTCSessionDescriptionSdpKey];
|
| return [[RTCSessionDescription alloc] initWithType:type sdp:sdp];
|
| }
|
|
|
| - (NSData *)JSONData {
|
| + NSString *type = [[self class] stringForType:self.type];
|
| NSDictionary *json = @{
|
| - kRTCSessionDescriptionTypeKey : self.type,
|
| - kRTCSessionDescriptionSdpKey : self.description
|
| + kRTCSessionDescriptionTypeKey : type,
|
| + kRTCSessionDescriptionSdpKey : self.sdp
|
| };
|
| return [NSJSONSerialization dataWithJSONObject:json options:0 error:nil];
|
| }
|
|
|