Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Can't make player stop via Javascript


Please help! I've tried every example on this website to try to STOP a FLVplayer from playing a video. Here's what I'm doing: I've set up a player, but am not actually not actually started it ontil a user clicks on a button, which involkes the StartVid() function shown. There's a boolean so that the first time it's clicked, the actual player is written to the <DIV id>. That works fine. Next time that button is clicked, I want to stop the video and re-load the page. The STOP is needed because otherwise, it takes forever to re-load. The comments show all the things I've tried that don't work. In every case, my error console shows that the object doesn't support the method. What am I doing wrong?



<script type='text/javascript'>
var st = new SWFObject('bin/player.swf','ply','550','420','9','#33cc99');
st.addParam('allowfullscreen','true'); // global settings
st.addVariable('fullscreen', 'true');
st.addParam('allowscriptaccess','always');
st.addParam('wmode','opaque');
st.addVariable('autostart', 'true');
st.addVariable('file', 'housewalk.flv');
var bPlayVid = 0;


function startVid()
{
if(bPlayVid == 0)
{
bPlayVid = 1; // first time
st.write("vtLocation");
}
else // next time
{
var player = document.getElementById('vtLocation');


player.sendEvent("PLAY"); // doesn't work
st.sendEvent("PLAY"); // doesn't work either
player.sendEvent("STOP"); // doesn't workeither
player.sendEvent("PLAY", 'false'); // doesn't work either

location.reload(0); // don't ask... there's a good reason.
}
}

32 Community Answers

JW Player

User  
0 rated :

I assume that my player, JW FLV MEDIA PLAYER 4.1, is pretty recent? In any case and as i pointed out, the examples did not work for me. Specifically, with a player already playing and running in a <DIV> tag whose ID="vtLocation", the following SHOULD work but does not!

var player = document.getElementById('vtLocation');

followed by...

player.sendEvent("STOP");

error reported says "the object doesn't support the method.

Anyone else run into or solve this?

JW Player

User  
0 rated :

Here's a little test page so you can see how things work by example.

:D

bc.. <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01//EN""http://www.w3.org/TR/html4/strict.dtd">

<htmllang="en">

<head>

<title>JWMPv4.2.x-swfobjectv1.5</title>

<scripttype="text/javascript"src="swfobject.js"></script>

</head>

<body>

<divid="vtLocation"class="vtLocation">
<ahref="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">GettheAdobeFlashPlayertoseethisvideo.</a>
</div>

<scripttype='text/javascript'>
varplayer=null;
varbPlayVid=0;

varst=newSWFObject('player-4.2.80.swf','ply','550','420','9.0.124','#33CC99');
st.addParam('allowscriptaccess','always');
st.addParam('allowfullscreen','true');
st.addParam('wmode','opaque');
st.addVariable('autostart','true');
st.addVariable('file','video1.flv');


functionstartVid()
{
if(bPlayVid==0)//firsttime
{
bPlayVid=1;
st.write('vtLocation');
}
else//nexttime
{
//player=document.getElementById('vtLocation');//won'twork-wrongelementid
//alert('1-Player:'+player.id);
player=document.getElementById('ply');//doeswork-correctelementid
alert('2-Player:'+player.id);
//player.sendEvent('PLAY','false');//thiswillPAUSEtheplayer
//player.sendEvent('STOP');//thiswillSTOPtheplayer
//location.reload(0);//don'task...there'sagoodreason.
}
};
</script>
<buttononclick="startVid();">STARTVideo</button>
<buttononclick="player.sendEvent('PLAY','true');">PLAYVideo</button>
<buttononclick="player.sendEvent('PLAY','false');">PAUSEVideo</button>
<buttononclick="player.sendEvent('STOP');">STOPVideo</button>

<body>

</html>



JW Player

User  
0 rated :

OK thanks. The error is about the same: "object doesn't support the property or method". But my player is 4,1, and you're saying 4.2 so I guess that's the bottom line... I need to upgrade. Do you know where I can get v.4.2? Because the whole methodology seems to have changed in the v.5.1 that andersen recommended, since now it uses the embed tag (which I thought was downgraded for browser compatibility?). So for that, maybe I'd better wait till I have time to re-learn the process the new way. I know I can't simply replace the swfobject and associated JS file for the above to work with 5.1.

FYI, for the page I'm doing, I have a sloppy but usable workaround. When my startVid() is activated the second time, I can stop the video quickly like this...

