# playing different streams using the api

**URL:** <https://community.wowza.com/t/playing-different-streams-using-the-api/172>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-player-javascript-api\
**Created:** [November 27, 2016, 1:37am UTC](https://community.wowza.com/t/playing-different-streams-using-the-api/172 "2016-11-27T01:37:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)\
**Post date:** [November 27, 2016, 1:37am UTC](https://community.wowza.com/t/playing-different-streams-using-the-api/172/1 "2016-11-27T01:37:33Z")

</div>

Is there an javascript instruction whereby one can load different videos that users click on?

thanks,

Alan Costello

---

<div class="post-metadata">

**Author:** ![alan\_costello](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@alan\_costello](https://community.wowza.com/u/alan_costello)\
**Post date:** [November 28, 2016, 12:00pm UTC](https://community.wowza.com/t/playing-different-streams-using-the-api/172/2 "2016-11-28T12:00:43Z")

</div>

I think I should do it this way - make a new instance with a new:

“sourceURL”:“https%3A%2F%2F%5Bwowza-ip-address%5D%3A1935%2Fvod%2Fmp4%3Asample.mp4%2Fplaylist.m3u8”

Each new stream/recording needs a new instance of the player.

I guess that is correct?

Hope so!

Alan Costello

---

<div class="post-metadata">

**Author:** ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)\
**Post date:** [January 4, 2017, 3:15pm UTC](https://community.wowza.com/t/playing-different-streams-using-the-api/172/3 "2017-01-04T15:15:49Z")

</div>

Hi,

You can have a script on your page that can dynamically change the playback URL and load it into your player instance. The method on how to do this would depend on what player you are using. Do please refer to your player documentation.

Michelle
