# Send custom metadata on a custom Chromecast receiver

**URL:** <https://community.bitmovin.com/t/send-custom-metadata-on-a-custom-chromecast-receiver/2172>\
**Category:** Support\
**Tags:** bitmovin-player, bitmovin-analytics, bitmovin, web, chromecast\
**Created:** [July 27, 2023, 7:52am UTC](https://community.bitmovin.com/t/send-custom-metadata-on-a-custom-chromecast-receiver/2172 "2023-07-27T07:52:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lucky.goyal](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/lucky.goyal/32/506_2.png) [@lucky.goyal](https://community.bitmovin.com/u/lucky.goyal)\
**Post date:** [August 1, 2023, 9:02am UTC](https://community.bitmovin.com/t/send-custom-metadata-on-a-custom-chromecast-receiver/2172/2 "2023-08-01T09:02:58Z")

</div>

Hi @madhuy1729 , thanks for sharing your question here.

Custom data can be passed to CAF receiver at time of starting casting. This can be done by adding metadata to the source being loaded.

The `source.metadata` property is present in all 3 platforms SDKs(Web, iOS and Android). The type of metadata property is mentioned in documentation for each SDK.

**Web** : [SourceConfig.metadata](https://bitmovin.com/docs/player/api-reference/web/web-sdk-api-reference-v8#/player/web/8/docs/interfaces/core_config.sourceconfig.html#metadata) . Any \<String, String\> key value pairs can be set as custom metadata. Example below.

Please let me know if this helps of if there are any followup questions.

```auto
`var source = { 
    dash: '',
    metadata: {
        "contentId": "test_id",
        "userId": "test_user"
    },
}`

```

**Android** : [SourceConfig.metadata](https://cdn.bitmovin.com/player/android/3/docs/-player%20-module/com.bitmovin.player.api.source/-source-config/metadata.html). Type is `Map` `<` `String` `, ` `String` `>`

**iOS** : [SourceConfig.metadata](https://cdn.bitmovin.com/player/ios/3/docs/Classes/BMPSourceConfig.html#/c:objc(cs)BMPSourceConfig(py)metadata). Type is  
`NSMutableDictionary`. But entries of dictionary should be \<String, String\> key value pairs.

Then on CAF receiver side, this will be available in `cast.framework.messages.MessageType.LOAD` message which can be intercepted as demonstrated in Bitmovin [reference CAF receiver](https://github.com/bitmovin/bitmovin-player-caf-receiver/blob/main/src/index.ts#L25-L40) implementation. You will need to customize the implementation and get the metadata passed in from Cast sender in `LoadRequestData.media.customData.metadata`field.

---

_[View the full topic](https://community.bitmovin.com/t/send-custom-metadata-on-a-custom-chromecast-receiver/2172)._
