This is a message.

a way to avoid blocks ({}) in flashvars? Created Jul 1, 2009

This thread is solved

Views: 3887     Replies: 6     Last reply Dec 21, 2011  
You must login first before you can use this feature

dimivi

Posts: 5

Registered:
May 29, 2009

a way to avoid blocks ({}) in flashvars?

Posted: Jul 1, 2009

the embed plugin produces a param with name flashvars containing the configuration for the player, using json like blocks, example:

<param name="flashvars" value='config={"clip":{"autoPlay":false,"scaling":"fit","url":"/video.flv"},"plugins":{"controls":null},"playlist":[{"autoPlay":false,"scaling":"fit","url":http://www.video.com/video.flv"}]}' />

is there a way to avoid these blocks? an alternative way to embed? i have a commercial licence which i bought just to be able to offer video embeding for some blogs and it does not work because the wysiwyg editor messes the blocks and breaks it, they look ugly just being there anyways...

i have seen other flash players (mogulus for webtv) passing configuration options as get variables to the swf on embed, which flowplayer does too for the licence key, can player config options be passed this way too?

dimivi

Posts: 5

Registered:
May 29, 2009

» a way to avoid blocks ({}) in flashvars?

Posted: Jul 6, 2009

Reply to: a way to avoid blocks ({}) in flashvars?, from dimivi
also,


value='config={
"clip":{"autoPlay":false,"scaling":"fit","url":"/video.flv"},
"plugins":{"controls":null}}'

is not standards compliant, the first problem which i'm not too sure about is that value='' is illegal, should be value=""

the main problem though is that in such attributes you must use html entities for characters like "" to validate and work properly everywhere, thus the correct format would be something like

value='config={"clip":{"autoPlay":false,"scaling":"fit" .... etc

which is exactly what tinymce transforms it to and breaks things. just toggling the quotes can make it right and makes no difference in functionality


value="config={
'clip':{'autoPlay':false,'scaling':'fit','url':'/video.flv'},
'plugins':{'controls':null}}"

phs08263

Posts: 3

Registered:
Jul 8, 2009

» » a way to avoid blocks ({}) in flashvars?

Posted: Jul 15, 2009

Reply to: » a way to avoid blocks ({}) in flashvars?, from dimivi
I have also encountered this problem, is there any solution?

patrick.hawley

Posts: 8

Registered:
Oct 26, 2011

» » a way to avoid blocks ({}) in flashvars?

Posted: Dec 21, 2011

Reply to: » a way to avoid blocks ({}) in flashvars?, from dimivi
dimivi, we were having the exact same problem (TinyMCE horking the single quotes in the embeds) and swapping the single and double quotes did the trick!

Thanks so much for the tip!

Anssi
Flowplayer Flash & video streaming developer

Posts: 1197

Registered:
Jul 24, 2007

» a way to avoid blocks ({}) in flashvars?

Posted: Jul 15, 2009

Reply to: a way to avoid blocks ({}) in flashvars?, from dimivi
It should also work if you pass the config object in the query string:


flowplayer.swf?config={ ....

Anssi

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1868

Registered:
Nov 16, 2007

» » a way to avoid blocks ({}) in flashvars?

Posted: Jul 15, 2009

Reply to: » a way to avoid blocks ({}) in flashvars?, from Anssi
nice! I didn't even know that.