st.addVariable('file', null); // Kludge: force a bad file
st.write("vtLocation"); // write to player. Forces shutdown quickly
st. location.reload(0); // reload page. original image will appear

This works fine for me because the <DIV> tag where the player is invoked the first time is occupied by a still photo, via an <IMG> tag, The firet time through, the photo seems to just start animating in the player because it gets replaced by the player. The reload() call alone is not so good because I guess the player isn't giving back much time to the OS, and the user is left wondering why nothing is happening and tends to click again. Stopping the video does the trick. It does leave an error message briefly in the middle of the player before the page reloads, but at least it all happens fast. I'm just trying to help my fiancee sell her house, so you can see the effect on that website, http://buythis house2day.com (yeah, I'll probably be able to sell the domain name for a good price afterward!). But you'll see the problem I spoke of. with the momentary sloppy error message. If 4.2 can just drop in to make the "player.sendEvent('STOP')" call work, and its still available, please tell me where!

Thanks again!

JW Player

User  
0 rated :

@Randy

both *swfobject v.1.5* and *swfobject v.2.1* can be used with all the JW players - *v.3.x* as well as *v.4.1* or *v.4.2*
only thing is that the javascript syntax for the two swfobject versions are different -
and the flashvars for the JW FLV Media Player v.3.x and the v.4.x differ as does their javascript API

there are examples of both kinds here: - *http://home5.inet.tele.dk/nyboe/flash/*
All v.3.x demos December 2007 (v.3.14) - uses swfobject v.1.5 - *http://home5.inet.tele.dk/nyboe/flash/mediaplayer/*
All v.4.x demos September 2008 (v.4.1.x) - uses swfobject v.2.1 - *http://home5.inet.tele.dk/nyboe/flash/mediaplayer4/*

please also see this thread - *http://www.jeroenwijering.com/?thread=13561*

JW Player

User  
0 rated :

@Randy,

The method I used works for all v4.x players, nothing has changed in the portion of the API that I'm using.

The format of the embedding code is different from SWFObject v1.5 to swfobject v2.1, but the code that I posted above will work correctly once the format is changed.

The key point that you seem to have to missed is that this *_DOESN'T_* work:bc.. player = document.getElementById('vtLocation');

and this *_DOES_* work:bc.. player = document.getElementById('ply');

JW Player

User  
0 rated :

Thanks. You know, your right it does work. It's the strangest thing though. If I actually put a test page on my website (http://buythishouse2day.com), it works in both firefox and all my IE versions. But, when I run it from my HOMESITE HTML editor (which is configured to use IE), the video starts fine, but the player.sendEvent('STOP'); command generates the error I described, and won't stop the video. That's pretty strange! You'd think if I were going to have a problem like that it wouldn't run on the simulation! Nothing like that has happened before from HOMESITE, so it really confused me. In any case, at least it works, so thanks again everyone!

JW Player

User  
0 rated :

hi there,

i am using v4.1 and swfobject1.5. i can find the player via dom, but both FF and IE won't stop the video, and FF gives me error: sendEvent() is not a function

any ideas?

thanks in advance.

JW Player

User  
0 rated :

@allie,

Are you testing locally (offline)?

The JavaScript API does not function offline, the player MUST be loaded from an online (http:// protocol) site.

JW Player

User  
0 rated :

I am testing online.

Where is sendEvent() defined?

JW Player

User  
0 rated :

sendEvent() is defined in the player.

Post your code or a link to your test page so someone can help further.

JW Player

User  
0 rated :

Hi there,

Here is the embedded code that plays the movie:

<div style="top: 20%; left: 30%;" id="lightbox-box1">
<a class="close" id="lightbox-close1" href="#">close</a>
<div id="flashcontent1"><embed type="application/x-shockwave-flash" src="http://myserver/player.swf" style="" id="flashObject1" name="flashObject1" bgcolor="#FFFFFF" quality="high" flashvars="file=http://myserver/myvideo.flv?=http://myserver/startframe.jpg" width="568" height="340"></div><script type="text/javascript">var so0 = new SWFObject("http://myserver/player.swf", "flashObject1", "568", "340", "8", "#FFFFFF");so0.addVariable("file", "http://myserver/myvideo.flv");so0.addVariable("image","http://myserver/startframe.jpg");so0.write("flashcontent1");
</script><a id="lightbox-loop1" href="javascript:void(0)"></a>
</div>

Here is the JavaScript that attempts to stop the player when the "close" link (in the above code) is clicked:

function load(){

$("#lightbox-close1").click(function () {
$("#lightbox-wrap").css({ top:"-10000px", left:"-10000px" });
$("#lightbox-box1").css({ top:"-10000px", left:"-10000px" });
$("#content-wrap embed, #content-wrap object").css('visibility', 'visible');
var player1 = document.getElementById("flashObject1");
//player1.sendEvent('PLAY', 'false'); // doesn't work
//player1.sendEvent('STOP', 'true'); // doesn't work
player1.sendEvent('STOP'); // doesn't work either
});
}

The function load() is invoked when the page is loaded:
<body onload="load()">

The pause & stop buttons on the player work perfectly, but the "close" link that invokes the functions in the player does not.

FF gives me the following error:
[Exception..."'Error calling method on NPObject![plugin exception: Error in Actionscript. Use a try/catch block to find error.]'
when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"
location: "<unknown>"
data: no]

Thanks much for your help in advance!

JW Player

User  
0 rated :

figured out why: the SWF and the data source has to be on the same domain.

in my pseudo code above, i neglected to put the real "myserver" values there: i had two different domains in my code.

JW Player

User  
0 rated :

OK, now we can fix things.

1) If you are using SWFObject to embed the JW FLV Player, you don't need the embed element.

