Autor Beitrag
Andreas95
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: Sa 23.01.10 22:04 
Also mein mediaplayer (tmediaplayer) öffnet ganz normal aber wenn ich play drücke oder mediaplayer1.play benutze dann passiert einfach garnichts. Ich habe schon form1 als display versucht, twebbrowser als display versucht aber nichts funktioniert.
Irgendwelche tips?

edit: also jetzt hab ich mit dem gleichen quelltext hinbekommen das dann eine fehler meldung im animate1 gekommen ist: Video not available, cannot find 'vids:MP42' decompresser.

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
unit Vid;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, MPlayer, OleCtrls, SHDocVw_TLB, StdCtrls;

type
  TForm1 = class(TForm)
    MediaPlayer1: TMediaPlayer;
    Button1: TButton;
    Animate1: TAnimate;
    procedure Button1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
mediaplayer1.FileName := ('C:\0\ok.avi');
mediaplayer1.Open ;
mediaplayer1.Display := animate1;

end;

end.


Zuletzt bearbeitet von Andreas95 am Sa 23.01.10 22:17, insgesamt 1-mal bearbeitet
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19326
Erhaltene Danke: 1749

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 23.01.10 22:16 
Du musst vermutlich Display setzen bevor du das Video öffnest, außerdem sehe ich kein Play. Und TAnimate wird als Display vielleicht gar nicht funktionieren, es ist ja auch nicht dafür gedacht.

Davon abgesehen unterstützt TMediaPlayer kaum Formate, das heißt viele Codecs können nicht damit abgespielt werden. Deshalb ist TMediaPlayer wirklich nur für die allerersten Versuche in Delphi, nicht für ernsthafte Verwendung. Dafür gibt es entweder das echte Windows Media Player Control oder Tools wie das DSPack.
Andreas95 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: Sa 23.01.10 22:23 
Ok hab windows media player benutzt und jetzt funktionierts. Danke.