Package io.antmedia.rest
Class BroadcastRestService
java.lang.Object
io.antmedia.rest.RestServiceBase
io.antmedia.rest.BroadcastRestService
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
Nested classes/interfaces inherited from class io.antmedia.rest.RestServiceBase
RestServiceBase.AppBroadcastStatistics, RestServiceBase.BroadcastStatistics, RestServiceBase.ProcessBuilderFactory
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final String
private static final String
private static final String
private static final String
Fields inherited from class io.antmedia.rest.RestServiceBase
appCtx, appInstance, BUILD_NUMBER, COMMUNITY_EDITION, dataStoreFactory, ENDPOINT_GENERIC, ENTERPRISE_EDITION, ERROR_SOCIAL_ENDPOINT_EXCEPTION_IN_ASKING_AUTHPARAMS, ERROR_SOCIAL_ENDPOINT_UNDEFINED_CLIENT_ID, ERROR_SOCIAL_ENDPOINT_UNDEFINED_ENDPOINT, FETCH_REQUEST_REDIRECTED_TO_ORIGIN, FETCHER_NOT_STARTED_ERROR, HIGH_CPU_ERROR, HTTP, INVALID_STREAM_NAME_ERROR, IPV4_REGEX, logger, LOOPBACK_REGEX, MAX_ITEM_IN_ONE_LIST, RECORD_DISABLE, RECORD_ENABLE, RECORD_NO_SET, REPLACE_CHARS, REPLACE_CHARS_FOR_SECURITY, RTSP, scope, servletContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddEndpointV2
(String id, String rtmpUrl) Deprecated.addEndpointV3
(String id, Endpoint endpoint, int resolutionHeight) addID3Data
(String streamId, String data) addSEIData
(String streamId, String data) addStreamToTheRoom
(String roomId, String streamId) Deprecated, for removal: This API element is subject to removal in a future version.addStreamToTheRoomDeprecated
(String roomId, String streamId) Deprecated, for removal: This API element is subject to removal in a future version.addSubscriber
(String streamId, Subscriber subscriber) addSubTrack
(String id, String subTrackId) blockSubscriber
(String streamId, String subscriberId, int seconds, String blockType) jakarta.ws.rs.core.Response
createBroadcast
(Broadcast broadcast, boolean autoStart) jakarta.ws.rs.core.Response
Deprecated, for removal: This API element is subject to removal in a future version.deleteBroadcast
(String id, Boolean deleteSubtracks) deleteBroadcasts
(String[] streamIds) Deprecated.deleteBroadcastsBulk
(String streamIds) deleteConferenceRoomV2
(String roomId) Deprecated, for removal: This API element is subject to removal in a future version.deleteStreamFromTheRoom
(String roomId, String streamId) Deprecated, for removal: This API element is subject to removal in a future version.deleteStreamFromTheRoomDeprecated
(String roomId, String streamId) Deprecated, for removal: This API element is subject to removal in a future version.deleteSubscriber
(String streamId, String subscriberId) jakarta.ws.rs.core.Response
editConferenceRoom
(String roomId, ConferenceRoom room) Deprecated, for removal: This API element is subject to removal in a future version.enableRecording
(String streamId, boolean enableRecording, String recordType, int resolutionHeight) filterBroadcastListV2
(int offset, int size, String type, String sortBy, String orderBy) Deprecated.jakarta.ws.rs.core.Response
getBroadcast
(String id) getBroadcastList
(int offset, int size, String typeBy, String sortBy, String orderBy, String search) getCameraErrorV2
(String streamId) jakarta.ws.rs.core.Response
getConferenceRoomList
(int offset, int size, String sortBy, String orderBy, String search) Deprecated, for removal: This API element is subject to removal in a future version.getConnectionEvents
(String streamId, int offset, int size, String subscriberId) getDetectionListV2
(String id, int offset, int size) getDuration
(String url) jakarta.ws.rs.core.Response
getJwtTokenV2
(String streamId, long expireDate, String type, String roomId) String[]
getRoomInfo
(String roomId, String streamId) Deprecated, for removal: This API element is subject to removal in a future version.private Endpoint
getRtmpUrlFromList
(String endpointServiceId, Broadcast broadcast) getStreamInfo
(String streamId) jakarta.ws.rs.core.Response
getTokenV2
(String streamId, long expireDate, String type, String roomId) getTotalBroadcastNumberV2
(String search) getWebRTCClientStatsListV2
(int offset, int size, String streamId) getWebRTCViewerList
(int offset, int size, String sortBy, String orderBy, String search) Deprecated, for removal: This API element is subject to removal in a future version.use subscriber rest methods, it will be deleted next versionslistSubscriberStatsV2
(String streamId, int offset, int size) Deprecated, for removal: This API element is subject to removal in a future version.listSubscriberV2
(String streamId, int offset, int size) listTokensV2
(String streamId, int offset, int size) private void
logRtmpEndpointInfo
(String id, Endpoint endpoint, boolean result) playNextItem
(String id, Integer index) removeEndpoint
(String id, String rtmpUrl) Deprecated.removeEndpointV2
(String id, String endpointServiceId, int resolutionHeight) private Result
removeRTMPEndpointProcess
(Broadcast broadcast, Endpoint endpoint, int resolutionHeight, String id) removeSubTrack
(String id, String subTrackId) revokeSubscribers
(String streamId) revokeTokensV2
(String streamId) String[]
sendMessage
(String message, String id) stopPlaying
(String viewerId) Deprecated, for removal: This API element is subject to removal in a future version.use subscriber rest methods, it will be deleted next versionsstopStreamingV2
(String id, Boolean stopSubtracks) updateBroadcast
(String id, BroadcastUpdate broadcast) updateSeekTime
(String id, long seekTimeMs) validateTokenV2
(Token token) Methods inherited from class io.antmedia.rest.RestServiceBase
addEndpoint, addEndpoint, addIPCamera, addSource, addStreamSource, addSubTrack, checkStopStreaming, checkStreamUrl, connectToCamera, createBroadcastWithStreamID, deleteVoD, deleteVoDs, enableRecordMuxing, getAppContext, getApplication, getAppSettings, getCameraErrorById, getDataStore, getDataStoreFactory, getDetectionList, getIPArray, getJwtToken, getMp4Muxer, getMuxAdaptor, getProcess, getProcessBuilderFactory, getRoomInfoFromConference, getScope, getServerSettings, getSoftwareVersion, getStreamsDirectory, getToken, getTokenService, getVoD, getWebRTCAdaptor, getWebRTCClientStatsList, importLiveStreams2Stalker, importVoDs, importVoDsToStalker, isAlreadyRecording, isEnterprise, isInSameNodeInCluster, isMainTrack, isStreaming, logFailedOperation, logWarning, lookupBroadcast, moveAbsolute, moveContinous, moveRelative, processRTMPEndpoint, removeRTMPEndpoint, removeSubTrack, replaceCharsForSecurity, revokeTokens, saveBroadcast, searchOnvifDevices, sendDataChannelMessage, setAppCtx, setApplication, setAppSettings, setDataStore, setDataStoreFactory, setProcessBuilderFactory, setResultSuccess, setScope, setServerSettings, startRecord, startStreamSource, startVoDScriptProcess, stopRecord, stopStreaming, synchUserVodList, unlinksVoD, updatePlayListItemDurationsIfApplicable, updateStreamSource, uploadVoDFile, validateIPaddress, validateStreamURL, validateToken, waitStopStreaming
-
Field Details
-
STREAM_ID_NOT_VALID
- See Also:
-
RELATIVE_MOVE
- See Also:
-
ABSOLUTE_MOVE
- See Also:
-
CONTINUOUS_MOVE
- See Also:
-
-
Constructor Details
-
BroadcastRestService
public BroadcastRestService()
-
-
Method Details
-
createBroadcast
@POST @Consumes("application/json") @Path("/create") @Produces("application/json") public jakarta.ws.rs.core.Response createBroadcast(Broadcast broadcast, @QueryParam("autoStart") boolean autoStart) -
deleteBroadcast
@DELETE @Consumes("application/json") @Path("/{id}") @Produces("application/json") public Result deleteBroadcast(@PathParam("id") String id, @QueryParam("deleteSubtracks") Boolean deleteSubtracks) - Overrides:
deleteBroadcast
in classRestServiceBase
-
deleteBroadcasts
@Deprecated @DELETE @Consumes("application/json") @Path("/bulk") @Produces("application/json") public Result deleteBroadcasts(String[] streamIds) Deprecated.Use#deleteBroadcastsBulk(String[])
for compliance- Overrides:
deleteBroadcasts
in classRestServiceBase
-
deleteBroadcastsBulk
-
getBroadcast
@GET @Path("/{id}") @Produces("application/json") public jakarta.ws.rs.core.Response getBroadcast(@PathParam("id") String id) -
getBroadcastList
@GET @Path("/list/{offset}/{size}") @Produces("application/json") public List<Broadcast> getBroadcastList(@PathParam("offset") int offset, @PathParam("size") int size, @QueryParam("type_by") String typeBy, @QueryParam("sort_by") String sortBy, @QueryParam("order_by") String orderBy, @QueryParam("search") String search) -
updateBroadcast
@PUT @Consumes("application/json") @Path("/{id}") @Produces("application/json") public Result updateBroadcast(@PathParam("id") String id, BroadcastUpdate broadcast) - Overrides:
updateBroadcast
in classRestServiceBase
-
getDuration
-
updateSeekTime
-
addEndpointV2
@Deprecated @POST @Consumes("application/json") @Path("/{id}/endpoint") @Produces("application/json") public Result addEndpointV2(@PathParam("id") String id, @QueryParam("rtmpUrl") String rtmpUrl) Deprecated. -
addEndpointV3
-
logRtmpEndpointInfo
-
removeEndpoint
@Deprecated @DELETE @Consumes("application/json") @Path("/{id}/endpoint") @Produces("application/json") public Result removeEndpoint(@PathParam("id") String id, @QueryParam("rtmpUrl") String rtmpUrl) Deprecated.- Overrides:
removeEndpoint
in classRestServiceBase
-
removeEndpointV2
-
removeRTMPEndpointProcess
-
getRtmpUrlFromList
-
getDetectionListV2
@GET @Path("/{id}/detections/{offset}/{size}") @Produces("application/json") public List<TensorFlowObject> getDetectionListV2(@PathParam("id") String id, @PathParam("offset") int offset, @PathParam("size") int size) -
getObjectDetectedTotal
@GET @Path("/{id}/detections/count") @Produces("application/json") public BroadcastRestService.SimpleStat getObjectDetectedTotal(@PathParam("id") String id) -
importLiveStreams2StalkerV2
@POST @Path("/import-to-stalker") @Produces("application/json") public Result importLiveStreams2StalkerV2() -
getTotalBroadcastNumberV2
@GET @Path("/count") @Produces("application/json") public BroadcastRestService.SimpleStat getTotalBroadcastNumberV2() -
getTotalBroadcastNumberV2
@GET @Path("/count/{search}") @Produces("application/json") public BroadcastRestService.SimpleStat getTotalBroadcastNumberV2(@PathParam("search") String search) -
getAppLiveStatistics
@GET @Path("/active-live-stream-count") @Produces("application/json") public BroadcastRestService.SimpleStat getAppLiveStatistics() -
getTokenV2
-
getJwtTokenV2
-
validateTokenV2
-
revokeTokensV2
-
listTokensV2
-
listSubscriberV2
@GET @Path("/{id}/subscribers/list/{offset}/{size}") @Produces("application/json") public List<Subscriber> listSubscriberV2(@PathParam("id") String streamId, @PathParam("offset") int offset, @PathParam("size") int size) -
listSubscriberStatsV2
@GET @Path("/{id}/subscriber-stats/list/{offset}/{size}") @Produces("application/json") @Deprecated(since="2.12.0", forRemoval=true) public List<SubscriberStats> listSubscriberStatsV2(@PathParam("id") String streamId, @PathParam("offset") int offset, @PathParam("size") int size) Deprecated, for removal: This API element is subject to removal in a future version. -
getConnectionEvents
@GET @Path("/{id}/connection-events/{offset}/{size}") @Produces("application/json") public List<ConnectionEvent> getConnectionEvents(@PathParam("id") String streamId, @PathParam("offset") int offset, @PathParam("size") int size, @QueryParam("subscriberId") String subscriberId) -
addSubscriber
@POST @Consumes("application/json") @Path("/{id}/subscribers") @Produces("application/json") public Result addSubscriber(@PathParam("id") String streamId, Subscriber subscriber) -
getTOTP
-
deleteSubscriber
-
blockSubscriber
-
revokeSubscribers
-
getBroadcastStatistics
@GET @Path("/{id}/broadcast-statistics") @Produces("application/json") public RestServiceBase.BroadcastStatistics getBroadcastStatistics(@PathParam("id") String id) - Overrides:
getBroadcastStatistics
in classRestServiceBase
-
getBroadcastTotalStatistics
@GET @Path("/total-broadcast-statistics") @Produces("application/json") public RestServiceBase.AppBroadcastStatistics getBroadcastTotalStatistics()- Overrides:
getBroadcastTotalStatistics
in classRestServiceBase
-
getWebRTCLowLevelSendStats
@GET @Path("/webrtc-send-low-level-stats") @Produces("application/json") public BroadcastRestService.WebRTCSendStats getWebRTCLowLevelSendStats() -
getWebRTCLowLevelReceiveStats
@GET @Path("/webrtc-receive-low-level-stats") @Produces("application/json") public BroadcastRestService.WebRTCReceiveStats getWebRTCLowLevelReceiveStats() -
getRTMPToWebRTCStats
@GET @Path("/{id}/rtmp-to-webrtc-stats") @Produces("application/json") public RTMPToWebRTCStats getRTMPToWebRTCStats(@PathParam("id") String id) -
getWebRTCClientStatsListV2
@GET @Path("/{stream_id}/webrtc-client-stats/{offset}/{size}") @Produces("application/json") public List<WebRTCClientStats> getWebRTCClientStatsListV2(@PathParam("offset") int offset, @PathParam("size") int size, @PathParam("stream_id") String streamId) -
filterBroadcastListV2
@Deprecated @GET @Consumes("application/json") @Path("/filter-list/{offset}/{size}/{type}") @Produces("application/json") public List<Broadcast> filterBroadcastListV2(@PathParam("offset") int offset, @PathParam("size") int size, @PathParam("type") String type, @QueryParam("sort_by") String sortBy, @QueryParam("order_by") String orderBy) Deprecated. -
enableRecording
@PUT @Consumes("application/json") @Path("/{id}/recording/{recording-status}") @Produces("application/json") public Result enableRecording(@PathParam("id") String streamId, @PathParam("recording-status") boolean enableRecording, @QueryParam("recordType") String recordType, @QueryParam("resolutionHeight") int resolutionHeight) -
getCameraErrorV2
-
startStreamSourceV2
-
playNextItem
@POST @Consumes("application/json") @Path("/playlists/{id}/next") @Produces("application/json") public Result playNextItem(@PathParam("id") String id, @QueryParam("index") Integer index) - Overrides:
playNextItem
in classRestServiceBase
-
stopStreamingV2
-
searchOnvifDevicesV2
-
getOnvifDeviceProfiles
@GET @Path("/{id}/ip-camera/device-profiles") @Produces("application/json") public String[] getOnvifDeviceProfiles(@PathParam("id") String id) - Overrides:
getOnvifDeviceProfiles
in classRestServiceBase
-
moveIPCamera
-
stopMove
-
createConferenceRoomV2
@POST @Consumes("application/json") @Path("/conference-rooms") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public jakarta.ws.rs.core.Response createConferenceRoomV2(ConferenceRoom room) Deprecated, for removal: This API element is subject to removal in a future version. -
editConferenceRoom
@PUT @Consumes("application/json") @Path("/conference-rooms/{room_id}") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public jakarta.ws.rs.core.Response editConferenceRoom(@PathParam("room_id") String roomId, ConferenceRoom room) Deprecated, for removal: This API element is subject to removal in a future version. -
deleteConferenceRoomV2
@DELETE @Consumes("application/json") @Path("/conference-rooms/{room_id}") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public Result deleteConferenceRoomV2(@PathParam("room_id") String roomId) Deprecated, for removal: This API element is subject to removal in a future version. -
addSubTrack
-
removeSubTrack
-
getStreamInfo
@GET @Consumes("application/json") @Path("/{id}/stream-info") @Produces("application/json") public BasicStreamInfo[] getStreamInfo(@PathParam("id") String streamId) -
sendMessage
-
getConferenceRoomList
@GET @Path("/conference-rooms/list/{offset}/{size}") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public List<ConferenceRoom> getConferenceRoomList(@PathParam("offset") int offset, @PathParam("size") int size, @QueryParam("sort_by") String sortBy, @QueryParam("order_by") String orderBy, @QueryParam("search") String search) Deprecated, for removal: This API element is subject to removal in a future version. -
getConferenceRoom
@GET @Path("/conference-rooms/{roomId}") @Produces("application/json") public jakarta.ws.rs.core.Response getConferenceRoom(@PathParam("roomId") String id) -
getRoomInfo
@GET @Consumes("application/json") @Path("/conference-rooms/{room_id}/room-info") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public RootRestService.RoomInfo getRoomInfo(@PathParam("room_id") String roomId, @QueryParam("streamId") String streamId) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
roomId
-streamId
-- Returns:
-
addStreamToTheRoomDeprecated
@PUT @Consumes("application/json") @Path("/conference-rooms/{room_id}/add") @Produces("application/json") @Deprecated(since="2.6.2", forRemoval=true) public Result addStreamToTheRoomDeprecated(@PathParam("room_id") String roomId, @QueryParam("streamId") String streamId) Deprecated, for removal: This API element is subject to removal in a future version. -
addStreamToTheRoom
@PUT @Consumes("application/json") @Path("/conference-rooms/{room_id}/{streamId}") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public Result addStreamToTheRoom(@PathParam("room_id") String roomId, @PathParam("streamId") String streamId) Deprecated, for removal: This API element is subject to removal in a future version. -
deleteStreamFromTheRoomDeprecated
@PUT @Consumes("application/json") @Path("/conference-rooms/{room_id}/delete") @Produces("application/json") @Deprecated(since="2.6.2", forRemoval=true) public Result deleteStreamFromTheRoomDeprecated(@PathParam("room_id") String roomId, @QueryParam("streamId") String streamId) Deprecated, for removal: This API element is subject to removal in a future version. -
deleteStreamFromTheRoom
@DELETE @Consumes("application/json") @Path("/conference-rooms/{room_id}/{streamId}") @Produces("application/json") @Deprecated(since="2.9.1", forRemoval=true) public Result deleteStreamFromTheRoom(@PathParam("room_id") String roomId, @PathParam("streamId") String streamId) Deprecated, for removal: This API element is subject to removal in a future version. -
getWebRTCViewerList
@Deprecated(since="2.7.0", forRemoval=true) @GET @Path("/webrtc-viewers/list/{offset}/{size}") @Produces("application/json") public List<WebRTCViewerInfo> getWebRTCViewerList(@PathParam("offset") int offset, @PathParam("size") int size, @QueryParam("sort_by") String sortBy, @QueryParam("order_by") String orderBy, @QueryParam("search") String search) Deprecated, for removal: This API element is subject to removal in a future version.use subscriber rest methods, it will be deleted next versions- Parameters:
offset
-size
-sortBy
-orderBy
-search
-- Returns:
-
stopPlaying
@Deprecated(since="2.7.0", forRemoval=true) @POST @Consumes("application/json") @Path("/webrtc-viewers/{webrtc-viewer-id}/stop") @Produces("application/json") public Result stopPlaying(@PathParam("webrtc-viewer-id") String viewerId) Deprecated, for removal: This API element is subject to removal in a future version.use subscriber rest methods, it will be deleted next versions- Parameters:
viewerId
-- Returns:
-
addID3Data
-
addSEIData
-