2) I'm assuming that you are loading swfobject.js v1.5 somewhere in the head element of your HTML document.

3) Don't wrap the JavaScript in ANY HTML element.

4) You can't get the JavaScript player reference object immediately upon page load, because it doesn't exist yet. You have to wait until the player calls the playerReady() function before you can get the reference object. Then you have to wait until the player has loaded and parsed the playlist before you can do anything with the player. In your case, since you're not trying to do anything immediately after the player is really ready, you don't need to be concerned with the playlist loading.

5) Check for typOs and any other stupid mistakes that I may have made, since *_this is UNTESTED code!_*

In the head element of your HTML document:bc.. <scripttype="text/javascript">
varplayer=null;


functionplayerReady(obj)
{
player=document.getElementById(obj.id);
};


functionload()
{
$("#lightbox-close1").click
(
function()
{
$("#lightbox-wrap").css({top:"-10000px",left:"-10000px"});
$("#lightbox-box1").css({top:"-10000px",left:"-10000px"});
$("#content-wrapembed,#content-wrapobject").css('visibility','visible');
player.sendEvent('STOP');
}
)
};
</script>



In the body element of your HTML document:bc.. <body onload="load()">

<div id="flashcontent1"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Flash Plugin to see this video.</a></div>

<scripttype="text/javascript">
varso0=newSWFObject('http://myserver/player.swf','flashObject1','568','340','8','#FFFFFF');
so0.addParam('allowscriptaccess','always');
so0.addParam('bgcolor','#FFFFFF');
so0.addVariable('file','http://myserver/myvideo.flv');
so0.addVariable('image','http://myserver/startframe.jpg');
so).addVariable('id','flashObject1);
so0.write('flashcontent1');
</script>



JW Player

User  
0 rated :

Thanks so much!

JW Player

User  
0 rated :

Fix the typO in this line:bc.. so0.addVariable('id', 'flashObject1);

JW Player

User  
0 rated :

Hi there,

My main problem was due to the fact that different domain names were used for the location of my JS script and that stored the .flv and .jpg files. Once that was fixed, things were working fine.

But just to understand swfobject and the issues raised by brokenString (Apr. 23):

1) the <embed> code is populated by the JS code: I believe it happened when the JS executes: so0.write("flashcontent1")

2). swfobject.js v1.5 is loaded in the head element of the HTML page.

3). I don't understand what this means:
" Don't wrap the JavaScript in ANY HTML element."

This is a lightbox implementation, and the JS is wrapped between
<div style="top: 20%; left: 30%;" id="lightbox-box1">
<a class="close" id="lightbox-close1" href="#">close</a>
<div id="flashcontent1">

and
<a id="lightbox-loop1" href="javascript:void(0)"></a>
</div>

[as shown in my previous code excerpts]

Is this a problem? My understanding is that without wrapping the JS like this, how would a SWFObject being created in the lightbox placeholder for lightbox css to manipulate with?


4). How to use playerReady()? what's the "obj" that passed in to the method in my case?

function playerReady(obj)
{
player = document.getElementById(obj.id);
};


5). Again, I cannot make playerReady(obj) work without passing the right obj value.

