Browse Source

更新IPUPeerTubePlugin.m文件,兼容js传的mapJson,以及callback回调传入长度大于0的字符串。

huangyl3 4 years ago
parent
commit
5948086bc5
1 changed files with 5 additions and 2 deletions
  1. 5 2
      display-center/display-center/IPUPeerTubePlugin.m

+ 5 - 2
display-center/display-center/IPUPeerTubePlugin.m

@ -33,6 +33,9 @@
33 33
        [self error:@"缺少必传参数!"];
34 34
        return;
35 35
    }
36
    if (![map[@"tokenJson"] isKindOfClass:[NSString class]]) {
37
        tokenJson = [IPUJSONHelper toJSONString:tokenJson];
38
    }
36 39
    
37 40
    NSString *hexColor = map[@"bdColor"] ?: @"";
38 41
    UIColor *color = [IPUColorUtility colorWithHexString:hexColor];
@ -48,7 +51,7 @@
48 51
        if (!isSuccess) {
49 52
            [self error:@""];
50 53
        }else {
51
            [self callback:@""];
54
            [self callback:@"aa"]; //传空串的话,触发不了callback回调
52 55
        }
53 56
    }];
54 57
}
@ -309,7 +312,7 @@ parmas[2]: 必传,count
309 312
    vc.playerType = IPUPeerTubeVideoPlayerTypeEmbedPath;
310 313
    vc.videoEmbedPath = embedPath;
311 314
    vc.backBlock = ^(){
312
        [self callback:@"aaa"];
315
        [self callback:@"aa"];
313 316
        NSLog(@"播放页面返回的CallBack~~!");
314 317
    };
315 318
    vc.modalPresentationStyle = UIModalPresentationFullScreen;