title: Chromecast receiver application cannot play widevine drm protected content from Android sender application
body: <p>I'm using receiver application from Expressplay's site for chromecast. <strong><a href="https://www.expressplay.com/developer/test-apps/#ccplayer" rel="nofollow noreferrer">https://www.expressplay.com/developer/test-apps/#ccplayer</a></strong>.</p>
  
  <p>I've tested it from the browser by passing <strong>license URL</strong> along with the <strong>widevine stream path</strong>. It played the video, means that the receiver is working fine.</p>
  
  <p>The problem appears when I try to play content from an android sender application. I'm passing the <strong>license URL</strong> in a <strong>json</strong> object. </p>
  
  <p>My android sender code is as follows.</p>
  
  <pre><code>private MediaInfo buildMediaInfo() {
      MediaMetadata movieMetadata = new MediaMetadata(MediaMetadata.MEDIA_TYPE_MOVIE);
      movieMetadata.putString(MediaMetadata.KEY_SUBTITLE, "Subtitle");
      movieMetadata.putString(MediaMetadata.KEY_TITLE, "Title");
      jsonObj = new JSONObject();
      try{
         jsonObj.put("licenseUrl","https://wv.test.expressplay.com/hms/wv/rights/?ExpressPlatToken=****");
      }catch (JSONException e){
          Log.e(null,"Failed to add description to the json object", e);
      }
      return new MediaInfo.Builder("stream path.mpd")
              .setStreamType(MediaInfo.STREAM_TYPE_BUFFERED)
              .setContentType("video/mp4")
              .setMetadata(movieMetadata)
              .setCustomData(jsonObj)
              //.setStreamDuration(player.getDuration())
              .build();
  }
  </code></pre>
  
  <p>I'm guessing that the problem maybe with recevier's code for the case of playing from android in setting the <strong>licenseUrl</strong>. </p>
  
  <p><strong>My receiver code setting license URL is as following.</strong></p>
  
  <pre><code>if (event.data.customData &amp;&amp; event.data.customData.licenseUrl) {
                      console.log('setting license URL');
                      host.licenseUrl = event.data.customData.licenseUrl;
                  }
  </code></pre>
  
  <p><code>event.data.customData.licenseUrl</code> license URL is not getting set in case of android.</p>
  
  <ul>
  <li><p><strong>Result while playing from android sender is Black screen.</strong></p></li>
  <li><p><strong>When playing from browser sender is plays the video.</strong></p></li>
  <li><p><strong>CORS</strong> is enabled on the S3 server which is hosting the video contents.</p></li>
  </ul>
  
  <p>Can Anyone tell what am I doing wrong?</p>
  
  <p>Does the JSON object passed from android not setting license URL ? If yes then how to resolve it?</p>
  
  <p>Thank you in advance for your kind interest and worthy time to my problem. :)</p>