The following is the main structure of a basic receiver app, which has no customization:
- A script element to load the Google Cast Receiver Framework.
<script src="//www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js"></script>
- A script element to load the Kaltura Receiver Player SDK.
<script src="//cdnapisec.kaltura.com/p/{YOUR_PARTNER_ID}/embedPlaykitJs/uiconf_id/{UI_CONF_ID}"></script>
- A
cast-media-player
element to represent the media player.
<body>
<cast-media-player />
</body>
The following is the minimum code for a receiver application without any customization (except for entering your partner and entry IDs in the proper places). You can copy and paste this script exactly as-is into your app to create the receiver app.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script src="//www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js"></script>
<script src="//cdnapisec.kaltura.com/p/{YOUR_PARTNER_ID}/embedPlaykitJs/uiconf_id/{UI_CONF_ID}"></script>
</head>
<body>
<cast-media-player />
<script>
var conf = {
provider: {
partnerId: {YOUR_PARTNER_ID},
uiConfId: {UI_CONF_ID} // receiver type
}
};
var receiver = new KalturaPlayer.cast.receiver.Receiver(conf);
receiver.start();
</script>
</body>
</html>
Support for setting receiver player type is coming to player studio soon. In the meanwhile please reach out to delivery desk if you require setting up a receiver uiConf.