PolymerElements / app-media

Elements for accessing data from media input devices and visualizing that data for users
61 stars 12 forks source link

video-constraints='{"facingMode":"environment"}' no longer works #23

Closed FluorescentHallucinogen closed 7 years ago

FluorescentHallucinogen commented 7 years ago

I've updated app-media to the latest version and video-constraints='{"facingMode":"environment"}' no longer works.

FluorescentHallucinogen commented 7 years ago

This is my code:

<app-media-devices
  kind="videoinput"
  selected-device="{{videoDevice}}">
</app-media-devices>

<app-media-stream
  video-device="[[videoDevice]]"
  video-constraints='{"facingMode":"environment"}'
  stream="{{stream}}"
  active>
</app-media-stream>
FluorescentHallucinogen commented 7 years ago

If I remove video-device="[[videoDevice]]" from <app-media-stream>, all is ok.

cdata commented 7 years ago

Yes, if you specify a device, the device will be given precedence. The device is intended to be a shortcut that adds an exact field to the video constraints referring to the deviceId.

FluorescentHallucinogen commented 7 years ago

One question: why the code above worked in previous versions? :thinking:

FluorescentHallucinogen commented 7 years ago

For some reason, video-constraints='{"facingMode":"environment"}' no longer works again starting Chrome for Android 61 (Dev and Canary). All is ok on Chrome for Android 60 and 59 (Beta and Stable).

Here is the code that I use:

<app-media-stream
  video-constraints='{"facingMode":"environment"}'
  stream="{{stream}}"
  active>
</app-media-stream>
FluorescentHallucinogen commented 7 years ago

The problem is in https://github.com/webrtc/adapter.

FluorescentHallucinogen commented 7 years ago

See https://github.com/webrtc/adapter/issues/594.