Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: Fix demo.
  • Loading branch information
errnull committed Oct 16, 2019
commit e6a02939503ecad5fa2339713e134cda491c0a5e
26 changes: 13 additions & 13 deletions SVGAPlayer/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ - (IBAction)onChange:(id)sender {
@"https://github.com/yyued/SVGA-Samples/blob/master/rose.svga?raw=true",
];
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
// [parser parseWithURL:[NSURL URLWithString:items[arc4random() % items.count]]
// completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
// [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
// if (videoItem != nil) {
// self.aPlayer.videoItem = videoItem;
// [self.aPlayer startAnimation];
// }
// } failureBlock:nil];
[parser parseWithURL:[NSURL URLWithString:items[arc4random() % items.count]]
completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
if (videoItem != nil) {
self.aPlayer.videoItem = videoItem;
[self.aPlayer startAnimation];
}
} failureBlock:nil];

// [parser parseWithURL:[NSURL URLWithString:@"https://github.com/svga/SVGA-Samples/raw/master_aep/BitmapColorArea1.svga"] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
// if (videoItem != nil) {
// self.aPlayer.videoItem = videoItem;
Expand All @@ -68,10 +68,10 @@ - (IBAction)onChange:(id)sender {
// }
// } failureBlock:nil];

[parser parseWithNamed:@"heartbeat" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
self.aPlayer.videoItem = videoItem;
[self.aPlayer startAnimation];
} failureBlock:nil];
// [parser parseWithNamed:@"heartbeat" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
// self.aPlayer.videoItem = videoItem;
// [self.aPlayer startAnimation];
// } failureBlock:nil];
}

- (IBAction)onSliderClick:(UISlider *)sender {
Expand Down