You can use Advance Options on your local Stream to get notified on various events affecting your Streaming process.

Method: Enx.setAdvancedOptions(AdvanceOptions) – To set advance options

Parameter:

  • AdvanceOptions – Array of Options that you can set on your Local Stream:
    • battery_updates – Boolean. Set as true to receive battery updates/information
    • notify_video_resolution_change – Boolean. Set as true to receive Video Resolution Change Information

Callback: advancedOptionsUpdate – To notify advance options on local stream has been updated

advanceOptions: {
	battery_updates: true,
	notify_video_resolution_change: true
} 

Enx.setAdvancedOptions(advanceOptions)

// Advance Options are updated
advancedOptionsUpdate: event => {
	/* event = 
	[ 
		{	"id":"battery_updates",
			"enable":true
		}, 
		{	"id":"notify-video-resolution-change",
			"enable":true
		} 
	]  */
}

Method: Enx.getAdvancedOptions() – To get advance options

Enx.getAdvancedOptions()

// Advance Options are updated
getAdvancedOptions: event => {
	/* event = 
	[ 
		{	"id":"battery_updates",
			"enable":true
		}, 
		{	"id":"notify-video-resolution-change",
			"enable":true
		} 
	]  */
}