-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cordova.StreamingMedia.pas
44 lines (35 loc) · 1.06 KB
/
Cordova.StreamingMedia.pas
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
37
38
39
40
41
42
43
44
unit Cordova.StreamingMedia;
interface
uses
W3C.HTML5, W3C.DOM4;
type
TMediaError = procedure(MediaError: JMediaError);
JVideoOptions = class external
successCallback: procedure;
errorCallback: procedure(errMsg: String);
orientation: String;
shouldAutoClose: Boolean;
controls: Boolean;
end;
JAudioOptions = class external
bgColor: String;
bgImage: String;
bgImageScale: String;
initFullscreen: Boolean;
keepAwake: Boolean;
successCallback: procedure;
errorCallback: procedure(errMsg: String);
end;
JStreamingMedia = class external 'streamingMedia'
public
procedure playVideo(url: String); overload;
procedure playVideo(url: String; options: JVideoOptions); overload;
procedure playAudio(url: String); overload;
procedure playAudio(url: String; options: JAudioOptions); overload;
procedure stopAudio; overload;
procedure pauseAudio; overload;
procedure resumeAudio; overload;
end;
var StreamingMedia external 'window.plugins.streamingMedia': JStreamingMedia;
implementation
end.