A question about playing flash contents redirected | developer.brewmp.com A question about playing flash contents redirected | developer.brewmp.com

Developer

A question about playing flash contents redirected

Hello.

I'm developing the App using Flash API.

I use IFlashPlayer_LoadURL() to play flash contents.

Some of them are played well, but some which redirect aren't played.

I think BrewMP need to handle Flash contents redirected.

There is log I add and BrewMP print.
It looks that the platform requests a redirected content after receiving 302/303 reponse(redirect).
After that, it receives 200 response(OK), but a error with StreamReq_StreamOpened() occurs.
=========================================

06:48:44:488 *dbgprintf*:0 - [PB6][FLASH][CheckURL]== URL == http://www.malltb.com/video/player/type/malltb/id/87989703/loc/static/autoplay/true/volume/70?

06:48:44:488 *dbgprintf*:0 - [PB6][FLASH][OnStart]== URL == http://www.malltb.com/video/player/type/malltb/id/87989703/loc/static/autoplay/true/volume/70?

06:48:44:488 pl_IFlash.cpp:265 - [P6][pl_IFlash_SetData][Start]

06:48:44:926 AEEHTTP.c:1525 - Making a new peek 82e5598 for webconn 82D3BF0
06:48:44:926 AEEHTTP.c:1826 - Reaching HTTP read response! nchunk=0
06:48:44:926 AEEHTTP.c:1578 - got line : , size = 0, rv = fffffffe

06:48:45:082 AEEHTTP.c:1578 - got line : HTTP/1.1 302 Found, size = 18, rv = 4
06:48:45:082 AEEHTTP.c:1578 - got line : Date: Fri, 05 Feb 2010 06:37:10 GMT, size = 35, rv = 4
06:48:45:082 AEEHTTP.c:1578 - got line : Server: Apache/2.2.8 (Unix) PHP/5.2.6 mod_ssl/2.2.8 OpenSSL/0.9.8g, size = 66, rv = 4
06:48:45:082 AEEHTTP.c:1578 - got line : X-Powered-By: PHP/5.2.6, size = 23, rv = 4
06:48:45:082 AEEHTTP.c:1578 - got line : Location: http://img.malltb.com/player/malltb.swf?url=http%3A%2F%2Fstream.malltb.com%2Fdata3%2F897%2F879897%2F&uid=87989703&host_upload=http%3A%2F%2Fupload.malltb.com%2F&host_www=http%3A%2F%2Fwww.malltb.com%2F&host_stream=http%3A%2F%2F92955092.
06:48:45:082 AEEHTTP.c:1578 - got line : P3P: CP='CAO PSA CONi OTR OUR DEM ONL', size = 38, rv = 4
06:48:45:082 AEEHTTP.c:1578 - got line : Content-Length: 0, size = 17, rv = 4
06:48:45:082 AEEHTTP.c:1578 - got line : Keep-Alive: timeout=5, max=100, size = 30, rv = 4
06:48:45:082 AEEHTTP.c:1578 - got line : Connection: Keep-Alive, size = 22, rv = 4
06:48:45:082 AEEHTTP.c:1578 - got line : Content-Type: text/html; charset=utf-8, size = 38, rv = 4
06:48:45:098 AEEHTTP.c:1578 - got line : , size = 0, rv = 4
06:48:45:098 AEEHTTP.c:1634 - returning response... code = 302
06:48:45:098 AEEHTTP.c:1372 - making new HTTPConnState for webconn 82D3BF0 on plain o get request...
06:48:45:098 AEEWeb.c:1143 - Best webconn found is : 0x0
06:48:45:098 AEEWeb.c:1158 - making new webconn : 0x8084EF8

06:48:45:395 AEEHTTP.c:1525 - Making a new peek 82e5598 for webconn 8084EF8
06:48:45:395 AEEHTTP.c:1826 - Reaching HTTP read response! nchunk=0
06:48:45:395 AEEHTTP.c:1578 - got line : , size = 0, rv = fffffffe

