Closed sdroege closed 7 years ago
@Rugvip : can you review this please?
The SDK is meant to be used with traditional SDP signalling, so removing all of that code doesn't make sense. We could add the JSON generating/parsing code as separate methods though. The current to/fromJson and to/fromSdpAttribute should stay, but we can add the new code in something like to/fromOwrJson.
So basically keeping the old code as is, and calling new functions that implement what I did here now from the demos?
Is anybody else using the JSON message format of the demos? Should it be called from/toOwrJson() or from/toWhatEverNameThisThingHasJson()?
Yes.
Only the demos use it, and afaik it's not standardised in any way, I think @pererikb and @adam-be came up with the format. Then again, we could probably find a better name than OwrJson.
Ok, I'll name them "Owr" then and move to their own functions. Why is any of this in the SDK at all if it's a custom format though?
Also this basically means duplicating all of the fromJsep/toJsep functions as the outer part of the JSON message is still the same and only the inner part changes.
What the iOS SDK is currently doing is to always add/parse all variants and prefer the OWR specific format. As such, creating huge messages as both variants are going to be in there.
This all seems like it needs a major rework to become consistent, especially between different platforms.
How should we proceed here? For the upcoming release just the same as on iOS? Fixing it properly on iOS and Android by either 1) only have the standardized stuff in the SDK and everything else in the application (which parts are exactly standardized), or 2) have different functions for both variants in the SDK?
Imo we should just stick with JSEP, not sure what the benefit of our own format is. Should probably not take that discussion here though.
I discussed with @superdump and we decided to just do the same as iOS does.
This should do it now, please review again. Just one comment about NativeCall in the other pull request that should be considered first (writing that one next)
:+1:
You have to merge it then, I don't have access to this specific repository :)
All applications are producing these now and nothing else works anymore.