# JW Player - Playing live stream on iphone and Flash with one player

**URL:** <https://community.wowza.com/t/jw-player-playing-live-stream-on-iphone-and-flash-with-one-player/35939>\
**Category:** Wowza Streaming Engine\
**Tags:** media-players-and-devices\
**Created:** [January 4, 2011, 10:04pm UTC](https://community.wowza.com/t/jw-player-playing-live-stream-on-iphone-and-flash-with-one-player/35939 "2011-01-04T22:04:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyler\_Roberts](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@Tyler\_Roberts](https://community.wowza.com/u/Tyler_Roberts)\
**Post date:** [January 4, 2011, 10:04pm UTC](https://community.wowza.com/t/jw-player-playing-live-stream-on-iphone-and-flash-with-one-player/35939/1 "2011-01-04T22:04:15Z")

</div>

I have read alot on both the Wowza and JWplayer forums (as well as several others). I have the most recent JWplayer 5.4. I am able to play an RTMP live stream and iphone live stream on there own, but I am looking for a way to have the player play the “correct” live stream based on the browser/device. The current JWPlayer does this with a file, but I can’t figure out how to do it with a live stream. I would appreciate any guidance

---

<div class="post-metadata">

**Author:** ![Andrew\_Kennedy](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@Andrew\_Kennedy](https://community.wowza.com/u/Andrew_Kennedy)\
**Post date:** [January 5, 2011, 2:19am UTC](https://community.wowza.com/t/jw-player-playing-live-stream-on-iphone-and-flash-with-one-player/35939/2 "2011-01-05T02:19:33Z")

</div>

For this Player specific question you would need to go back to the JWPlayer website and asked in their support area. It may be a current limitation of the player or something else is required.

Shamrock

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 5, 2011, 2:19pm UTC](https://community.wowza.com/t/jw-player-playing-live-stream-on-iphone-and-flash-with-one-player/35939/3 "2011-01-05T14:19:27Z")

</div>

I don’t think there is any difference between vod and live streams from the client (JW Player) point of view. It’s the same.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 22, 2012, 8:28pm UTC](https://community.wowza.com/t/jw-player-playing-live-stream-on-iphone-and-flash-with-one-player/35939/4 "2012-05-22T20:28:03Z")

</div>

Take a look at the JW Player mode method

[http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/18530/embedding-an-rtmp-stream-with-an-html5-fallback](http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/18530/embedding-an-rtmp-stream-with-an-html5-fallback)

Richard

---

<div class="post-metadata">

**Author:** ![paolo\_mazza](https://avatars.discourse-cdn.com/v4/letter/p/e47c2d/32.png) [@paolo\_mazza](https://community.wowza.com/u/paolo_mazza)\
**Post date:** [January 11, 2011, 12:36pm UTC](https://community.wowza.com/t/jw-player-playing-live-stream-on-iphone-and-flash-with-one-player/35939/5 "2011-01-11T12:36:21Z")

</div>

I tryed the script but I could not stream (on demand) to the Iphone from the wowza server.

Any update? I am looking for a solution to this problem too !

Thanks

Paolo

---

<div class="post-metadata">

**Author:** ![Chris\_Gerrish](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Chris\_Gerrish](https://community.wowza.com/u/Chris_Gerrish)\
**Post date:** [January 10, 2011, 5:36pm UTC](https://community.wowza.com/t/jw-player-playing-live-stream-on-iphone-and-flash-with-one-player/35939/6 "2011-01-10T17:36:28Z")

</div>

This is what I did to make it work. There is some sort of bug right now with the player though. Something having to do with RTMPT.

```auto
<div id="container" >Loading the player ...</div> 
			 
			<script type="text/javascript"> 
			    jwplayer("container").setup({
			        flashplayer: "player.swf",
			        autoplay: "false",
			        height: 360,
			        width: 640,
			        
			        
			    }).onReady(function() {
			  if (this.container.tagName.toLowerCase() == "object") {
			    // Flash case
			    this.load({
			        file: "streamname",
			        streamer: "rtmp://servername:1935/live",
			        provider:"rtmp",
			        
			        image: "/_img/uploads/thumb.jpg"
			    });
			  } else {
			    // HTML5 case
			    this.load({
			       
			        file: "http://servername:1935/live/streamname/playlist.m3u8",
			        image: "/_img/uploads/thumb.jpg"
			     });
			  }
			 
			});
			</script> 

```

---

<div class="post-metadata">

**Author:** ![Neil\_MacLennan](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@Neil\_MacLennan](https://community.wowza.com/u/Neil_MacLennan)\
**Post date:** [April 23, 2011, 1:31am UTC](https://community.wowza.com/t/jw-player-playing-live-stream-on-iphone-and-flash-with-one-player/35939/7 "2011-04-23T01:31:06Z")

</div>

> I tryed the script but I could not stream (on demand) to the Iphone from the wowza server.
> 
> Any update? I am looking for a solution to this problem too !
> 
> Thanks
> 
> Paolo

To make this work with, say the sample Extremists.m4v file that comes with a standard Wowza install, try:

```auto
<div id="container" >Loading the player ...</div> 
			 
			<script type="text/javascript"> 
			    jwplayer("container").setup({
			        flashplayer: "player.swf",
			        autoplay: "false",
			        height: 360,
			        width: 640,
			        
			        
			    }).onReady(function() {
			  if (this.container.tagName.toLowerCase() == "object") {
			    // Flash case
			    this.load({
			        file: "Extremists.m4v",
			        streamer: "rtmp://servername:1935/vod/_definst_",
			        provider:"rtmp",
			        
			        image: "/_img/uploads/thumb.jpg"
			    });
			  } else {
			    // HTML5 case
			    this.load({
			       
			        file: "http://servername:1935/vod/Extremists.m4v/playlist.m3u8",
			        image: "/_img/uploads/thumb.jpg"
			     });
			  }
			 
			});
			</script> 

```

---

<div class="post-metadata">

**Author:** ![Milorad\_Stevanovic](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@Milorad\_Stevanovic](https://community.wowza.com/u/Milorad_Stevanovic)\
**Post date:** [May 22, 2012, 7:42pm UTC](https://community.wowza.com/t/jw-player-playing-live-stream-on-iphone-and-flash-with-one-player/35939/8 "2012-05-22T19:42:05Z")

</div>

hello,

I have tried to make this work for live streaming, however, iOS device does not play the stream…could you please advise on what is wrong below with the code

Loading the player ...
