MagicFoundation / Alcinoe

Alcinoe Component Library For Delphi. Full opengl video player, WebRTC delphi wrapper, native ios/android TEdit, Improuved firemonkey controls, Firebase cloud messaging, Android/ios facebook sdk login, Json/Bson Parser, ImageMagick wrapper, MongoDb client And much more
Apache License 2.0
967 stars 211 forks source link

RTSP stream #277

Open gonzzzales opened 1 year ago

gonzzzales commented 1 year ago

Is it possible to view rtsp stream from ip-camera using Alcinoe?

Zeus64 commented 1 year ago

hello, you mean in android/ios app ? I guess yes

gonzzzales commented 1 year ago

yes, using mobile platforms. i try to do something like this in AlFMXControl example `procedure TForm1.ALVertScrollBox1ViewportPositionChange(Sender: TObject;const OldViewportPosition, NewViewportPosition: TPointF); begin

if (ALVideoPlayerSurface1.Position.y + ALVideoPlayerSurface1.Height >= NewViewportPosition.Y) and (ALVideoPlayerSurface1.Position.y < NewViewportPosition.Y + height) then begin if ALVideoPlayerSurface1.VideoPlayer.state in [vpsIdle] then begin ALVideoPlayerSurface1.VideoPlayer.setLooping(true); ALVideoPlayerSurface1.VideoPlayer.prepare('rtsp://admin:Nbhfvbce1@showroom.clustersystem.ru:5011/RVi/1/1', True{AutoStartWhenPrepared}); end else if ALVideoPlayerSurface1.VideoPlayer.state in [vpsPrepared, vpsPaused] then ALVideoPlayerSurface1.VideoPlayer.Start else ALVideoPlayerSurface1.VideoPlayer.AutoStartWhenPrepared := true; end else begin if ALVideoPlayerSurface1.VideoPlayer.state in [vpsStarted] then ALVideoPlayerSurface1.VideoPlayer.Pause else ALVideoPlayerSurface1.VideoPlayer.AutoStartWhenPrepared := False; end;

if (ALLayout1.Position.y + ALLayout1.Height >= NewViewportPosition.Y) and (ALLayout1.Position.y < NewViewportPosition.Y + height) then begin ALAniIndicator1.enabled := true; end else begin ALAniIndicator1.enabled := False; end;

if ALMemo1.Position.Y - NewViewportPosition.Y > clientHeight then ALMemo1.RemoveNativeView else ALMemo1.AddNativeView;

if ALRectangle3.Position.Y - NewViewportPosition.Y > clientHeight then ALEdit1.RemoveNativeView else ALEdit1.AddNativeView;

end;`

but i dont see the stream

gonzzzales commented 1 year ago

Please, let me know, if it is possible!!!