Explorar el Código

NPD MOBILE

去掉视频播放调试信息
Ray Zhang hace 9 años
padre
commit
65f82f2961
Se han modificado 1 ficheros con 7 adiciones y 10 borrados
  1. 7 10
      RedAnt ERP Mobile/common/youtube/YTPlayerView.m

+ 7 - 10
RedAnt ERP Mobile/common/youtube/YTPlayerView.m

@@ -529,7 +529,7 @@ NSString static *const kYTPlayerSyndicationRegexPattern = @"^https://tpc.googles
 - (void)notifyDelegateOfYouTubeCallbackUrl: (NSURL *) url {
     NSString *action = url.host;
     
-    NSLog(@"action:%@",action);
+ //   NSLog(@"action:%@",action);
     
     // We know the query can only be of the format ytplayer://action?data=SOMEVALUE,
     // so we parse out the value.
@@ -603,10 +603,7 @@ NSString static *const kYTPlayerSyndicationRegexPattern = @"^https://tpc.googles
     {
         self.webView.hidden = true;
     }
-    else
-    {
-        int a=0;
-    }
+
 }
 -(NSString*) Embed2VID:(NSString*) iframe_embed
 {
@@ -615,20 +612,20 @@ NSString static *const kYTPlayerSyndicationRegexPattern = @"^https://tpc.googles
     NSString* content = iframe_embed;
     NSString* pattern = @"(\\w+):\\/\\/([^/:]+)(:\\d*)?([^# ]*\\b)";
     
-    NSLog(@"content: %@",content);
-    NSLog(@"pattern: %@",pattern);
+ //   NSLog(@"content: %@",content);
+//    NSLog(@"pattern: %@",pattern);
     
     if(content==nil||pattern==nil)
         return nil;
     
-    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:nil error:nil];
+    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:NSRegularExpressionCaseInsensitive error:nil];
     
     NSTextCheckingResult *match = [regex firstMatchInString:content options:nil range:NSMakeRange(0, content.length)];
     
     int i=0;
-    NSLog(@"%d->range with richtext label: %d,%d",i, [match rangeAtIndex:i].location,[match rangeAtIndex:i].length);
+  //  NSLog(@"%d->range with richtext label: %d,%d",i, [match rangeAtIndex:i].location,[match rangeAtIndex:i].length);
     //    NSLog(@"%d-> range of text: %d,%d ",i+1, [match rangeAtIndex:i+1].location,[match rangeAtIndex:i+1].length);
-    NSLog(@"text: %@ ",[content substringWithRange:[match rangeAtIndex:i]]);
+ //   NSLog(@"text: %@ ",[content substringWithRange:[match rangeAtIndex:i]]);
     
     return [[content substringWithRange:[match rangeAtIndex:i]] lastPathComponent];
 }