点播线路切换

  • 调用:

      • (void)getNetworkList:(void (^)(id result))callback; //获取回放线路
      • (NSArray *)getNetworkLinesList;//获取数据 (方法已过期,不建议使用)
      • (void)setNetworkLine:(NSNumber *)networkLineIndex;//设置线路

@参数说明:数组里面装的是字典,字典里面数据如下:

参数 类型 描述
current NSNumber 是否当前线路(0不是,1是)
name NSString 线路名
index NSNumber 线路指针(调用setNetworkLine传进的参数)

//新方法返回数据:  isVodLive为YES,是回放  
{
    data = {
        operators = (
            {
                index = 1;
                name = "线路1";
                current = 1;
            },
            {
                index = 2;
                name = "线路2";
                current = 0;
            },
        );
    };
    code = 0;
    isVodLive = 1;
}


{
    current = 1;
    index = 1;
    name = "\U7ebf\U8def1";
},
{
    current = 0;
    index = 2;
    name = "\U7ebf\U8def2";
},
{
    current = 0;
    index = 3;
    name = "\U7ebf\U8def3";
}
)

}


//旧方法返回数据:(
{
    current = 1;
    index = 1;
    name = "\U7ebf\U8def1";
},
{
    current = 0;
    index = 2;
    name = "\U7ebf\U8def2";
},
{
    current = 0;
    index = 3;
    name = "\U7ebf\U8def3";
}
)
调用示例:

NSArray * array = [self.talkfunSDK getNetworkLinesList];

NSNumber * index = array[0][@"index"];

[weakSelf.talkfunSDK setNetworkLine:index];

networkSetting

Copyright Talkfun all right reserved,powered by Gitbook修订时间: 2020-05-13 15:42:51

results matching ""

    No results matching ""