# includeBandwidths?

**URL:** <https://forums.plex.tv/t/includebandwidths/188231>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [April 11, 2017, 10:06pm UTC](https://forums.plex.tv/t/includebandwidths/188231 "2017-04-11T22:06:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![papalozarou](https://avatars.discourse-cdn.com/v4/letter/p/c6cbf5/32.png) [@papalozarou](https://forums.plex.tv/u/papalozarou)\
**Post date:** [April 11, 2017, 10:06pm UTC](https://forums.plex.tv/t/includebandwidths/188231/1 "2017-04-11T22:06:24Z")

</div>

I’ve just gotten around to updating to the latest PMS (1.5.4.x) and it’s borked a live streaming plugin.

It throws an error saying that my `createChannelObject[]` has an unexpected keyword argument of `includeBandwidths`

Adding it to my `createChannelObject[]` with value of either `0`, `1` or `False` throws a second error on iOS complaing about no direct playback for HTTP, with container MP4, codec H264, audio codec AC3. The offending code appears to be:

`video_codec = "H264", audio_codec = "AAC", container = "MP4", protocols = "HTTPLiveStreaming",`

(I’m using an @indirect playback method as I need to generate a URL when play is pressed)

If I remove video\_codec, audio\_codec and container it will play the stream, but:

- I have no idea what a value of `0`, `1` or `False` does to `includeBandwidths` as I don’t know what it is
- iOS complains the server is not fast enough to transcode on iOS

Prior to the updated PMS the plugin worked perfectly.

---

<div class="post-metadata">

**Author:** ![sander1](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sander1](https://forums.plex.tv/u/sander1)\
**Post date:** [April 12, 2017, 9:28am UTC](https://forums.plex.tv/t/includebandwidths/188231/2 "2017-04-12T09:28:02Z")

</div>

Instead of adding the exact “missing” parameters to my functions, I usually have added `**kwargs` ([example](https://github.com/plexinc-plugins/Services.bundle/blob/7f0ddfe9f7efbe45fa39e1d01fa0713b18389f51/Contents/Service%20Sets/com.plexapp.plugins.amt/URL/Apple%20Movie%20Trailers/ServiceCode.pys#L86 "example")) at the end of the function/parameters declaration. That way it’ll keep working, even if anything new is (accidentally) added later in time.

> <https://stackoverflow.com/questions/36901/what-does-double-star-asterisk-and-star-asterisk-do-for-parameters>

---

<div class="post-metadata">

**Author:** ![papalozarou](https://avatars.discourse-cdn.com/v4/letter/p/c6cbf5/32.png) [@papalozarou](https://forums.plex.tv/u/papalozarou)\
**Post date:** [April 12, 2017, 5:06pm UTC](https://forums.plex.tv/t/includebandwidths/188231/3 "2017-04-12T17:06:50Z")

</div>

Thanks @sander1 that helps.

It does still leave me not knowing what that argument does, and why the properties (video\_codec etc.) now cause iOS to choke

---

<div class="post-metadata">

**Author:** ![sander1](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sander1](https://forums.plex.tv/u/sander1)\
**Post date:** [April 12, 2017, 5:44pm UTC](https://forums.plex.tv/t/includebandwidths/188231/4 "2017-04-12T17:44:05Z")

</div>

To be honest I also don’t know what `includeBandwidths` does. It doesn’t seem to be a standard, at least not for channels.

The reason why some clients are choking could be the mixing of `MP4` and `HTTPLiveStreaming`. Also `HTTPLiveStreaming` is not a valid protocol value. Try:

```auto
video_codec = VideoCodec.H264,
audio_codec = AudioCodec.AAC,
container = "mpegts",
protocols = "hls",

```

---

<div class="post-metadata">

**Author:** ![papalozarou](https://avatars.discourse-cdn.com/v4/letter/p/c6cbf5/32.png) [@papalozarou](https://forums.plex.tv/u/papalozarou)\
**Post date:** [April 13, 2017, 7:42am UTC](https://forums.plex.tv/t/includebandwidths/188231/5 "2017-04-13T07:42:28Z")

</div>

Thanks again @sander1 – will try the above.

---

<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, 8:03pm UTC](https://forums.plex.tv/t/includebandwidths/188231/6 "2020-01-08T20:03:23Z")

</div>


