# How does EpisodeObject handle urls?

**URL:** https://forums.plex.tv/t/how-does-episodeobject-handle-urls/137819
**Category:** Dev/API Corner
**Tags:** plugin-dev
**Created:** [March 5, 2016, 11:34pm UTC](https://forums.plex.tv/t/how-does-episodeobject-handle-urls/137819 "2016-03-05T23:34:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![plex\_on\_amazon](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@plex\_on\_amazon](https://forums.plex.tv/u/plex_on_amazon)
#### Post date: [March 5, 2016, 11:34pm UTC](https://forums.plex.tv/t/how-does-episodeobject-handle-urls/137819/1 "2016-03-05T23:34:01Z")

</div>

Hello,

I am developing a plex channel plugin but I am a bit stuck in the basics.

I am trying to just play a single video like that:

```
def EpisodeMenu():
  oc = ObjectContainer()
  oc.add(EpisodeObject(url = "http://81.21.47.74/media2/anixtigrammi/145709400156/2311ed92ab42504e75f9ebee8a8189dc.mp4",title = "anoixti"))
  return oc

```

This doesn’t work. However, when I replace the url with a youtube video it works just fine. What am I doing wrong?

---

<div class="post-metadata">

### Author: ![shopgirl284](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@shopgirl284](https://forums.plex.tv/u/shopgirl284)
#### Post date: [March 6, 2016, 10:01pm UTC](https://forums.plex.tv/t/how-does-episodeobject-handle-urls/137819/2 "2016-03-06T22:01:04Z")

</div>

To use the url field in the EpisodeObject() or VideoClipObject(), there must be a URL Service for the website. That is why it works with YouTube videos, because a URL service for YouTube already exists. A URL service is the back end programming for Plex channels that tells the Plex players how to play the media. Plex requires that you give a link to the media stream as well as information about that media, so the various Plex players will know how to play it.

Just like PlexIt will only works on [Supported Plex It! Websites](https://support.plex.tv/hc/en-us/articles/200690288-Supported-Plex-It-Websites "Supported Plex It! Websites"), channels only play media if either there is already an existing URL service, you create a new URL service for the website, or you build the media objects within the channel code.

Here is a link to the URL services that are available - [github.com/plexinc-plugins/Services.bundle/tree/master/Contents/Service%20Sets](https://github.com/plexinc-plugins/Services.bundle/tree/master/Contents/Service%20Sets "https://github.com/plexinc-plugins/Services.bundle/tree/master/Contents/Service%20Sets") and here is a link to a simple channel that does not use a URL Service and builds the media object in the channel plugin - [github.com/plexinc-plugins/HGTV.bundle/blob/master/Contents/Code/ **init**.py](https://github.com/plexinc-plugins/HGTV.bundle/blob/master/Contents/Code/ __init__.py "https://github.com/plexinc-plugins/HGTV.bundle/blob/master/Contents/Code/\_\_init\_\_.py")

---

<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: [January 8, 2020, 7:56pm UTC](https://forums.plex.tv/t/how-does-episodeobject-handle-urls/137819/3 "2020-01-08T19:56:05Z")

</div>


