PDA

View Full Version : [CLOSED] How to change the FlashParams value



esky98
Oct 30, 2014, 7:36 AM
How to change the FlashParams value and reload the win?


<ext:Window ID="winPlay" runat="server"
Layout="FitLayout"
Height="420"
Width="630" Title="Flash Movie" AutoShow="false" Hidden="true" MaskOnDisable="false" HideMode="Offsets">
<Items>
<ext:FlashComponent
ID="ckplayer_a1"
runat="server" Url="../js/player.swf" SwfWidth="600" SwfHeight="400">
<FlashAttributes>
<ext:Parameter Name="allowfullscreen" Value="true" Mode="Raw" />
</FlashAttributes>
<FlashParams>
<ext:Parameter Name="flashvars" Value="" Mode="Value" />
</FlashParams>
</ext:FlashComponent>
</Items>
</ext:Window>

function OpenFlashPlayWin(command,row) {
var win = App.winPlay;
win.items.items[0].flashParams["flashvars"] = "f=rtmp://10.176.30.7:1935/live|hc8:10.132.146.234:8000:32:0:admin:12345&c=0&b=1";
//win.update();
//win.reload();
//win.items.items[0].doComponentLayout();
win.show();
}

Daniil
Oct 30, 2014, 12:42 PM
Hi @esky98,

Please review the afterRender method of FlashComponent where it takes FlashParams into account.
http://docs.sencha.com/extjs/4.2.1/source/Component6.html#Ext-flash-Component-method-afterRender

The FlashParams are passed to

new swfobject.embedSWF(...);

So, I would recommend to review the Flash API. Probably, there is a way to change in on the fly or, maybe, you'll need to recreate the flash component.