🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
在本地预览之后添加如下代码 (Add the following code after the local Preview) ``` [self.engine subscribeVideoTexture:@"" videoSource:(AliRtcVideoSource)AliRtcVideosourceCameraLargeType videoTextureType:AliRtcVideoTextureTypePre]; [self.engine onVideoTextureCreated:@"" videoTextureType:AliRtcVideoTextureTypePre context:(__bridge void *)([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2])]; ``` - 在视频渲染方法中赋值 (Assignment in video rendering method) ``` - (int)onVideoTexture:(NSString *)uid videoTextureType:(AliRtcVideoTextureType)videoTextureType textureId:(int)textureId width:(int)width height:(int)height rotate:(int)rotate extraData:(long)extraData{ int newTexture = [self.beautyManager processAliRTCWithTexture:textureId width:width height:height]; return newTexture; } ```