Skip to content

Commit f85f653

Browse files
author
Jason Lai
committed
Fix passing airPlayServiceMode option to startDiscovery().
Add warning about changing this mode after discovery is started.
1 parent 5ffbcd4 commit f85f653

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

www/ConnectSDK.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,10 @@ var DiscoveryManager = createClass(
474474
if (config.pairingLevel) {
475475
this._setPairingLevel(config.pairingLevel, false);
476476
}
477+
478+
if (config.airPlayServiceMode) {
479+
this._setAirPlayServiceMode(config.airPlayServiceMode, false);
480+
}
477481

478482
if (config.capabilityFilters) {
479483
this._setCapabilityFilters(config.capabilityFilters, false);
@@ -505,6 +509,9 @@ var DiscoveryManager = createClass(
505509
* Set mode for AirPlay support. If set to ConnectSDK.AirPlayServiceMode.WebApp, a web app will
506510
* will be mirrored to the TV. If set to ConnectSDK.AirPlayServiceMode.Media, only media
507511
* APIs will be available. On Android, media mode is the only option.
512+
*
513+
* NOTE: This setting must be configured before calling startDiscovery(), or passed in the options
514+
* parameter to startDiscovery(). The mode should not be changed once configured.
508515
*/
509516
setAirPlayServiceMode: function (mode) {
510517
this._setAirPlayServiceMode(mode, true);

0 commit comments

Comments
 (0)