6). I do need to manipulate the domain name on the client-side at the moment when the lightbox open link/button is clicked, e.g. I need to change the domain name from "myserver" to "myserver-1". I figure that the only way to do this is to find the player element by document.getElementById("flashObject1"), then use innerHTML() on the object to get the code. This approach works for FF, but IE(7)'s innerHTML returns something that is populated by the browser, and with the url to the movie itself removed from the code :-(.

For example, the code returned would become something like this:
<OBJECT id=flashObject1 height=411 width=457 classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000><PARAM NAME=_cx VALUE=5080><PARAM NAME=_cy VALUE=5080><PARAM NAME=FlashVars VALUE=><PARAM NAME=Movie VALUE=http://myserver/player.swf><PARAM NAME=Src VALUE=http://myserver/player.swf><PARAM NAME=WMode VALUE=Window><PARAM NAME=Play VALUE=-1><PARAM NAME=Loop VALUE=-1><PARAM NAME=Quality VALUE=High><PARAM NAME=SAlign VALUE=><PARAM NAME=Menu VALUE=-1><PARAM NAME=Base VALUE=><PARAM NAME=AllowScriptAccess VALUE=><PARAM NAME=Scale VALUE=ShowAll><PARAM NAME=DeviceFont VALUE=0><PARAM NAME=EmbedMovie VALUE=0><PARAM NAME=BGColor VALUE=><PARAM NAME=SWRemote VALUE=><PARAM NAME=MovieData VALUE=><PARAM NAME=SeamlessTabbing VALUE=1><PARAM NAME=Profile VALUE=0><PARAM NAME=ProfileAddress VALUE=><PARAM NAME=ProfilePort VALUE=0><PARAM NAME=AllowNetworking VALUE=all><PARAM NAME=AllowFullScreen VALUE=false></OBJECT>

Note: it contains two param "movie" and "src" with the same value of the url to the player.swf, but the url to myvideo.flv is totally removed.

Any ideas on why the code is modified by IE so much and how I can go around manipulating the code embedded between <object> in IE?

Thanks much in advance!

JW Player

User  
0 rated :

_But just to understand swfobject and the issues raised by brokenString (Apr. 23):

1) the <embed> code is populated by the JS code: I believe it happened when the JS executes: so0.write("flashcontent1")_

SWFObject v1.5 & swfobject v2.1 write code in an object element with some conditionals for Internet Explorer. swfobject v2.2 doesn't write the conditionals, so it's highly recommended as an upgrade. (Still Beta, but it works flawlessly.)

_2). swfobject.js v1.5 is loaded in the head element of the HTML page._

OK

_3). I don't understand what this means:
" Don't wrap the JavaScript in ANY HTML element."

This is a lightbox implementation, and the JS is wrapped between
<div style="top: 20%; left: 30%;" id="lightbox-box1">
<a class="close" id="lightbox-close1" href="#">close</a>
<div id="flashcontent1">

and
<a id="lightbox-loop1" href="javascript:void(0)"></a>
</div>

[as shown in my previous code excerpts]

Is this a problem? My understanding is that without wrapping the JS like this, how would a SWFObject being created in the lightbox placeholder for lightbox css to manipulate with?_

Sometimes, you have to place the JavaScript wherever the developer of the auxiliary function designates. The general rule of never wrapping JavaScript in any HRML element still hilds.

_4). How to use playerReady()? what's the "obj" that passed in to the method in my case?

function playerReady(obj)
{
player = document.getElementById(obj.id);
};_

The player calls the function playerReady() when it is almost ready (the player is instantiated, the playlist may not be finished loading). The "obj" variable is a JavaScript reference object containing the player's id and some other stuff. The code that you have is all that you need.

_5). Again, I cannot make playerReady(obj) work without passing the right obj value._

The obj.id in the "obj" object comes from the object code that SWFObject writes. In your case it is "flashObject1".

_6). I do need to manipulate the domain name on the client-side at the moment when the lightbox open link/button is clicked, e.g. I need to change the domain name from "myserver" to "myserver-1". I figure that the only way to do this is to find the player element by document.getElementById("flashObject1"), then use innerHTML() on the object to get the code. This approach works for FF, but IE(7)'s innerHTML returns something that is populated by the browser, and with the url to the movie itself removed from the code :-(.

