Hello,
I need to call .load method to play rtmp or rtmpe streams. Am I allowed to do the following?
var lio = url.lastIndexOf("/");
var s = url.substring(0, lio);
var f = url.substring(lio + 1);
myJWPlayer.load({
streamer: s,
file: f
});
When I do that, the player gives the following error:
ArgumentError: Error #2126: NetConnection object must be connected.
at flash.net::NetStream/ctor()
at flash.net::NetStream()
at com.longtailvideo.jwplayer.media::RTMPMediaProvider/setStream()
at com.longtailvideo.jwplayer.media::RTMPMediaProvider/play()
at com.longtailvideo.jwplayer.controller::Controller/play()
at com.longtailvideo.jwplayer.player::Player/play()
at com.longtailvideo.jwplayer.player::JavascriptAPI/playToggle()
at com.longtailvideo.jwplayer.player::JavascriptAPI/js_play()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at flash.external::ExternalInterface$/_callIn()
at Function/<anonymous>()
at flash.external::ExternalInterface$/_evalJS()
at flash.external::ExternalInterface$/call()
thanks in advance
seems u try to play a video when netStream is not connected to the stream server.
Here is some code that may be of help for you when troubleshooting
netStream
function netStatusHandler(event:NetStatusEvent):void {// handles net status events
switch (event.info.code) {
case "NetConnection.Connect.Success":
// DO HERE YOUR CALL TO PLAY THE FILE
break;
// trace a messeage when the stream is not found
case "NetStream.Play.StreamNotFound":
trace("Stream not found: " + strSource);
break;
// when the video reaches its end, we check if there are
// more video left or stop the player
case "NetStream.Play.Stop":
if(intActiveVid + 1 < xmlPlaylist..vid.length())
playNext();
else
stopVideoPlayer();
break;
}
}
hope this is helpful to you