A pseudo barrage function I recently made seems to be very suitable for your needs. I implemented it using tableview, so that I don’t have to think too much about view reuse. Post the image first!
Regarding the barrage view, it is actually quite simple. In order to make the barrage come out from bottom to top, I rotated the transform of the tableview and cell. Then, if there is no new barrage, a cell will be inserted from the top!
Regarding data requests, because my project is not a live broadcast type, I have to consider both the old barrage data and the newly pushed data! So when entering the video details page, a batch of barrage data and formats will be requested. As follows,
A pseudo barrage function I recently made seems to be very suitable for your needs. I implemented it using tableview, so that I don’t have to think too much about view reuse. Post the image first!
Regarding the barrage view, it is actually quite simple. In order to make the barrage come out from bottom to top, I rotated the transform of the tableview and cell. Then, if there is no new barrage, a cell will be inserted from the top!
Regarding data requests, because my project is not a live broadcast type, I have to consider both the old barrage data and the newly pushed data! So when entering the video details page, a batch of barrage data and formats will be requested. As follows,
Use ffmpeg to decode the video and opengl to render the image
If you want to add barrages, you only need to draw text or textures in the context of opengl, and it is also very convenient to make animations