daily-co / daily-js

https://docs.daily.co/reference/daily-js
BSD 2-Clause "Simplified" License
103 stars 33 forks source link

Mismatching types on DailyCallOptions audioSource and videoSource #158

Closed angeloanan closed 11 months ago

angeloanan commented 3 years ago

Expected behavior

The documentation states that the audioSource and videoSource can be a boolean or a MediaStreamTrack object. It is expected to be able to set the the properties as a boolean.

Describe the bug (unexpected behavior)

The type definition of DailyCallOptions does not allow audioSource or videoSource to be a boolean.

Weirdly, the type definition allows the said properties to be a string (string | MediaStreamTrack).

Regaddi commented 11 months ago

This has been fixed in https://github.com/daily-co/daily-js/commit/7c29513f2ef5b1fd069f23ef700c42871fcc5a72