Player APIs
Register  ·  Sign In  ·  Help
Jump to Page:   1
  Reply   Reply  

passing flash config
Options    Options  
mateomtb
Regular Visitor
Posts: 8
Registered: 06-30-2009


mateomtb

Message 1 of 3

Viewed 70 times


Going by the notes at the top of the publish code I can add my player with no issues.

 

This works fine.

 

import BrightcovePlayer; Security.allowDomain("http://c.brightcove.com"); var player:BrightcovePlayer = new BrightcovePlayer(); addChild(player);

 

 

 

 

But if I try to pass the config options, it doesn't work. I can add these configuration paramaters manually in the Publish code to the originalConfig object and it works as expected, so I think I have the syntax correct.

 

 

import BrightcovePlayer; Security.allowDomain("http://c.brightcove.com"); var config = {}; config["@playlistTabs.featured"] =1443772310; config["@videoList.featured"] =46605497001; config.playerID = 8631008001; config.width = 978; config.height = 546; config.isVid = true; var player:BrightcovePlayer = new BrightcovePlayer(config); addChild(player);

 

My goal is to insert my flashvars I'm pulling from a the url into the config object to link directly to a particular video. For now I'm just trying to get config to pass correctly.

 

 

 

 

Kudos!
11-06-2009 02:01 PM
  Reply   Reply  

Re: passing flash config
Options    Options  
Administrator BC-ChrisD
Administrator
Posts: 65
Registered: 12-07-2008


BC-ChrisD

Message 2 of 3

Viewed 27 times


This looks to be one very simple and often overlooked omission:

 

I've attached a template using your numbers and once I added the config.isUI = true line forcing the player to request the additional components required for the playlist tabs and lists it started working.

 

 

config["playerID"] = 8631008001; config["@playlistTabs.featured"] =1443772310; config["@videoList.featured"] = 46605497001; config.width = 978; config.height = 546; config.isVid = true; config.isUI = true;

 

Give that a try and let me know if that was the problem. I've attached my project as well if you want to have a look.

 

 


 

- CDG

 

Attachment exampleFromThread899.zip (11 kb)

Kudos!
11-18-2009 04:28 PM
  Reply   Reply  

Re: passing flash config
Options    Options  
BC-JHuebner
Brightcove Team
Posts: 50
Registered: 01-26-2009


BC-JHuebner

Message 3 of 3

Viewed 25 times


This often occurs when you get a snippet for one player and change the playerID to a player that does not use the same template. Different player templates may require different parameters to load correctly. Especially if one player has a component like a playlist and the other does not.

 

If you want to swap out two players that use the same template, that should be as simple as switching ids.

 

John

 

Kudos!
11-18-2009 04:33 PM
Jump to Page:   1