KKVideoInfo.m 455 B

12345678910111213141516171819202122
  1. //
  2. // Created by Caijinglong on 2019-03-15.
  3. //
  4. #import "KKVideoInfo.h"
  5. @implementation KKVideoInfo {
  6. }
  7. - (NSDictionary *)toMap {
  8. NSMutableDictionary *dict = [NSMutableDictionary new];
  9. dict[@"width"] = @((int) self.size.width);
  10. dict[@"height"] = @((int) self.size.height);
  11. dict[@"duration"] = @(self.duration);
  12. dict[@"currentPosition"] = @(self.currentPosition);
  13. dict[@"isPlaying"] = @(self.isPlaying);
  14. return dict;
  15. }
  16. @end