# PHP cast help

**URL:** <https://forums.plex.tv/t/php-cast-help/284261>\
**Category:** Dev/API Corner\
**Tags:** chromecast\
**Created:** [July 17, 2018, 3:18pm UTC](https://forums.plex.tv/t/php-cast-help/284261 "2018-07-17T15:18:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sachaw](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sachaw/32/86490_2.png) [@sachaw](https://forums.plex.tv/u/sachaw)\
**Post date:** [July 17, 2018, 3:18pm UTC](https://forums.plex.tv/t/php-cast-help/284261/1 "2018-07-17T15:18:40Z")

</div>

I am currently in the process of integrating Plex and Chromecast into my home automation platform, I am using the following library: [https://github.com/ChrisRidings/CastV2inPHP](https://github.com/ChrisRidings/CastV2inPHP) Which works great for control, But now I wish to initiate playing with the Plex-\>Play(); function but It expects a JSON payload, which I am unsure the structure, as it goes straight to the Chromecast, it should be the same as what Plex web and the app sends when starting media on a Chromecast, thanks.

---

<div class="post-metadata">

**Author:** ![sachaw](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sachaw/32/86490_2.png) [@sachaw](https://forums.plex.tv/u/sachaw)\
**Post date:** [July 19, 2018, 3:03am UTC](https://forums.plex.tv/t/php-cast-help/284261/2 "2018-07-19T03:03:46Z")

</div>

Got some feedback, but still wont work:

```auto
{
  "contentId": "/library/metadata/5267",
  "streamType": "BUFFERED",
  "contentType": "video",
  "customData": {
    "offset": 0,
    "directPlay": true,
    "directStream": true,
    "subtitleSize": 100,
    "audioBoost": 100,
    "server": {
      "machineIdentifier": "XXXXXXXXX",
      "transcoderVideo": true,
      "transcoderVideoRemuxOnly": false,
      "transcoderAudio": true,
      "version": "1.4.3.3433",
      "myPlexSubscription": false,
      "isVerifiedHostname": false,
      "protocol": "https",
      "address": "192.168.10.2",
      "port": 32400,
      "accessToken": "transient-XXXXXXXX",
      "user": {
        "username": "XXXXXXX"
      },
      "containerKey": "327?own=1&window=200"
    },
    "autoplay": true,
    "currentTime": 0
  }
}

```

Does anybody know if this is still a valid payload to send?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [October 17, 2018, 3:15am UTC](https://forums.plex.tv/t/php-cast-help/284261/3 "2018-10-17T03:15:11Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
