hiimnalaa / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

Incorrect version detection in Android WebView #567

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
        if (typeof externalInterface != 'undefined') {
            externalInterface.log(inspect(navigator.plugins));
        }

        var xiSwfUrlStr = "/player_test/playerProductInstall.swf";
        var flashvars = Player.flashVars;
        var params = {
            quality: "high",
            bgcolor: "#000000",
            allowscriptaccess: "always",
            allowfullscreen: "true",
            wmode: "opaque"
        };
        var attributes = {
            id: "osmfProject",
            name: "osmfProject",
            align: "middle"
        };

        var playerUrl = '/player_test/fl_player_htc.swf';

        var playerVersion = swfobject.getFlashPlayerVersion();
        if (typeof externalInterface != 'undefined') {
            externalInterface.log(inspect(playerVersion));
        }

        swfobject.embedSWF(
            playerUrl, "flashContent", 
            "1024", "600", 
            Player.requiredFlashVersion, xiSwfUrlStr, 
        flashvars, params, attributes, Player.embedCallback);
        swfobject.createCSS("#flashContent", "display:block;text-align:left;");

2. Load inside Android WebView component.

What is the expected output? What do you see instead?

Flash embed with set required version fails to load.

D/webview ( 4325): [WebView::UPDATE_SELECTION] ====== start
D/dalvikvm( 4325): GC_CONCURRENT freed 265K, 55% free 3412K/7559K, external 
155K/527K, paused 1ms+12ms
D/skia    ( 4325): createPlugin (300,150) screen 
proportion:(w,h)=(0.292969,0.250000), content ratio:2.000000 mainUrl:http://XXX
I/flashplugin( 4325): NP_Initialize vm=0xabe0 env=0x231568
I/flashplugin( 4325): main gdataDir=/data/data/XXX/app_plugins
I/flashplugin( 4325): #######NPP_New activePlugin=0x515764 instance=0x765178
I/flashplugin( 4325): Plugin::setWindow newWidth=300 newHeight=150 x=0 y=0 
this=0x515760 mTid=4334, url=(null)
I/flashplugin( 4325): Plugin::setWindow newWidth=300 newHeight=150 x=0 y=0 
this=0x515760 mTid=4334, url=(null)
I/flashplugin( 4325): NPP_Destroy instance=0x765178 PluginObject=0x8f7e58 
fPlugin=0x515760
V/Now     ( 4325): { '0': 
V/Now     ( 4325):    { '0': 
V/Now     ( 4325):       { enabledPlugin: [Object],
V/Now     ( 4325):         description: 'Shockwave Flash',
V/Now     ( 4325):         type: 'application/x-shockwave-flash',
V/Now     ( 4325):         suffixes: 'swf' },
V/Now     ( 4325):      '1': 
V/Now     ( 4325):       { enabledPlugin: [Object],
V/Now     ( 4325):         description: 'FutureSplash Player',
V/Now     ( 4325):         type: 'application/futuresplash',
V/Now     ( 4325):         suffixes: 'spl' },
V/Now     ( 4325):      filename: 'libflashplayer.so',
V/Now     ( 4325):      length: 2,
V/Now     ( 4325):      description: 'Shockwave Flash 10.3 r185',
V/Now     ( 4325):      name: 'Shockwave Flash' },
V/Now     ( 4325):   '1': 
V/Now     ( 4325):    { '0': 
V/Now     ( 4325):       { enabledPlugin: [Object],
V/Now     ( 4325):         description: 'HTC flash plugin',
V/Now     ( 4325):         type: 'application/x-shockwave-flash',
V/Now     ( 4325):         suffixes: 'swf' },
V/Now     ( 4325):      filename: 'libflashliteplugin.so',
V/Now     ( 4325):      length: 1,
V/Now     ( 4325):      description: 'Shockwave Flash 10.1 r102',
V/Now     ( 4325):      name: 'Shockwave Flash' },
V/Now     ( 4325):   length: 2 }
V/Now     ( 4325): { major: 10, minor: 1, release: 123 }

What version of the product are you using? On what operating system?
SWFObject 2.2
[ro.product.model]: [HTC Flyer P510e]
[ro.build.version.sdk]: [10]
[ro.build.version.codename]: [REL]
[ro.build.version.release]: [2.3.3]

Please provide any additional information below.
Doesn't reproduce every time.

Original issue reported on code.google.com by kolyuc...@gmail.com on 20 Jun 2011 at 8:22

GoogleCodeExporter commented 9 years ago
Here is the correct output when the bug is not reproduced:

