Revision eb5122a3

View differences:

Makefile
5 5
GRAPES=Libs/GRAPES
6 6
NET_HELPER=Libs/pstreamer/Lib/net_helper
7 7

  
8
CFLAGS+=-Isrc/ -ILibs/mongoose/ -ILibs/pstreamer/include -I$(NET_HELPER)/include -I$(GRAPES)/include -L$(GRAPES)/src -L$(NET_HELPER)/  -LLibs/pstreamer/src 
8
CFLAGS+=-Isrc/ -ILibs/mongoose/ -ILibs/pstreamer/include -I$(NET_HELPER)/include -I$(GRAPES)/include -L$(GRAPES)/src -L$(NET_HELPER)/  -LLibs/pstreamer/src -DMG_ENABLE_SSL -DMG_SSL_IF=MG_SSL_IF_OPENSSL
9 9
ifdef DEBUG
10 10
CFLAGS+=-g -W -Wall -Wno-unused-function -Wno-unused-parameter -O0
11 11
else
......
13 13
endif
14 14

  
15 15
LIBS+=Libs/mongoose/mongoose.o $(GRAPES)/src/libgrapes.a Libs/pstreamer/src/libpstreamer.a
16
MONGOOSE_OPTS+=-DMG_DISABLE_MQTT -DMG_DISABLE_JSON_RPC -DMG_DISABLE_SOCKETPAIR  -DMG_DISABLE_CGI # -DMG_DISABLE_HTTP_WEBSOCKET
17
LDFLAGS+=  -lpstreamer -lgrapes -lnethelper -lm
16
MONGOOSE_OPTS+=-DMG_ENABLE_SSL -DMG_DISABLE_MQTT -DMG_DISABLE_JSON_RPC -DMG_DISABLE_SOCKETPAIR  -DMG_DISABLE_CGI # -DMG_DISABLE_HTTP_WEBSOCKET
17
LDFLAGS+=  -lpstreamer -lgrapes -lnethelper -lm -lssl -lcrypto
18 18

  
19 19
all: $(EXE) Tools/janus/bin/janus
20 20

  
Public/assets/mysource.js
55 55
	janus_plugin.createOffer(
56 56
		{
57 57
			// Add data:true here if you want to publish datachannels as well
58
			media: { audioRecv: false, videoRecv: false, audioSend: useAudio, videoSend: true },	// Publishers are sendonly
58
			media: { video: 'screen', audioRecv: false, videoRecv: false, audioSend: useAudio, videoSend: true },	// Publishers are sendonly
59 59
			// If you want to test simulcasting (Chrome and Firefox only), then
60 60
			// pass a ?simulcast=true when opening this demo page: it will turn
61 61
			// the following 'simulcast' property to pass to janus.js to true
Public/key.pem
1
-----BEGIN PRIVATE KEY-----
2
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC1azFyR5LzxH4J
3
MYPkN0aawv+UWmP3xY1jnnESm58DKBOYA3MQN4fGplCigvUHAgiI0aKQlvPtdj8V
4
o9ZkUH0M5rySQVjjjBtCTJckx8vx70BGV0cmSaUZRTcjNGYaDf5FwM6/llwixdws
5
0jEjkGH5BGYd/l68MhQx2/f0TmlJIZGmw2nglJRR1jg3+AGtTHhD3j88YCGer2YM
6
kYriUJ8C+7geEAn7qJxA2IdlO26m/rPKU6FDQ7flQn16ACU8CQZ1+M8A9JOcMvJt
7
9WNdBgdDOkdrimWrj8lVaWL/Sg1WOlPy/2oelE+BgOEs7DhhP0uleMOTzwOJCkyo
8
+fa5D4NzAgMBAAECggEAGTDFMOUXVpnWFli1w56ZQywIaQUUFHdt5oM9mCPbtIiA
9
D/+KnpnXVJILaEVe2JZDsRvKwuDzBeoBYHPbdRpoAr6XOIeyXAY8Urxn0Eed3f4m
10
op3D12Eqd5PQ0CaadsuynuTi0F+Ec5+druuQvytxLy6ZL1j+tosNms68Y0PwAqNW
11
mShbF5Lh0INnw67XFVcCA0GlCYBMHpk2WGqNMny8iGtr+vAgOHQYhaKeYtLxFjJB
12
U5RTEoG8LgUamrcH88a5M7cn7qsWcLy0V0r5gXvvGj+k23v/t1SvEbulL7fYrR1F
13
RDhwkFcuMB0SWdJY70BJY+ooVVjnjJmgJVXyRH71oQKBgQDpNatUf1cvbv03Ka04
14
y4McdCc7vNjOuEPwlQC2TyzR2WcZWY0m6FUiX8e3lu2ykKYbLbH7B4D+5qOSkjc9
15
T5yWnpKy49nGmD+fk0SfMwaecAEg7NkI99XXh+AA8vEnwP0j8WyMnC616fzHE1zJ
16
Phi0TRh5JtqpWrDC4fF9jdt6JwKBgQDHJde19WIJ+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AQUAA4IBDwAwggEKAoIBAQC1azFyR5LzxH4J
7
MYPkN0aawv+UWmP3xY1jnnESm58DKBOYA3MQN4fGplCigvUHAgiI0aKQlvPtdj8V
8
o9ZkUH0M5rySQVjjjBtCTJckx8vx70BGV0cmSaUZRTcjNGYaDf5FwM6/llwixdws
9
0jEjkGH5BGYd/l68MhQx2/f0TmlJIZGmw2nglJRR1jg3+AGtTHhD3j88YCGer2YM
10
kYriUJ8C+7geEAn7qJxA2IdlO26m/rPKU6FDQ7flQn16ACU8CQZ1+M8A9JOcMvJt
11
9WNdBgdDOkdrimWrj8lVaWL/Sg1WOlPy/2oelE+BgOEs7DhhP0uleMOTzwOJCkyo
12
+fa5D4NzAgMBAAGjUDBOMB0GA1UdDgQWBBQYXUDuwKuae0jsHkls5zJnKWpA1TAf
13
BgNVHSMEGDAWgBQYXUDuwKuae0jsHkls5zJnKWpA1TAMBgNVHRMEBTADAQH/MA0G
14
CSqGSIb3DQEBCwUAA4IBAQBJK2GM+zkzHb47yh3rnoLp1RwP2yDKhRArtkTaMfGA
15
t8GVKocT/fRjm2gVsxVaO7YfbqOXkSsbTwrKosHs1RrrP+P9AOZhDYn2rOgGC8ZE
16
k3X+19E1vQJvgLRitRr1Uf0Demji5PQFrrfeAGThekKG89xtOgu3xnx3FpmlGZma
17
qfYhXedCHHbTx1fBSumnCEqeEf0qQZ1Z4I9oxuft+l/DnmUnqYgQUEsr/k0ZwZX/
18
1PrC4NafCN2e80HAviQraWVI0hlZs0/86WTWLtfcNgTJHyJsETb3ZuRF58vz14wn
19
KVtl4D/Gq44A296Yv4XFc2GwMYYJKpRDcFJTMeUFIHUM
20
-----END CERTIFICATE-----
Tools/janus_conf/janus.transport.http.cfg
19 19
port = 8088					; Web server HTTP port
20 20
;interface = eth0			; Whether we should bind this server to a specific interface only
21 21
;ip = 192.168.0.1			; Whether we should bind this server to a specific IP address (v4 or v6) only
22
https = no					; Whether to enable HTTPS (default=no)
23
;secure_port = 8089			; Web server HTTPS port, if enabled
22
https = yes					; Whether to enable HTTPS (default=no)
23
secure_port = 8089			; Web server HTTPS port, if enabled
24 24
;secure_interface = eth0	; Whether we should bind this server to a specific interface only
25 25
;secure_ip = 192.168.0.1	; Whether we should bind this server to a specific IP address (v4 or v6) only
26 26
;acl = 127.,192.168.0.		; Only allow requests coming from this comma separated list of addresses
peerstreamer-ng.c
140 140
struct mg_mgr * launch_http_task(struct context *c)
141 141
{
142 142
	struct mg_connection *nc;
143
	struct mg_bind_opts bind_opts;
143 144

  
144
	nc = mg_bind(c->mongoose_srv, c->http_port, ev_handler);
145
	memset(&bind_opts, 0, sizeof(bind_opts));
146
	bind_opts.ssl_cert = "Public/server.pem";
147
	bind_opts.ssl_key = "Public/key.pem";
148
	nc = mg_bind_opt(c->mongoose_srv, c->http_port, ev_handler, bind_opts);
145 149
	nc->user_data = c;
146 150
	if (nc == NULL) {
147 151
		fprintf(stderr, "Error starting server on port %s\n", c->http_port);

Also available in: Unified diff