For example, the code returned would become something like this:
<OBJECT id=flashObject1 height=411 width=457 classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000><PARAM NAME=_cx VALUE=5080><PARAM NAME=_cy VALUE=5080><PARAM NAME=FlashVars VALUE=><PARAM NAME=Movie VALUE=http://myserver/player.swf><PARAM NAME=Src VALUE=http://myserver/player.swf><PARAM NAME=WMode VALUE=Window><PARAM NAME=Play VALUE=-1><PARAM NAME=Loop VALUE=-1><PARAM NAME=Quality VALUE=High><PARAM NAME=SAlign VALUE=><PARAM NAME=Menu VALUE=-1><PARAM NAME=Base VALUE=><PARAM NAME=AllowScriptAccess VALUE=><PARAM NAME=Scale VALUE=ShowAll><PARAM NAME=DeviceFont VALUE=0><PARAM NAME=EmbedMovie VALUE=0><PARAM NAME=BGColor VALUE=><PARAM NAME=SWRemote VALUE=><PARAM NAME=MovieData VALUE=><PARAM NAME=SeamlessTabbing VALUE=1><PARAM NAME=Profile VALUE=0><PARAM NAME=ProfileAddress VALUE=><PARAM NAME=ProfilePort VALUE=0><PARAM NAME=AllowNetworking VALUE=all><PARAM NAME=AllowFullScreen VALUE=false></OBJECT>

Note: it contains two param "movie" and "src" with the same value of the url to the player.swf, but the url to myvideo.flv is totally removed.

Any ideas on why the code is modified by IE so much and how I can go around manipulating the code embedded between <object> in IE?_

UnknownI'm not familiar with the inner workings of lightbox. SWFObject should be writing your three flashvars in the object element that it creates.

JW Player

User  
0 rated :

thanks for the info. i will upgrade to 2.2.

JW Player

User  
0 rated :

Hi there,

Sorry to ask these basic questions, but I have been trying many ways without success for the last couple of days - I am trying to use SWFObject2.2 and the dynamic pulishing method:

#1. How to specify the player URL? Is it still player.swf or test.swf? Is there a new player packaged with v2.2 or v2.1 that is different from that in v1.5? I use "data" to specify my own video URL, but I can't find the API for specifying the player URL.

#2. How do I specify a start image for my video? I tried the old variable (v1.5) "image", but that does not work.

#3. Last, where can I find a complete document on SWFObject2.2? Most docs assume that you are familiar with SWFObject2.1, but I am upgrading from SWFObject1.5 directly. Even for v2.1, I still can't find a detailed and complete document, including a list of what variables belong to attribute object, param obj, and flashvars respectively, and how things work, e.g. what's the difference between embedSWF and createSWF.

Thanks for any help in advance!

JW Player

User  
0 rated :

#1 You can name the Flash movie anything that you want as long as the filename that you use in your code matches the filename on your server. The API has absolutely nothing to do with the Flash movie name.(WhoopDeeDoo.swf is valid.)

#2 The documentation for the v4.x supported flashvars is here: *http://developer.longtailvideo.com/trac/wiki/FlashVars*

#3 Use Google *http://www.google.com/search?hl=en&q=Google+Code+swfobject&aq=f&oq=*

#4 Read the Publisher tutorials linked from this page and the Developer tutorials here: *http://developer.longtailvideo.com/trac/*

JW Player

User  
0 rated :

Hi Rick,

Thanks much for the refs! they are very helpful.

Now I run into a problem with v2.2 that my my simple dhtml code has stopped working - the "Close" link has stopped responding.

The following code is in the BODY:

<div style="top: 20%; left: 30%;" id="lightbox1">
<a class="close" id="lightbox-close1" href="#">close</a>
<object data="http://myserver/player.swf" name="flashObject1" id="flashObject1" type="application/x-shockwave-flash" width="560" height="340"><param value="#ffffff" name="bgcolor"><param value="always" name="allowscriptaccess"><param value="image=http://myserver/startframe.jpg&file=http://myserver/myvideo.flv" name="flashvars"></object><script type="text/javascript">var flashvars = {image: "http://myserver/startframe.jpg",file: "http://myserver/myvideo.flv"}; var params = {bgcolor: "#ffffff",allowscriptaccess: "always"}; var attributes = {id: "flashObject1",name: "flashObject1"}; swfobject.embedSWF("http://myserver/player.swf", "flashcontent1","560", "340", "9.0.0",false, flashvars, params, attributes);</script>
</div>

The JS that defines the "Close" link is:

$("#lightbox-close1").click(function () {
alert("closing/hiding the lightbox...");
$("#lightbox-wrap").css({ top:"-10000px", left:"-10000px" });
$("#lightbox-box-new1").css({ top:"-10000px", left:"-10000px" });
$("#content-wrap embed, #content-wrap object").css('visibility', 'visible');
var player1 = document.getElementById("flashObject1");
player1.sendEvent('STOP');
});

