I'm trying to disable the control bar completely. The only thing I want is the player with the Play icon in the middle. I dont want any kind of other control at the bottom.
I understand very little about flash but thought this would be easy to do... well I can't figure it out. Any help?
How can I disable controls on the fly. F.e. I want to play first item with controls disabled and the second item with controls enabled. How can I do it without recreating the player?
I faced the next trouble: I used old version of jw flv player and it doesn't work with property <creator>commercial</creator> or <author>commercial</author>. I forgot to say that I load files in runtime with javascript. So, I do this:
it doesn't work - file loading and playing but controls enabled.
I installed last version of media player. And do this:
var player = getPlayer(playerId); player.sendEvent("LOAD", {file: flvFile, author: 'commercial'}); player.sendEvent("PLAY","true");
it works. BUT doesn't work this:
var player = getPlayer(playerId); var obj1 = {file: flvFile1, author: 'commercial'}; var obj2 = {file: flvFile2}; var lst = new Array(obj1, obj2); player.sendEvent("LOAD", lst); player.sendEvent("PLAY","true");
Console says me that player.sendEvent("LOAD", lst); is not a function.
*newPlaylist* must be declared global for it to work in the setTimeout() method.
It's been noted that you must wrap sendEvent in a setTimeout() method for it to work.
Also, in an XSPF playlist, the correct element to use is <creator>commercial</creator> not author.
_Disclaimer: I haven't tested this EXACT code, but it should work. If it doesn't, you can come back here, smack me in the head (figuratively speaking...), and I'll help you fix it.]_
We can't concat objects, only arrays. But I found that works
bc.. newPlaylist = {obj1:obj1,obj2:obj2};
(strange solution but capable)
But I stumble at another problem: I need to play videos exactly one by one, first is first and second is second. But when I refresh the page sometimes second video plays earlier that first one. How can I resolve this?
And any more: after upgrading to media player from flv player API function getUpdate() doesn't work any more. But I need to track start and end playing events. How can I do it now?
May be I didn't notice new manual with new API? I found just this one: http://code.longtailvideo.com/trac/wiki/FlashAPI
I've haven't had any problem concatenating objects:bc.. functionaddPlaylist(newItem) { newItem.duration=''; newItem.type='sound'; varoldList=player.getPlaylist(); varnewList=oldList.concat(newItem); player.sendEvent("LOAD",newList); };
where *newItem* is an object:bc.. addPlaylist({link:'http://www.google.com/', file: 'song2.mp3', title:'Song 2', image:'image02.jpg', author:'Author 2', description:'The Second Song'});
The video order for the v4.x player is set by the flashvar *shuffle* which should be *_false_* by default. Try setting it explicitly.
For examples of the v4.x API, look through recent posts in the *Javascript interaction* forum.
Well, I have the next thing: player v3 (example http://www.expert.ru/scripts/294884/415009/v3.phtml):
works: 1. loading videos in runtime 2. links from display 3. straight videos order
need: 1. disabled controlls on first video (none of author or category or album etc. commercial doesn't work http://code.longtailvideo.com/trac/wiki/Playlists3) 2. link from display pause the video first. Is it possible to relocate immediatelly?
player v4 (example http://www.expert.ru/scripts/294884/415009/v4.phtml):
works: 1. loading videos in runtime 2. 'commercial' property to disable controls
need: 1. working link from display (not from button on control bar), not to pause video on first click 2. straight videos order
I don't care what version of player I'll use, I need just work it right.
I would go with the v4.x player. Be sure that you get the very latest v4.0.46 from: *http://www.jeroenwijering.com/embed.player.swf* or from the Subversion repository at: *http://code.longtailvideo.com/trac/*
It seems to work but again not exactly what I need. I need to play first video with displayclick=link and the second video with displayclick=play. I couldn't find how to make it work right, so I have to reload player. Everything is good except playlist doesn't refreshes. I say exactly in the script to change object in the playlist. Or reload playlist. But it still playing the first video ((
Generally, to change a flashvar, you have to re-instantiate the player.
The exceptions are the flashvars relating to a file (url, author, title, link, etc.) that can be changed by loading a new file.
Now... if you want to make a real mess of things :)set displayclick=link, then in the info element of the second track, put some javascript that starts the player. This will effectively make the displayclick=play for the second track.
I have an issue while implementing playlist, I dont want first video to show specific controls like slider, navigation etc. and want second to show the controls, pls let me know how can this be done and I am using jw player version 5. I tried <creator>commercial</creator> in xml but its not working.