D/webview ( 4430): [WebView::UPDATE_SELECTION] ====== start
D/InputDispatcher( 1504): notifyMotion - eventTime=48445907850401, 
deviceId=0x10002, source=0x1002, policyFlags=0x42000000, action=0x1, flags=0x0, 
metaState=0x0, edgeFlags=0x0, xPrecision=8.936523, yPrecision=11.001667, 
downTime=48445802393084
D/InputDispatcher( 1504):   Pointer 0: id=0, x=477.143036, y=225.693085, 
pressure=0.156863, size=0.270000, touchMajor=25.411766, touchMinor=25.411766, 
toolMajor=162.000000, toolMinor=162.000000, orientation=1.570796
D/InputReader( 1504): dispatchTouches(UP): PtrID=0, Ev=1 (up is 1, pt_up is 6)
D/InputDispatcher( 1504): Dispatch MotionEvent [action=1] ToCurrentInputTarget: 
40a6ec10 ru.now.video/ru.now.video.Now (server)
D/ActivityManager( 1504): isSketcherDisabledInCurrentTask():false, 
HistoryRecord{40937818 ru.now.video/.Now}
D/dalvikvm( 4430): GC_CONCURRENT freed 1096K, 54% free 3297K/7047K, external 
77K/527K, paused 1ms+2ms
V/Performance( 4430): >>android.app.ActivityThread@4051b390 getPackageInfo
V/Performance( 4430): <<android.app.ActivityThread@4051b390 getPackageInfo, 1ms
I/PluginManager( 4430): PluginManager add: 
/system/lib/plugins/com.htc.flashliteplugin
V/Performance( 4430): >>android.app.ActivityThread@4051b390 getPackageInfo
V/Performance( 4430): <<android.app.ActivityThread@4051b390 getPackageInfo, 1ms
I/PluginManager( 4430): PluginManager add: /data/data/com.adobe.flashplayer/lib
D/skia    ( 4430): createPlugin (300,150) screen 
proportion:(w,h)=(0.292969,0.250000), content ratio:2.000000 mainUrl:http://XXX
V/Now     ( 4430): { '0': 
V/Now     ( 4430):    { '0': 
V/Now     ( 4430):       { enabledPlugin: [Object],
V/Now     ( 4430):         description: 'Shockwave Flash',
V/Now     ( 4430):         type: 'application/x-shockwave-flash',
V/Now     ( 4430):         suffixes: 'swf' },
V/Now     ( 4430):      '1': 
V/Now     ( 4430):       { enabledPlugin: [Object],
V/Now     ( 4430):         description: 'FutureSplash Player',
V/Now     ( 4430):         type: 'application/futuresplash',
V/Now     ( 4430):         suffixes: 'spl' },
V/Now     ( 4430):      filename: 'libflashplayer.so',
V/Now     ( 4430):      length: 2,
V/Now     ( 4430):      description: 'Shockwave Flash 10.3 r185',
V/Now     ( 4430):      name: 'Shockwave Flash' },
V/Now     ( 4430):   '1': 
V/Now     ( 4430):    { '0': 
V/Now     ( 4430):       { enabledPlugin: [Object],
V/Now     ( 4430):         description: 'HTC flash plugin',
V/Now     ( 4430):         type: 'application/x-shockwave-flash',
V/Now     ( 4430):         suffixes: 'swf' },
V/Now     ( 4430):      filename: 'libflashliteplugin.so',
V/Now     ( 4430):      length: 1,
V/Now     ( 4430):      description: 'Shockwave Flash 10.1 r102',
V/Now     ( 4430):      name: 'Shockwave Flash' },
V/Now     ( 4430):   length: 2 }
V/Now     ( 4430): { major: 10, minor: 3, release: 185 }
I/PowerManager( 1504): Wakelock "KEEP_SCREEN_ON_FLAG" acquires a lock. It's not 
refcounted.
D/skia    ( 4430): createPlugin (1024,600) screen 
proportion:(w,h)=(1.000000,1.000000), content ratio:1.706667 mainUrl:http://XXX

Original comment by kolyuc...@gmail.com on 20 Jun 2011 at 8:37

GoogleCodeExporter commented 9 years ago
Well, I guess it's Flash issue, not SWFObject. And with the most recent update 
of FP version 10.3.185.24 I'm not seeing this behaviour. So this issue can be 
closed.

Original comment by kolyuc...@gmail.com on 27 Jun 2011 at 9:01

GoogleCodeExporter commented 9 years ago
Thanks for the information. We will be keeping an eye on version detection on 
the Android platform.

Original comment by platelu...@gmail.com on 27 Jun 2011 at 4:25