[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 » Fri Jun 17, 2011 5:14 am

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: 13391
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Fri Jun 17, 2011 4:14 pm

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 » Fri Jun 17, 2011 11:03 pm

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 » Fri Jun 17, 2011 11:16 pm

Same problem under Windows XP SP3 (VirtualBox)

Marsianin
Posts: 193
Joined: Sun Sep 25, 2005 11:03 pm

Post by Marsianin » Sun Jun 19, 2011 11:50 pm

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: 13391
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Mon Jun 20, 2011 4:17 pm

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 » Mon Jun 20, 2011 7:23 pm

But compiled EXE produces same errors on other systems.

Marsianin
Posts: 193
Joined: Sun Sep 25, 2005 11:03 pm

Post by Marsianin » Tue Jun 21, 2011 12:40 am

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 » Tue Jun 21, 2011 5:34 am

Just tried on fresh Delphi XE installation - SAME PROBLEM :shock:

Marsianin
Posts: 193
Joined: Sun Sep 25, 2005 11:03 pm

Post by Marsianin » Wed Jun 29, 2011 7:35 am

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: 182
Joined: Wed Jan 18, 2012 6:22 pm

Post by alexandreq » Thu Feb 09, 2012 11:01 am

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: 13391
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Thu Feb 09, 2012 8:24 pm

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: 182
Joined: Wed Jan 18, 2012 6:22 pm

Post by alexandreq » Thu Feb 09, 2012 11:15 pm

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: 13391
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Fri Feb 10, 2012 3:04 pm

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 » Mon Feb 13, 2012 8:42 pm

You are very generous

Thank you for your efforts

Post Reply