CoolVideoInfo.m 614 B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // Created by Caijinglong on 2019-03-15.
  3. //
  4. #import "CoolVideoInfo.h"
  5. @implementation CoolVideoInfo {
  6. }
  7. - (instancetype)init {
  8. self = [super init];
  9. if (self) {
  10. self.degree = 0;
  11. }
  12. return self;
  13. }
  14. - (NSDictionary *)toMap {
  15. NSMutableDictionary *dict = [NSMutableDictionary new];
  16. dict[@"width"] = @((int) self.size.width);
  17. dict[@"height"] = @((int) self.size.height);
  18. dict[@"duration"] = @(self.duration);
  19. dict[@"currentPosition"] = @(self.currentPosition);
  20. dict[@"isPlaying"] = @(self.isPlaying);
  21. dict[@"degree"] = @(self.degree);
  22. return dict;
  23. }
  24. @end