06:48:45:567 AEEHTTP.c:1578 - got line : HTTP/1.1 200 OK, size = 15, rv = 4
06:48:45:567 AEEHTTP.c:1578 - got line : Connection: close, size = 17, rv = 4
06:48:45:567 AEEHTTP.c:1578 - got line : Expires: Sun, 07 Feb 2010 06:43:13 GMT, size = 38, rv = 4
06:48:45:567 AEEHTTP.c:1578 - got line : Cache-Control: max-age=172800, size = 29, rv = 4
06:48:45:567 AEEWebCommon.c:44 - Could not retrieve /BREW/SysClock/LocalTimeOffset setting, nErr 16
06:48:45:567 AEEHTTP.c:938 - Could not retrieve LocalTimeOffset setting
06:48:45:567 AEEHTTP.c:1578 - got line : Content-Type: application/x-shockwave-flash, size = 43, rv = 4
06:48:45:567 AEEHTTP.c:1578 - got line : Accept-Ranges: bytes, size = 20, rv = 4
06:48:45:582 AEEHTTP.c:1578 - got line : ETag: "754368161", size = 17, rv = 4
06:48:45:582 AEEHTTP.c:1578 - got line : Last-Modified: Mon, 01 Feb 2010 09:54:19 GMT, size = 44, rv = 4
06:48:45:582 AEEHTTP.c:1578 - got line : Content-Length: 86453, size = 21, rv = 4
06:48:45:582 AEEWebCommon.c:44 - Could not retrieve /BREW/SysClock/LocalTimeOffset setting, nErr 16
06:48:45:582 AEEHTTP.c:938 - Could not retrieve LocalTimeOffset setting
06:48:45:582 AEEHTTP.c:1578 - got line : Date: Fri, 05 Feb 2010 06:43:13 GMT, size = 35, rv = 4
06:48:45:582 AEEHTTP.c:1578 - got line : Server: lighttpd/1.4.19, size = 23, rv = 4
06:48:45:582 AEEHTTP.c:1578 - got line : , size = 0, rv = 4
06:48:45:582 AEEHTTP.c:1634 - returning response... code = 200
06:48:45:582 StreamReqMgr.c:790 - ### ERROR: StreamReq_StreamOpened(me, pInfo->lContentLength, pInfo->cpszContentType) | Error=1
=========================================

How can I play the contents??

Thanks.

What is the URL that you are passing to IFlashPlayer_LoadURL()? You should make sure that the URL passed in is for the actual .swf you are trying to load, not a generic http URL.
Hope this helps,
Mike

What is the URL that you are passing to IFlashPlayer_LoadURL()? You should make sure that the URL passed in is for the actual .swf you are trying to load, not a generic http URL.
Hope this helps,
Mike

Hi,
The URL is as below.
http://flvr.pandora.tv/flv2pan/flvmovie.dll/userid=ever_merry&url=200811...
As I mentioned, it is a content which redirects to new URL as below.
http://imgcdn.pandora.tv/gplayer/pandora_EGplayer.swf?userid=ever_merry&...
There are lots of contents which redirect the new URL on the Internet. So if IFlashPlayer_LoadURL() handles them, it might be very useful.
Is there any way to support them with BrewMP??

Hi,
The URL is as below.
http://flvr.pandora.tv/flv2pan/flvmovie.dll/userid=ever_merry&url=200811...
As I mentioned, it is a content which redirects to new URL as below.
http://imgcdn.pandora.tv/gplayer/pandora_EGplayer.swf?userid=ever_merry&...
There are lots of contents which redirect the new URL on the Internet. So if IFlashPlayer_LoadURL() handles them, it might be very useful.
Is there any way to support them with BrewMP??

Although I can understand why you would want FlashLite to handle *all* URLs, that is not how it was designed. FlashLite will handle redirects as long as the root URL was pointing to a .swf file. If the root URL is a generic URL, it will be up to you to load it (you can use IWeb to do this). If it ends up redirecting you to a .swf, you would then handle the redirect by passing the new URL to IFlashPlayer_LoadURL().
Hope this helps,
Mike

Although I can understand why you would want FlashLite to handle *all* URLs, that is not how it was designed. FlashLite will handle redirects as long as the root URL was pointing to a .swf file. If the root URL is a generic URL, it will be up to you to load it (you can use IWeb to do this). If it ends up redirecting you to a .swf, you would then handle the redirect by passing the new URL to IFlashPlayer_LoadURL().
Hope this helps,
Mike

Hi,
I checked IWeb as your guide.
However, I couldn't find a API to get the URL redirected from root URL(If it is generic URL.)
I could only IWeb_GetResponse() which get the web response.
Let me have more information about that.
Thanks.

Hi,
I checked IWeb as your guide.
However, I couldn't find a API to get the URL redirected from root URL(If it is generic URL.)
I could only IWeb_GetResponse() which get the web response.
Let me have more information about that.
Thanks.

You can use IWEB_GetResponseV and, make sure you provide WEBOPT_HEADERHANDLER in your web opts. When the response from the server is received and your header handler function gets called, the "Location" header will contain the URL that you are being redirected to.
Hope this helps,
Mike

You can use IWEB_GetResponseV and, make sure you provide WEBOPT_HEADERHANDLER in your web opts. When the response from the server is received and your header handler function gets called, the "Location" header will contain the URL that you are being redirected to.
Hope this helps,
Mike