JW Player plugin variables

4 messages Options
Embed this post
Permalink
Ryan

JW Player plugin variables

Reply Threaded More More options
Print post
Permalink
I'm having trouble passing variables to a JW player plugin. The plugin is loading, but if I add the captions.file variable shown below, shadowbox doesn't load. I'm sure it's just a syntax issue, but I'm not sure how to format it. Thanks in advance for any help!

Shadowbox.open({
                          player:  'flv',
                          title:  '$boxtitle',
                          height:  432,
                          width: 768,
                          options: {
                                                flashVars: {
                                                        autostart: true,
                                                        streamer: '$streamer_url',
                                                        file: '$flash_file',
                                                        plugins: 'captions',
                                                        ['captions.file']: '$flash_captions'
                                                        }  
                                  }
                          });
Soundwave

Re: JW Player plugin variables

Reply Threaded More More options
Print post
Permalink
Hey bud,

I recently had the same problem.

Adding single quotes around the flashVar with the . in the middle seemed to work form me...no need to put it in square brackets.

'captions.file': '$flash_captions'

Ryan

Re: JW Player plugin variables

Reply Threaded More More options
Print post
Permalink
@Soundwave

Thank you very much! That syntax works for passing variables to the plugins. Did your code deal specifically with captions? They still don't display in the shadowbox player for me. I've tested that URL I'm passing for the caption file is valid (and the XML is formatted properly - I've tested this outside of shadowbox), captions.swf is in the shadowbox/libraries/mediaplayer folder, and I know the syntax is good because I used the 'hd' plugin as well.

Here's my updated code:

                          Shadowbox.open({
                          player:  'flv',
                          title:  '$boxtitle',
                          height:  432,
                          width: 768,
                          options: {
                                                flashVars: {
                                                        autostart: true,
                                                        streamer: '$streamer_url',
                                                        plugins: 'hd,captions',
                                                        'hd.file': '$flash_file_hd',
                                                        'captions.file': '$flash_captions',
                                                        file: '$flash_file',
                                                        }  
                                  }
                          });

Any ideas on what I might be missing?
Ryan

Re: JW Player plugin variables

Reply Threaded More More options
Print post
Permalink
The captions are working fine now, it was not an issue with Shadowbox. I was pulling the captions from a different server and realized that I hadn't modified the crossdomain.xml file to allow access for my beta server.