Bug 1152401 - Expect the new MediaDevice types in GeckoView. r?jchen
This patchset changes the MediaDevice type names from "audio" and "video" to "audioinput" and "videoinput". GeckoSession has been updated to expect the new string names. In parallel a new type "audiooutput" has been added but it is not important for this patch.
MozReview-Commit-ID: FUdG5QtD9re
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
@@ -2864,19 +2864,19 @@ public class GeckoSession extends LayerS
return SOURCE_OTHER;
} else {
throw new IllegalArgumentException("String: " + src + " is not a valid media source string");
}
}
private static @Type int getTypeFromString(String type) {
// The strings here should match the possible types in MediaDevice::MediaDevice in MediaManager.cpp
- if ("video".equals(type)) {
+ if ("videoinput".equals(type)) {
return TYPE_VIDEO;
- } else if ("audio".equals(type)) {
+ } else if ("audioinput".equals(type)) {
return TYPE_AUDIO;
} else {
throw new IllegalArgumentException("String: " + type + " is not a valid media type string");
}
}
/* package */ MediaSource(GeckoBundle media) {
id = media.getString("id");