Chromecast receiver application cannot play widevine drm protected content from Android sender application

I figured out that in my Receiver app event.data.customData was undefined while connecting from android sender application.

So I used event.data.media.customData

And accessed the key as follow:

if(event.data.media.customData['licenseUrl'] !== null){
                    console.log('setting license URL from mobile');
                    host.licenseUrl = event.data.media.customData.licenseUrl;
                }

That was it! :)