# prepareMessage prepareContentId functions are not invoked

**URL:** <https://community.bitmovin.com/t/preparemessage-preparecontentid-functions-are-not-invoked/3352>\
**Category:** Support\
**Tags:** bitmovin-player, bitmovin, web\
**Created:** [October 15, 2024, 2:40pm UTC](https://community.bitmovin.com/t/preparemessage-preparecontentid-functions-are-not-invoked/3352 "2024-10-15T14:40:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alfsender](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@alfsender](https://community.bitmovin.com/u/alfsender)\
**Post date:** [October 15, 2024, 2:40pm UTC](https://community.bitmovin.com/t/preparemessage-preparecontentid-functions-are-not-invoked/3352/1 "2024-10-15T14:40:23Z")

</div>

### Product

Player

### Question

Hi Team,

I am passing SourceConfirm with custom prepareMessage prepareContentId function for Fairplay DRM in my application. I have added console.log statements to these funtion for debug. But when I load the player in Safari browser I don’t see these functions getting invoked. And because of this I am seeing error as “DRM\_NO\_KEY\_SYSTEM”.

Here is how my SourceConfig looks like…

{  
hls: “url”,  
dash: “url”,  
drm: {  
widevine: {  
LA\_URL: “url”,  
},  
fairplay: {  
LA\_URL: “url”,  
certificateURL: “url”,  
headers: {  
‘Content-Type’: ‘application/json’,  
},  
prepareMessage: (event: any, session: any) =\> {  
console.log(‘Test 01’, event, session)  
return JSON.stringify()  
},  
prepareCertificate: (cert) =\> {  
console.log(‘Test 02’, cert)  
return  
},  
prepareContentId: (contentId) =\> {  
contentId = contentId.slice(2)  
console.log(‘Test 03’, contentId)  
return ‘’  
},  
},  
},  
}

Please let me know if there is any additional configuration that I shoujld add to these functions are invoked by sdk.

Thanks.

---

<div class="post-metadata">

**Author:** ![alfsender](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@alfsender](https://community.bitmovin.com/u/alfsender)\
**Post date:** [October 16, 2024, 6:42am UTC](https://community.bitmovin.com/t/preparemessage-preparecontentid-functions-are-not-invoked/3352/2 "2024-10-16T06:42:32Z")

</div>

Hi Community,

Please share your inputs as I am strugling to make this work. Please let me know if this is something which is currently not supported in Bitmovin so we can figure out another approach to handle this use case.

Thanks.
