台湾一级a毛片在线播放,黄色精品偷拍视频大全,精品一区二区在线欧美日韩,日本特黄一级视频播三级片,日韩美女18岁美女视频,偷偷操不一样的99,国产午夜激无码av毛片久

智慧服務(wù),成就美好體驗(yàn) 項(xiàng)目咨詢

主頁(yè) > 服務(wù)與支持 > 開(kāi)發(fā)平臺(tái) > 客戶端SDK參考 > iOS UI SDK > 業(yè)務(wù)開(kāi)發(fā) 會(huì)議中屏幕共享

入門使用

會(huì)議中屏幕共享

更新時(shí)間:2019-11-20

描述

iOS端屏幕共享需要進(jìn)行iOS Extension的開(kāi)發(fā)進(jìn)行實(shí)現(xiàn),以下步驟用于說(shuō)明如何集成SDK進(jìn)行屏幕共享Extension的開(kāi)發(fā),另外由于相關(guān)特性對(duì)系統(tǒng)能力的依賴,因此需要iOS12及以上版本才能支持屏幕共享功能。

業(yè)務(wù)流程

  1. 準(zhǔn)備過(guò)程:iOS應(yīng)用主工程、Extension的開(kāi)發(fā)所需要的證書(shū)和文件。
  2. 以下以CloudLinkMeetingDemo為例進(jìn)行說(shuō)明,打開(kāi)主工程中的AppGroup開(kāi)關(guān),并設(shè)置在1中申請(qǐng)到的可用的appid。

  3. 創(chuàng)建新的Extensions Target,選擇File---New---Target--Broadcast Upload Extension,創(chuàng)建Extension target。

  4. 打開(kāi)Extensions里面的appgroup開(kāi)關(guān)。

  5. 設(shè)置entitlements文件中的appGroups為1中申請(qǐng)的值。

  6. 在Extensions 的“Build Phases > Link Binary With Libraries”中添加如下庫(kù)。

    ReplayKit.framework:系統(tǒng)庫(kù)

    CloudLinkMeetingScreenShare.framework:SDK提供的庫(kù)

  7. 在Extensions 的SampleHandler.m文件中添加代碼如下。
    #import "SampleHandler.h"
    #import <CLoudLinkMeetingScreenShare/ScreenShareManager.h>
    
    @interface SampleHandler()<ScreenShareManagerDelegate>
    @property (strong, nonatomic) ScreenShareManager *screenShareManager;
    
    @end
    
    @implementation SampleHandler
    
    - (instancetype)init {
        if (self = [super init]) {
            self.screenShareManager = [[ScreenShareManager alloc] initWithAppGroupIdentifier:自己申請(qǐng)的appGroupIdentifier];
            self.screenShareManager.delegate = self;
        }
        return self;
    }
    
    
    - (void)broadcastStartedWithSetupInfo:(NSDictionary<NSString *,NSObject *> *)setupInfo {
        // User has requested to start the broadcast. Setup info from the UI extension can be supplied but optional.
        [self.screenShareManager broadcastStartedWithSetupInfo:setupInfo];
    }
    
    - (void)dealloc {
        self.screenShareManager = nil;
    }
    
    - (void)broadcastPaused {
        // User has requested to pause the broadcast. Samples will stop being delivered.
        [self.screenShareManager broadcastPaused];
    }
    
    - (void)broadcastResumed {
        // User has requested to resume the broadcast. Samples delivery will resume.
        [self.screenShareManager broadcastResumed];
    }
    
    - (void)broadcastFinished {
        // User has requested to finish the broadcast.
        [self.screenShareManager broadcastFinished];
    }
    
    - (void)processSampleBuffer:(CMSampleBufferRef)sampleBuffer withType:(RPSampleBufferType)sampleBufferType {
    
        switch (sampleBufferType) {
            case RPSampleBufferTypeVideo:
                // Handle video sample buffer
                [self.screenShareManager processSampleBuffer:sampleBuffer withType:RPSampleBufferTypeVideo];
                break;
            case RPSampleBufferTypeAudioApp:
                // Handle audio sample buffer for app audio
                break;
            case RPSampleBufferTypeAudioMic:
                // Handle audio sample buffer for mic audio
                break;
    
            default:
                break;
        }
    }
    
    - (void)screenShareManagerFinishBroadcastWithError:(NSError *)error {
        [self finishBroadcastWithError: error];
    }
    
    @end
     
  8. 在主工程中設(shè)置groupId,在clm_init之前配置跟extension中相同的groupId,示例代碼如下:
    CloudLinkMeeting *clm = [CloudLinkMeeting sharedInstance];
    clm.screenShareGroupId = 跟extension中相同的groupId;
    //開(kāi)始ClooudLinkMeeting的其他接口調(diào)用
     
  9. 完成編碼。
  10. 屏幕共享有兩種開(kāi)啟方式,只能在會(huì)議中進(jìn)行。
    1. 會(huì)議中點(diǎn)擊下方的屏幕共享按鈕,選擇應(yīng)用進(jìn)行屏幕共享。

       

    2. 會(huì)議中打開(kāi)手機(jī)的控制中心,長(zhǎng)按錄制按鈕,彈出菜單中選擇。