It is currently Thu Feb 23, 2012 2:48 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: swfobject.getObjectById("WSplayer").JS_PlayVideo
PostPosted: Mon Mar 14, 2011 2:15 pm 
Offline
Guest

Joined: Mon Mar 14, 2011 1:57 pm
Posts: 1
Hi all,
I buy our player product some time ago.

I try to use this function

omissis ...

function load_video() {
swfobject.getObjectById('WSplayer').JS_PlayVideo('/video/video.flv');
}

omissis ...

<body id="page1" onload="load_video()">
...
</body>
</html>

to play video when load a page.html.
In many cases when I load the pagae.html I get the following error and I see the default video specify on the playlist instead of '/video/video.flv':

swfobject.getObjectById("WSplayer").JS_PlayVideo is not a function

Line 33

I search on the internet but I not fiind any solution.
It's seems that player hasn't yet been loaded at the time I'm trying to use it. There is a special callback function that will be fired automatically as soon as it is loaded?

Best regards
_s_


Top
 Profile  
 
 Post subject: Re: swfobject.getObjectById("WSplayer").JS_PlayVideo
PostPosted: Mon Mar 14, 2011 2:26 pm 
Offline
Customer
User avatar

Joined: Wed May 12, 2010 10:49 am
Posts: 108
Hi,
can you publish a testing page and send me a link.

I will help.

Please send it via http://www.webstunning.com/support/

_________________
Big Nik
WebStunning stuff


Top
 Profile  
 
 Post subject: Re: swfobject.getObjectById("WSplayer").JS_PlayVideo
PostPosted: Mon Oct 17, 2011 9:47 am 
Offline
Guest

Joined: Mon Oct 17, 2011 9:25 am
Posts: 1
Thanks for the detailed reply. I could finally fix my problem. This helped me a lot.:)


Top
 Profile  
 
 Post subject: Re: swfobject.getObjectById("WSplayer").JS_PlayVideo
PostPosted: Wed Oct 19, 2011 12:05 pm 
Offline
Customer

Joined: Wed Oct 19, 2011 9:54 am
Posts: 2
Hi,

could you post the solution here? It might help me cause I have a similar problem:

I am using WSPlayer to only play files from a uri-list I fetched from a server side script before. First I had the same problem of the player object being undefined. I managed to solve this by checking if the player object is present before starting to play. That helped a lot, but still it happens that the video i passed to play can't be started. the player just doesn't react to pressing the play button. And the video never starts automatically, what it theoretically should and does, when i pass a second video after the first.

Also I have a basic question: I am using a dummy video in the playlist atm cause it seems you can't integrate the FLVPlayer without a video present. Did I oversee something, is there a possibility to start the player without a playlist and any video, if I want to pass the videos via the player object later?

I posted this as a reply to this thread cause I think its possible the solution Franci helped could solve all my problems, too. I hope an admin looks through this post anyway. If I don't get a response it might be I will open a new Topic, cause I think no one read it. So please don't blame me for that then. 8-)

My Code is found here: http://www.thomasstark.info/web/frank/v ... index.html
Its a bit complicated, cause I also have a Gallery and a lot of unrelated Javascript code plus an AJAX call in there. Don`t hesitate to ask, if a simpler example page could help...

Cheers,
butters.


Top
 Profile  
 
 Post subject: Re: swfobject.getObjectById("WSplayer").JS_PlayVideo
PostPosted: Wed Oct 19, 2011 12:51 pm 
Offline
Customer
User avatar

Joined: Wed May 12, 2010 10:49 am
Posts: 108
Hi,
1. The player should have at least 1 video in the playlist. Unfortunately current version won't work without any video.

2. Possibly you are trying to start a video before the player is loaded completely. You can use flashEvent to make sure that player is ready to work, e.g.

function flashEvent(e){
if(e.event=="playerIsReady"){
alert("Now you can use JS_PlayVideo");
}
}

Add this function to your page.
Replace the alert with the " JS_PlayVideo" function.

_________________
Big Nik
WebStunning stuff


Top
 Profile  
 
 Post subject: Re: swfobject.getObjectById("WSplayer").JS_PlayVideo
PostPosted: Wed Oct 19, 2011 1:13 pm 
Offline
Customer

Joined: Wed Oct 19, 2011 9:54 am
Posts: 2
Ahh, its that simple!!!!
Thanks a lot, seems to work fine!


Top
 Profile  
 
 Post subject: Re: swfobject.getObjectById("WSplayer").JS_PlayVideo
PostPosted: Wed Oct 19, 2011 1:18 pm 
Offline
Customer
User avatar

Joined: Wed May 12, 2010 10:49 am
Posts: 108
Yes,
that's simple.

More info about "flashEvent" function:

http://webstunning.com/flv-player/tutor ... ashevents/

_________________
Big Nik
WebStunning stuff


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 Flash Video Player    FLV Player    FLV Player Tutorial    FLV player Demos    FLV Player Skins    FLV Player Download
 Flash Photo Gallery    Photo Gallery Tutorial    Photo Gallery Demos    Photo Gallery Download   

cron