[Demo] How to insert YouTube video in the editor

Demos, code samples. Only questions related to the existing topics are allowed here.
Marsianin
Posts: 193
Joined: Sun Sep 25, 2005 11:03 pm

Post by Marsianin »

Hm, may be there is something else but I'm getting error from Flash10o.ocx...
Maybe some OnClick event produces it?
What TRichViewEdit events should fire when I click some object like this flash one?
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

TRichViewEdit does not assign any events of inserted controls.

Try reproducing this error by placing TShockWaveFlash on a form.
May be there is something wrong with your installation of flash?
Marsianin
Posts: 193
Joined: Sun Sep 25, 2005 11:03 pm

Post by Marsianin »

I dont think there is a problem with installation. Because inserted video works fine.
Anyway I will try to run it on other PC and in other project...
Marsianin
Posts: 193
Joined: Sun Sep 25, 2005 11:03 pm

Post by Marsianin »

Same problem under Windows XP SP3 (VirtualBox)
Marsianin
Posts: 193
Joined: Sun Sep 25, 2005 11:03 pm

Post by Marsianin »

I just tried to reproduce this error in your demo attached to this topic - and this problem exists here too:

Code: Select all

---------------------------
Debugger Fault Notification
---------------------------
Project C:\...\TRichView\YouTube\YouTubePlayer.exe faulted with message: 'stack overflow at 0x74f5e2d4'. Process Stopped. Use Step or Run to continue.
---------------------------
OK   
---------------------------

Code: Select all

---------------------------
Debugger Exception Notification
---------------------------
Project YouTubePlayer.exe raised exception class EInvalidOp with message 'Invalid floating point operation'.
---------------------------
Break   Continue   Help   
---------------------------

Code: Select all

---------------------------
Application Error
---------------------------
Exception EAccessViolation in module Flash10o.ocx at 003889B1.

Access violation at address 61AD89B1 in module 'Flash10o.ocx'. Write of address 00000007.

---------------------------
OK   
---------------------------

Code: Select all

---------------------------
Debugger Exception Notification
---------------------------
Project YouTubePlayer.exe raised exception class EInvalidOperation with message 'Control 'RichViewEdit1' has no parent window'.
---------------------------
Break   Continue   Help   
---------------------------
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I still do not think that this error is related to TRichView.
I think it will be the same if you place this activex on a form.
Marsianin
Posts: 193
Joined: Sun Sep 25, 2005 11:03 pm

Post by Marsianin »

But compiled EXE produces same errors on other systems.
Marsianin
Posts: 193
Joined: Sun Sep 25, 2005 11:03 pm

Post by Marsianin »

Maybe there is something with Delphi 2010 ActiveX implementation?
I'm using Delphi 2010 under Windows 7 x64.
Adobe Flash updated recently but as I said it produces same error on other PC's
Marsianin
Posts: 193
Joined: Sun Sep 25, 2005 11:03 pm

Post by Marsianin »

Just tried on fresh Delphi XE installation - SAME PROBLEM :shock:
Marsianin
Posts: 193
Joined: Sun Sep 25, 2005 11:03 pm

Post by Marsianin »

Downloaded new Flash ActiveX from Adobe. Reinstalled.
Re-imported ActiveX do Delphi and got different ShockwaveFlashObjects_TLB.pas.
Now it works fine. Was flash error. As usual in this crap.
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

Post by alexandreq »

Sergey,

this example is very cool.

You showed how to save it in a file, and what about into a table with DBSRichViewEdit ?
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I do not think that there can be problems using this component in DB controls.
And I just tested it in TSRichViewEdit - it works (may be scaling is not perfect, but videos are played). However, if you use old version of ScaleRichView, I cannot guarantee that this control works properly. In ScaleRichView 4, we have rewritten processing of inserted controls almost completely.
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

Post by alexandreq »

yes,

my doubt is how to save it in db? You gave a code that is inserted on the event RichViewEdit1SaveComponentToFile, but I am not saving the text with youtube into a file, but in db and is it the same process?

Will the code on this event work fine even being into a db?

thanks
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This event is only for saving to HTML. In RVF, the component is saved and loaded without any additional code.
miwan
Posts: 26
Joined: Tue Nov 01, 2011 8:30 pm

Post by miwan »

You are very generous

Thank you for your efforts
Post Reply