If the Audio and Video checkboxes are not both checked. The WebRTC ingestion feature currently requires both audio and video tracks to be sent.
Add Toast messages for when peer connection succeeds or fails.
Success
Failure
Enable verbose logging for Google WebRTC's library (as specified here): Logging.enableLogToDebugOutput(Logging.Severity.LS_INFO);
Print out available encoders and decoders on the device to the logs.
Bump the AWS SDK for Android dependencies to the latest. We need to do this in order to access the WebRTCStorage client.
Add User Agent to the Websocket handshake. Note: The user agent is not sent with every websocket message, only during initialization of the Websocket connection.
Add comments and Javadocs to various classes to hopefully make code more readable.
Add toString to Event - that way we can see its contents instead of seeing Event@123212.
Log the selected ice candidate pair - listen to the onSelectedCandidatePairChanged event.
Fix code formatting.
Warning
The WebRTC ingestion feature requires that the device have H.264 support. Google's WebRTC will throw ERROR_CONTENT. Emulators might not support H.264, so it is recommend to try this feature using a real android device.
Bug Fixes
Fix an issue where receiving Ice candidates without both sdpMid and sdpMLineIndex would cause a failure.
Fix an issue where receiving payload of null (e.g. {"messagePayload":"bnVsbA==","messageType":"ICE_CANDIDATE"}) would cause a failure.
Fix an issue with encoding strings and missing padding, which would sometimes cause the ice candidate connectivity checks to fail with the video producing device. We add the padding by removing the NO_PADDING flag from the encoding settings: new String(Base64.encode(payload.getBytes(), Base64.URL_SAFE | Base64.NO_WRAP).
Fix an issue where if there was an exception in the AsyncTask in StreamWebRtcConfigurationFragment, we would still transition to the WebRtcActivity anyway.
Avoid NullPointerException in various places. For example, when trying to read the Region from awsconfiguration.json, and also when parsing the message that does not contain the sdp property: jsonObject.get("sdp").getAsString();
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Description of changes:
Logging.enableLogToDebugOutput(Logging.Severity.LS_INFO);
Event@123212
.onSelectedCandidatePairChanged
event.Bug Fixes
sdpMid
andsdpMLineIndex
would cause a failure.{"messagePayload":"bnVsbA==","messageType":"ICE_CANDIDATE"}
) would cause a failure.video producing device
. We add the padding by removing the NO_PADDING flag from the encoding settings:new String(Base64.encode(payload.getBytes(), Base64.URL_SAFE | Base64.NO_WRAP)
.sdp
property:jsonObject.get("sdp").getAsString();
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.