@@ -51,21 +51,27 @@ - (IBAction)onChange:(id)sender {
5151 @" https://github.com/yyued/SVGA-Samples/blob/master/rose.svga?raw=true" ,
5252 ];
5353 [UIApplication sharedApplication ].networkActivityIndicatorVisible = YES ;
54- [parser parseWithURL: [NSURL URLWithString: items[arc4random () % items.count]]
55- completionBlock: ^(SVGAVideoEntity * _Nullable videoItem) {
56- [UIApplication sharedApplication ].networkActivityIndicatorVisible = NO ;
57- if (videoItem != nil ) {
58- self.aPlayer .videoItem = videoItem;
59- [self .aPlayer startAnimation ];
60- }
61- } failureBlock: nil ];
54+ // [parser parseWithURL:[NSURL URLWithString:items[arc4random() % items.count]]
55+ // completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
56+ // [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
57+ // if (videoItem != nil) {
58+ // self.aPlayer.videoItem = videoItem;
59+ // [self.aPlayer startAnimation];
60+ // }
61+ // } failureBlock:nil];
62+
6263 // [parser parseWithURL:[NSURL URLWithString:@"https://github.com/svga/SVGA-Samples/raw/master_aep/BitmapColorArea1.svga"] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
6364 // if (videoItem != nil) {
6465 // self.aPlayer.videoItem = videoItem;
6566 // [self.aPlayer setImageWithURL:[NSURL URLWithString: @"https://i.imgur.com/vd4GuUh.png"] forKey:@"matte_EEKdlEml.matte"];
6667 // [self.aPlayer startAnimation];
6768 // }
6869 // } failureBlock:nil];
70+
71+ [parser parseWithNamed: @" heartbeat" inBundle: nil completionBlock: ^(SVGAVideoEntity * _Nonnull videoItem) {
72+ self.aPlayer .videoItem = videoItem;
73+ [self .aPlayer startAnimation ];
74+ } failureBlock: nil ];
6975}
7076
7177- (IBAction )onSliderClick : (UISlider *)sender {
0 commit comments