The "Close" link used to work with v1.5. But with v2.2, even the alert in the first line of the above function is not being triggered. This makes me think that something may be hanging... FF Error Console does not display any errors/warnings.

Has anyone else experienced a similar problem with v2.2? Any ideas about what may be happening?

Thanks much!

JW Player

User  
0 rated :

When you use swfobject dynamic embedding, you don't need an object element. swfobject will create the object element for the player.

You DO need an HTML element with an id that matches the string that you use here:swfobject.embedSWF("http://myserver/player.swf", *"flashcontent1",*... for swfobject to write the object element to.

Remember that swfobject v2.x COMPLETELY replaces the entire HTML element, so it is common practice to wrap the target element in a container element for styling and positioning with CSS.

bc.. <divstyle="top:20%;left:30%;"id="lightbox1">
<aclass="close"id="lightbox-close1"href="#">close</a>
<divid="flashcontent1">Playerwillappearhere</div>
<scripttype="text/javascript">
varflashvars=
{
file:"http://myserver/myvideo.flv",
image:"http://myserver/startframe.jpg",
id:"flashObject1"
};

varparams=
{
allowscriptaccess:"always"
bgcolor:"#ffffff"
};

varattributes=
{
id:"flashObject1",
name:"flashObject1"
};

swfobject.embedSWF("http://myserver/player.swf","flashcontent1","560","340","9.0.124",false,flashvars,params,attributes);
</script>
</div>




TheJSthatdefinesthe"Close"linkis:
bc.. $("#lightbox-close1").click(function()
{
alert("closing/hidingthelightbox...");
$("#lightbox-wrap").css({top:"-10000px",left:"-10000px"});
$("#lightbox-box-new1").css({top:"-10000px",left:"-10000px"});
$("#content-wrapembed,#content-wrapobject").css('visibility','visible');
varplayer1=document.getElementById("flashObject1");
player1.sendEvent('STOP');
}
);



JW Player

User  
0 rated :

Hi there,

I've finally made it work by avoiding using .innerHTML to manipulate the embedded code.

The call back methods are really easy to use with v2.2. :-)

Thanks for your help along the way!

JW Player

User  
0 rated :

Hi All,

I have problem with player,sendEvent("STOP") in IE7.
I have added "id" var to flash vars and I am initializing playerReady in appropriate way. My goal is to stop current video player in my slider when another starts playing

Could you plase look into my page - http://rvesyliv.byethost31.com/ All video player related code is located in video.js

Thanks in advance!

JW Player

User  
0 rated :


Change:
bc.. itemPlayer.sendEvent('STOP', 'true');




to:bc.. itemPlayer.sendEvent('STOP');



JW Player

User  
0 rated :

Hi Chugger,

Thank you for your quick answer!
Currently your solution doesn't fix my problem.
Before line of code pointed by you is executing - exception is throwing.
When line of code
playlist = itemPlayer.getPlaylist();
is executing - exception is throwing with empty description and number -2147467259 in IE 7/8

Could you help me with this one?

Thanks, Ruslan

JW Player

User  
0 rated :


I'm guessing that you are trying to stop any player that is playing, except the currently-selected player...

This page does that:

*http://willswonders.myip.org:8074/player5/Ruslan-2.html*

JW Player

User  
0 rated :

Hi Chugger,
Could you please resume link?
Can you advise me what is wrong in my js code / html. My solution is working in FF/Chrome but I can figure out why that is not working in IE 7/8

rgds, ruslan

JW Player

User  
0 rated :

Hi Chugger,
Could you please resume link?
Can you advise me what is wrong in my js code / html. My solution is working in FF/Chrome but I can figure out why that is not working in IE 7/8

rgds, ruslan

JW Player

User  
0 rated :

please see - *http://www.jeroenwijering.com/?item=Javascript_API_Examples*
for example code like - *http://home5.inet.tele.dk/nyboe/flash/mediaplayer4/JW_API_xmpl_5-1-0-0.html*
please note the examples use swfobject v.2.1 - *http://code.google.com/p/swfobject/*

JW Player

User  
0 rated :

in jw flvplayer i play the swf video ....now i want to play the next video automatically.... but i cant detect the first video is stop ....then how to detect the first video is stoped...

Ethan Feldman

JW Player Support Agent  
0 rated :

@rahul – You can set the repeat flashvar to list to do this. Note – the player does not play swf files.

This question has received the maximum number of answers.