google-code-export / flowplayer-core

Automatically exported from code.google.com/p/flowplayer-core
2 stars 0 forks source link

content plugin does not scale images #296

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Quoting RJDynamic from the support channel (I can confirm this):

According to the Content Plugin documentation, I should be able to specify a 
width on my images inside the content plugin. Unfortunately, no matter what I 
do, the image is not scaled.

http://flowplayer.org/plugins/flash/content.html#tags

Based on that page, I should be able to do
<img src="foo" width="100%" />
or
<img src="foo" width="720px" />
or
<img src="foo" width="720" />

-- snip ---

Original issue reported on code.google.com by blacktrashproduct on 2 Jun 2011 at 4:13

GoogleCodeExporter commented 9 years ago
I created 2 demos, one current, one with dev:

http://flowplayer.blacktrash.org/test/issue296.html
http://flowplayer.blacktrash.org/dev/issue296.html

No image scaling. I've also tried via style. Additionally giving a percentage 
makes Flash debugger complain:

Error: Unexpected > encountered (expecting '/' or '*' )
    at com.adobe.serialization.json::JSONTokenizer/parseError()
    at com.adobe.serialization.json::JSONTokenizer/skipComments()
    at com.adobe.serialization.json::JSONTokenizer/skipIgnored()
    at com.adobe.serialization.json::JSONTokenizer/getNextToken()
    at com.adobe.serialization.json::JSONDecoder/nextToken()
    at com.adobe.serialization.json::JSONDecoder/parseObject()
    at com.adobe.serialization.json::JSONDecoder/parseValue()
    at com.adobe.serialization.json::JSONDecoder/parseObject()
    at com.adobe.serialization.json::JSONDecoder/parseValue()
    at com.adobe.serialization.json::JSONDecoder/parseObject()
    at com.adobe.serialization.json::JSONDecoder/parseValue()
    at com.adobe.serialization.json::JSONDecoder()
    at com.adobe.serialization.json::JSON$/decode()
    at org.flowplayer.config::ConfigParser$/http://flowplayer.org/core/internal::parse()
    at org.flowplayer.view::Launcher/createFlashVarsConfig()
    at org.flowplayer.view::Launcher/callAndHandleError()
    at MethodInfo-63()
    at flash.display::DisplayObjectContainer/addChild()
    at org.flowplayer.view::Preloader/initialize()
    at org.flowplayer.view::Preloader/enterFrameHandler()

Original comment by blacktrashproduct on 3 Jun 2011 at 12:19

GoogleCodeExporter commented 9 years ago
It actually works if you use both width and height

a workaround would be to always specify both, but I'm working on a fix ; )

Original comment by jns.fe...@gmail.com on 8 Jun 2011 at 3:08

GoogleCodeExporter commented 9 years ago
it seems the problem is coming from flash initially.
There could be a fix, but I need to speak with anssi as it could take some time.

Original comment by jns.fe...@gmail.com on 8 Jun 2011 at 4:19

GoogleCodeExporter commented 9 years ago
Discussed with Jonas about this. Scaling works if you have both the width and 
the height specified. And sure the JSON parser barks with percent characters - 
a possible way around this is to use external CSS files.

Anyway, I will take a look at improving config parsing to handle these special 
characters.

Original comment by anssip@gmail.com on 12 Jul 2011 at 5:00

GoogleCodeExporter commented 9 years ago
Sure. We just have to document the (remaining) restrictions at some point. At 
the moment it does not work as advertised.

Original comment by blacktrashproduct on 12 Jul 2011 at 5:18

GoogleCodeExporter commented 9 years ago
width and height need to be specified in pixels. Cannot be specified as 
percentages: 
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/Te
xtField.html#htmlText

I will document these for the new site (tm) docs.

Original comment by anssip@gmail.com on 12 Jul 2011 at 6:38

GoogleCodeExporter commented 9 years ago
Is this documented now so ok to close ? 

Original comment by dani...@electroteque.org on 2 Sep 2011 at 3:21

GoogleCodeExporter commented 9 years ago
For the new[tm] site, yes. Will do so for the old[tm] site in a minute.

Original comment by blacktrashproduct on 3 Sep 2011 at 11:16

GoogleCodeExporter commented 9 years ago
will close this now. 

Original comment by dani...@electroteque.org on 26 Jan 2012 at 4:34