duhast wrote:why not have SetGlobalOnLoadExternalResourceHandlerAsyncEx to set handle when flash loads FLV video using a relative path
duhast wrote:Yes,you're right,but i can't handled it,for example,when flash loads two large files,the application raise fatal error.maybe there is a method to use thread like 'SetGlobalOnLoadExternalResourceHandlerEx'.
Code: Select all
procedure TMainForm.GlobalOnLoadExternalResourceHandlerEx(const URL: WideString; Stream: TStream; out bHandled: Boolean)
begin
if URL = 'http://blablabla/videos/video1.flv' then
begin
bHandled := true;
TMyThread.Create(Stream); // this thread writes data to passed TStream
end;
end;
Code: Select all
procedure TMainForm.FlashPlayerControl1LoadExternalResourceAsync(
ASender: TObject; const Path: WideString; out Stream: TStream);
begin
if Path = 'videos\video1.flv' then
Stream := TResourceStream.Create(0, 'FlashVideo', 'FLV');
end;
Return to “Delphi / Builder / VCL Edition”
Users browsing this forum: No registered users and 19 guests