---
title: loadCertificate
framework: tvmljs
role: symbol
role_heading: Instance Property
path: tvmljs/mediaitem/1627435-loadcertificate
---

# loadCertificate

A callback function used to load the security certificate for an item.

## Declaration

```data
readonly attribute Object loadCertificate;
```

## Discussion

Discussion This attribute must be set if FairPlay Streaming is supported. The callback function must return either the asset identifier that was retrieved or null. This attribute must be assigned to a function that takes two parameters, url and callback; for example, item.loadCertificate = function certificate(url, callback) {}. The callback function must be called with the certificate that was retrieved, or with null as the first parameter. The second parameter is error. For more information, see the FairPlay Streaming page.

## See Also

### Supporting FairPlay Streaming

- [loadAssetID](tvmljs/mediaitem/1627392-loadassetid.md)
- [loadKey](tvmljs/mediaitem/1627379-loadkey.md)
