eface2face / rtcninja.js

WebRTC library to make media management easier across different browsers.
MIT License
73 stars 23 forks source link

Implementation proposal for supporting navigator.mediaDevices #27

Closed mwittig closed 8 years ago

mwittig commented 8 years ago

…following discussion on issue #24

ibc commented 8 years ago

Thanks, but we prefer to refactor the whole code to make rtcninja 2.0 much better and modern (Promise based API, implement latest W3C spec, etc).

Also, your PR uses spaces for indentation instead of TAB (in some places) and it just makes the lib crash if the underlying platform has no mediaDevices:

// Expose mediaDevices.
Adapter.mediaDevices = mediaDevices || throwNonSupported('mediaDevices');
mwittig commented 8 years ago

@ibc I just tried to follow the styles as implemented fir MediaStreamTrack, for example. NB, mediaDevice is an object, not a function like getDevices.

// Expose MediaStreamTrack.
    Adapter.MediaStreamTrack = MediaStreamTrack || throwNonSupported('MediaStreamTrack');
ibc commented 8 years ago

mediaDevice is an object, not a function like getDevices.

I know. But the important think is the stuff it contains, and that is what rtcninja must provide or shim if not present in the browser.