AmityStreamBroadcaster. We now only support 16:9 video ratio with the following resolution representing by the enum
.SD_480Pindicates a video with resolution 480x854 and video bitrate 1216 kpbs
.HD_720Pindicates a video with resolution 720x1280 and video bitrate 2496 kpbs
.FHD_1080Pindicates a video with resolution 1080x1920 and video bitrate 4992 kpbs
build.gradlein the application level.
AmityCameraViewSince we only support 16:9 video ratio, ConstratntLayout will ensure that the view will be drawn in the correct width and height.
AmityStreamBroadcasterrequires the following permissions to work properly.
AmityCameraView, you will need to define the view in your Activity or Fragment layout by :
AmityStreamBroadcaster, please make sure these permissions are granted.
AmityStreamBroadCaster.Builderclass to create and configure this object easily. It requires
AmityCameraViewas a parameter and
AmityStreamBroadcasterConfigas a configurable value which will be explained in the following section.
AmityStreamBroadcasterConfiguration.Builderto construct the configuration conveniently. As we have mentioned above, We support
FHD_1080Presolutions. Orientations are relying on Android Configuration class, you may either choose Configuration.ORIENTATION_PORTRAIT or
AmityCameraView, you need to define the view in your Activity or Fragment layout by :
AmityCameraViewSince we only support 16:9 video ratio, ConstratntLayout ensures that the view will be drawn in the correct width and height.
AmityStreamBroadcasterState. The possible statuses are :
.IDLEindicates a status of stream in an idle state.
.CONNECTINGindicates a status of stream that it's connecting to a rtmp server.
.CONNECTEDindicates a status of stream that it's connected to a rtmp server.
.DISNNECTEDindicates a status of stream that it's disconnected to a rtmp server. We also provide error information through an exception.