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

--HG--
extra : rebase_source : 2a4bec49ef12898ef7aea7747ff7407577521916
This commit is contained in:
Alex Chronopoulos 2018-07-19 16:20:35 +02:00
parent 2f416390fe
commit 3c85ad38ce

View File

@ -2999,9 +2999,9 @@ public class GeckoSession extends LayerSession
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");