@@ -19,7 +19,7 @@ Because it's REST, management clients can be implemented by different programmin
19
19
To enable stream API, add experimental targets ` stream-service ` and ` customized-agent ` during packing. ` stream-service ` is the module that provide stream related API. ` customized-agent ` is the module that provide server side customization for stream related API.
20
20
21
21
After packing, the stream API configuration is in stream_service/service.toml.
22
- Edit portal/portal.toml, set ` stream_engine_name ` to the same value of stream API configuration.
22
+ Edit portal/portal.toml, set ` stream_engine_name ` to the same value of stream API configuration( ` service.name ` or ` scheduler.name ` in stream_service/service.toml) .
23
23
Edit management_api/management_api.toml, set ` stream_engine ` and ` control_agent ` to the same values of stream API configuration.
24
24
25
25
Start OWT service with updated configuration, stream API should be enabled.
@@ -236,7 +236,9 @@ request body:
236
236
237
237
object(ListQuery):
238
238
{
239
- KEY: VALUE // Specified key-value pair for query result, such as `{name: "default"}`
239
+ query: {
240
+ KEY: VALUE // Specified key-value pair for query result, such as `{name: "default"}`
241
+ }
240
242
}
241
243
242
244
response body:
@@ -273,7 +275,9 @@ request body:
273
275
type: string(publishType), // E.g, "streaming", "video", ...
274
276
participant: string(participantId), // Or use domain name as participant ID.
275
277
media: object(MediaTrack) | object(MediaInfo),
276
- info: object(TypeSpecificInfo)
278
+ info: object(TypeSpecificInfo),
279
+ connection: object(ConnectionInfo) | undefined, // For "streaming"
280
+ processor: string(processorId) | undefined, // For "audio", "video"
277
281
}
278
282
object(MediaTrack) { // For WebRTC publications
279
283
tracks: [ object(TrackInfo) ],
@@ -287,6 +291,11 @@ request body:
287
291
parameters: object(VideoParameters)
288
292
}
289
293
}
294
+ object(ConnectionInfo) { // For streaming publications
295
+ url: string(streamingUrl),
296
+ transportProtocol: "tcp" | "udp",
297
+ bufferSize: number(bufferSize),
298
+ },
290
299
291
300
For * object(TrackInfo)* , refers to [ tracks in MediaOptions] ( ../Client-Portal%20Protocol.md#331-participant-joins-a-room ) .
292
301
For * format* and * parameters* , refers to [ REST API] ( RESTAPI.md#53-streams-StreamAPIsection53 ) .
@@ -367,7 +376,9 @@ request body:
367
376
368
377
object(ListQuery):
369
378
{
370
- KEY: VALUE // Specified key-value pair for query result, such as `{name: "default"}`
379
+ query: {
380
+ KEY: VALUE // Specified key-value pair for query result, such as `{name: "default"}`
381
+ }
371
382
}
372
383
373
384
response body:
@@ -404,7 +415,9 @@ request body:
404
415
type: string(subscribeType), // E.g, "streaming", "video", ...
405
416
participant: string(participantId), // Or use domain name as participant ID.
406
417
media: object(MediaTrack) | object(MediaInfo),
407
- info: object(TypeSpecificInfo)
418
+ info: object(TypeSpecificInfo),
419
+ connection: object(ConnectionInfo) | undefined, // For "streaming", "recording"
420
+ processor: string(processorId) | undefined, // For "audio", "video", "analytics"
408
421
}
409
422
object(MediaTrack) { // For WebRTC subscriptions
410
423
tracks: [ object(TrackInfo) ],
@@ -413,12 +426,21 @@ request body:
413
426
audio: {
414
427
from: string(sourceAudioId), // Could be publication ID or source track ID
415
428
format: object(AudioFormat),
416
- },
429
+ } | boolean(enable) ,
417
430
video: {
418
431
from: string(sourceVideoId), // Could be publication ID or source track ID
419
432
format: object(VideoFormat),
420
433
parameters: object(VideoParameters)
421
- }
434
+ } | boolean(enable)
435
+ }
436
+ object(ConnectionInfo) {
437
+ container: "mkv" | "mp4" | undefined, // For "recording"
438
+ url: string(url) | undefined, // For "streaming"
439
+ algorithm: string(algorithmName) | undefined, // For "analytics"
440
+ video: { // For "analytics"
441
+ format: object(VideoFormat), // Analytics output video format
442
+ parameters: object(VideoParameters), // Analytics output video parameters
443
+ } | undefined,
422
444
}
423
445
424
446
For * object(TrackInfo)* , refers to [ tracks in MediaOptions] ( ../Client-Portal%20Protocol.md#331-participant-joins-a-room ) .
@@ -497,7 +519,9 @@ request body:
497
519
498
520
object(ListQuery):
499
521
{
500
- KEY: VALUE // Specified key-value pair for query result, such as `{name: "default"}`
522
+ query: {
523
+ KEY: VALUE // Specified key-value pair for query result, such as `{name: "default"}`
524
+ }
501
525
}
502
526
503
527
response body:
@@ -577,6 +601,14 @@ request body:
577
601
id: string(analyticsId)
578
602
}
579
603
604
+ // For "sip" type processor
605
+ sip: {
606
+ server: string(serverHost),
607
+ user: string(sipUser),
608
+ password: string(sipPasswd)
609
+ },
610
+ stream: string(outgoingSipStream)
611
+
580
612
For * object(Region)* , refers to [ REST API] ( RESTAPI.md#51-rooms-StreamAPIsection51 ) .
581
613
582
614
response body:
@@ -605,7 +637,109 @@ response body:
605
637
606
638
** Empty**
607
639
608
- ## 5.5 Nodes {#StreamAPIsection5_5}
640
+ ## 5.5 Participants {#StreamAPIsection5_5}
641
+ Description:<br >
642
+ Participants represents owner of publications and subscriptions in OWT server.<br >
643
+
644
+ Resources:
645
+
646
+ - /v1.1/stream-engine/participants
647
+ - /v1.1/stream-engine/participants/{participantId}
648
+
649
+ Data Model:
650
+
651
+ Object(Participant) {
652
+ id: string(ParticipantID),
653
+ domain: string(domainName), // For example, room ID
654
+ portal: string(portalId),
655
+ notifying: boolean(notifyOthers), // Notify other participants about join/leave.
656
+ }
657
+
658
+ ### List Participants {#StreamAPIsection5_5_1}
659
+ ** GET ${host}/v1.1/stream-engine/participants**
660
+ ** GET ${host}/v1.1/stream-engine/participants/{participantId}**
661
+
662
+ Description:<br >
663
+ List participants in stream engine.<br >
664
+
665
+ request body:
666
+
667
+ | type | content |
668
+ | :-------------| :-------|
669
+ | json | object(ListQuery) |
670
+
671
+ ** Note** : Definition of * ListQuery* .<br >
672
+
673
+ object(ListQuery):
674
+ {
675
+ query: {
676
+ KEY: VALUE // Specified key-value pair for query result, such as `{name: "default"}`
677
+ }
678
+ }
679
+
680
+ response body:
681
+
682
+ | type | content |
683
+ | :-------------| :-------|
684
+ | json | Object(ListResult) |
685
+
686
+ ** Note** : Definition of * ListResult* .<br >
687
+
688
+ object(ListResult):
689
+ {
690
+ total: number(ListSize),
691
+ start: number(offsetInList),
692
+ data: [ object(Participant) ]
693
+ }
694
+
695
+ ### Create Participant {#StreamAPIsection5_5_2}
696
+ ** POST ${host}/v1.1/stream-engine/participants**
697
+
698
+ Description:<br >
699
+ Create a participant with configuration.<br >
700
+
701
+ request body:
702
+
703
+ | type | content |
704
+ | :-------------| :-------|
705
+ | json | object(ParticipantRequest) |
706
+
707
+ ** Note** : Definition of * ParticipantRequest* .<br >
708
+
709
+ Object(ParticipantRequest) {
710
+ id: string(ParticipantID),
711
+ domain: string(domainName),
712
+ notifying: boolean(notifyOthers), // Notify other participants about join/leave.
713
+ }
714
+
715
+ response body:
716
+
717
+ | type | content |
718
+ | :-------------| :-------|
719
+ | json | object(IdObject) |
720
+
721
+ ** Note** : Definition of * IdObject* .<br >
722
+
723
+ Object(IdObject) {
724
+ id: string(createdParticipantId)
725
+ }
726
+
727
+ ### Delete Participant {#StreamAPIsection5_5_3}
728
+ ** DELETE ${host}/v1.1/stream-engine/participants/{participantId}**
729
+
730
+ Description:<br >
731
+ Drop the specified participant, all related publications and subscriptions will be stopped as well.<br >
732
+
733
+ request body:
734
+
735
+ ** Empty**
736
+
737
+ response body:
738
+
739
+ ** Empty**
740
+
741
+
742
+ ## 5.6 Nodes {#StreamAPIsection5_6}
609
743
Description:<br >
610
744
Node represents working process in stream engine.<br >
611
745
@@ -624,7 +758,7 @@ Data Model:
624
758
streamAddr: {ip: string(host), port: number(port)}
625
759
}
626
760
627
- ### List Nodes {#StreamAPIsection5_5_1 }
761
+ ### List Nodes {#StreamAPIsection5_6_1 }
628
762
** GET ${host}/v1.1/stream-engine/nodes**
629
763
630
764
Description:<br >
@@ -640,7 +774,9 @@ request body:
640
774
641
775
object(ListQuery):
642
776
{
643
- KEY: VALUE // Specified key-value pair for query result, such as `{name: "default"}`
777
+ query: {
778
+ KEY: VALUE // Specified key-value pair for query result, such as `{name: "default"}`
779
+ }
644
780
}
645
781
646
782
response body:
0 commit comments