Go
Not registered? Sign up!

Insert URL to Player code

Google Translate
10 posts | return to the JavaScript Interaction forum | get the rss feed for this thread

Oct. 19, 2009rajan

I have a licensed JW player. I wish to insert a URL or IP address to JW Player code for rtmp. Could someone please give some direction or guidance where to insert a URL so that I could use only the file name in the java script on the HTML page. I checked in the web and spend many hours but couldn't work this out.

Any help direction is greatly appreciated and also that would be helpful to many since this information is not available elsewhere.

Thank you.

Oct. 19, 2009rajan

Found some info and tried few things without success (with Wowza 1.72 and JW Player 4.5).

Modified the player.fa code as follows (tried few combinations)

streamer:'rtmpe://myip/myapp1/',
type:'rtmpe',

streamer:'rtmpe://myip/myapp1',
type:'rtmpe',

JS in the HTML page:

so.addVariable('file','/mp4:myvideo.m4v');
This gives file not found error.

so.addVariable('file','mp4:myvideo.m4v');
This does not give an error but the video does not start and continuously the circle is going.

However, if I give both streamer and file in JS HTML page it works (as follows):
so.addVariable("streamer", "rtmpe://myip/myapp1&file=mp4:myvideo.m4v");

My requirement is to remove myip/myapp1 from the JS/HTML page and add that to the player.as code and compile. But this does not work.

Security token was enabled during all these tests. (This shows that my compilation process is correct.)

Please help. Thank you.

Oct. 19, 2009Jimb

@Rajan

If you have the streamer hardcoded into your player.fla, and have recompiled, the file statement in your html should only need to look like thisso.addVariable('file','myvideo.m4v');
You don't need to prepend the mp4: The player will do it automatically. that is done by the RTMPModel.as

Jimb

Oct. 22, 2009rajan

Thanks very much Jimb. I have tried this and many other combinations but nothing works on JW Player 4.5.

I have found this good post which explains some techniques to turn default flashvars (given in Player.as) to preconfigured flashvars.

http://www.longtailvideo.com/support/forum/General-Chat/14654/Hardcode-variables#

That doesn't seems to work in 4.5. I am not sure whether I am not doing it right or is there an issue with the 4,5 version.

Oct. 22, 2009Jimb

@Rajan

What error message, if any, do you see in the Wowza access log. That will certainly shed some light on things.

Also a lnk to your test web page would at least make it possible to help you.

If you don't want tpo post that kind of information here on the forum you can send me a text message by going to the page on my web site and I'll try to help you further.http://jim.playourvideo.net/message.htmJimb

Oct. 23, 2009rajan

Thanks JimB.

My test network is captive and it is not open to the Internet.

The player error message: Video not found or access denied: filename (only the filename is shown).

There is no evidence that the request has reached Wowza. It appears that the player does not send the request or it sends the request to a incorrectly decoded url.

I have given the way that I include server URL to the player code (Player.as). Additionally, I have chenged the Configger.as as per the instructions-post.

Once the URL is removed from the Player.as and places in the HTML page, it works.

Oct. 24, 2009Zachary Ozer

Can you confirm, using a proxy like Charles or Firebug, that your requests are hitting the correct URIs?

Oct. 24, 2009rajan

Thanks for the suggestion Zachary.

I haven't checked the wire but I am sure URL is not hitting Wowza because I have custom modules in place to report when the URL reaches it.

When the streamer is hardcoded, Wowza does not report the URL but when streamer is given in the HTML page Wowza reports it and reacts.

So I am sure that my way of hardcoding is not correct (as explained above). I am not sure whether this is documented for 4.6.

The available information on hardcoding as given in one of my previous posts appears not working for the current version.

Unless the developers document how to hardcode, it would be a trial and error process.

I am having another problem with 4.6 related to Wowza rtmpe and playlists which could be a bug.

See this post:
http://www.longtailvideo.com/support/forum/Bug-Reports/20290/Wowza-rtmpe-and-Playlist-possibly-a-Bug

Oct. 25, 2009Zachary Ozer

Hi Rajan,

Seems to me like the player may not be selecting the correct model.

Try compiling with type = rtmp

Oct. 26, 2009rajan

Thanks Zachary

I think I have tried with type = 'rtmp'. I will try again with type = rtmp (without quotes). It is painful when right syntax and semantics are not clear.

Thanks again.

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.