[Demo] How to play AVI files in editor
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
[Demo] How to play AVI files in editor
- how to play AVI files in editor using TPanel and TMediaPlayer
- how to implement resizing of AVI players
- how to export documents containing AVI players to HTML
- how to allow saving and loading documents containing AVI players in RVF
This demo does not support drag&drop of controls. See here for details:
http://www.trichview.com/forums/viewtopic.php?t=157
Last edited by Sergey Tkachenko on Tue Dec 09, 2008 4:55 pm, edited 1 time in total.
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Sorry for being very brief. Within a table, the resize caused an error. If clicked anywhere other then the panel itself (even outside the table), the resize-procedure is activated thus causing an error. Only when the actual resizing is preformed should the resize-procedure be activated. Could you please check this for me.
Thanks.
Thanks.
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
It looks like TMediaPlayer does not like changing Parent of its Display conntrol.
Use OnItemActionItem to reassign Display:
Use OnItemActionItem to reassign Display:
Code: Select all
procedure TForm1.RichViewEdit1ItemAction(Sender: TCustomRichView;
ItemAction: TRVItemAction; Item: TCustomRVItemInfo; var Text: String;
RVData: TCustomRVData);
var Panel, VideoPanel: TPanel;
Player: TMediaPlayer;
begin
if csDestroying in Sender.ComponentState then
exit;
if (ItemAction=rviaInserted) and (Item.StyleNo=rvsComponent) and
(TRVControlItemInfo(Item).Control is TPanel) then begin
Panel := TRVControlItemInfo(Item).Control as TPanel;
VideoPanel := Panel.Components[0] as TPanel;
Player := Panel.Components[1] as TMediaPlayer;
Player.Display := VideoPanel;
end;
end;
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Create Windows Mediaplayer ActiveX: "Component | Import ActiveX Control", select "Windows Media Player (Version 1.0)", and install it. New control (TWindowsMediaPlayer) will be available in the Component Palette, the page "ActiveX".
Video file name can be specified in URL property. I did not try to insert it in TRichView, but I do not think that there will be problems. It even simpler than the example above, because the control includes both video screen and VCR buttons.
Video file name can be specified in URL property. I did not try to insert it in TRichView, but I do not think that there will be problems. It even simpler than the example above, because the control includes both video screen and VCR buttons.
-
- Posts: 81
- Joined: Mon Aug 29, 2005 5:00 am
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I think it can be done only by creating inherited component with new property, containing media data.
It's something that was done for the Flash ActiveX here:
http://www.trichview.com/forums/viewtopic.php?t=72
It's something that was done for the Flash ActiveX here:
http://www.trichview.com/forums/viewtopic.php?t=72
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
http://www.trichview.com/support/files/ ... ashCPP.zip
It has problems with the flash (see that topic), but may be it will work properly for media player.
It has problems with the flash (see that topic), but may be it will work properly for media player.