I have followed this doc to develop my cast sender app.
Unable to display album art i'm loading the media info as given below.Pleas help me out if i'm doing something wrong.
MediaMetadata mediaMetadata = new MediaMetadata(MediaMetadata.MEDIA_TYPE_MOVIE);
mediaMetadata.putString(MediaMetadata.KEY_SUBTITLE, "Movie");
mediaMetadata.putString(MediaMetadata.KEY_STUDIO, "studio");
if (null != subTitle) {
mediaMetadata.putString("closedCaption", subTitle);
}
if (null != title) {
mediaMetadata.putString(MediaMetadata.KEY_TITLE, title);
}
if (null != mImageUrl) {
// mediaMetadata.putString("thumb", mImageUrl);
// mediaMetadata.putString("images", mImageUrl);
mediaMetadata.addImage(new WebImage(Uri.parse(mImageUrl)));
Boolean bImage = mediaMetadata.hasImages();
List<WebImage> images = mediaMetadata.getImages();
System.out.print(images.size());
}
MediaInfo mediaInfo = new MediaInfo.Builder(profileUrl).setContentType(contentType).setStreamType(MediaInfo.STREAM_TYPE_BUFFERED).setMetadata(mediaMetadata).build();
// And finally startcastControlleActivity
mCastManager.startCastControllerActivity(context, mediaInfo, 0, true);
Finally fixed the issue, Added two image uri's for metadata. Apparently videoCastControllerActiviy requires Array of WebImages and minimum of two. So that it can scale and display accordingly based on the required area(i.e Notification, LockScreen and CastControllerActivity)
mediaMetadata.addImage(new WebImage(Uri.parse(mImageUrl)));
mediaMetadata.addImage(new WebImage(Uri.parse(mBigImageUrl)));