GDTSDKDefines.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //
  2. // GDTSDKDefines.h
  3. // GDTMobApp
  4. //
  5. // Created by royqpwang on 2017/11/6.
  6. // Copyright © 2017年 Tencent. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #if defined(__has_attribute)
  10. #if __has_attribute(deprecated)
  11. #define GDT_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
  12. #define GDT_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
  13. #else
  14. #define GDT_DEPRECATED_MSG_ATTRIBUTE(s)
  15. #define GDT_DEPRECATED_ATTRIBUTE
  16. #endif
  17. #else
  18. #define GDT_DEPRECATED_MSG_ATTRIBUTE(s)
  19. #define GDT_DEPRECATED_ATTRIBUTE
  20. #endif
  21. #define GDTScreenHeight ([UIScreen mainScreen].bounds.size.height)
  22. #define GDTScreenWidth ([UIScreen mainScreen].bounds.size.width)
  23. /**
  24. * 视频播放器状态
  25. *
  26. * 播放器只可能处于以下状态中的一种
  27. *
  28. */
  29. typedef NS_ENUM(NSUInteger, GDTMediaPlayerStatus) {
  30. GDTMediaPlayerStatusInitial = 0, // 初始状态
  31. GDTMediaPlayerStatusLoading = 1, // 加载中
  32. GDTMediaPlayerStatusStarted = 2, // 开始播放
  33. GDTMediaPlayerStatusPaused = 3, // 用户行为导致暂停
  34. GDTMediaPlayerStatusError = 4, // 播放出错
  35. GDTMediaPlayerStatusStoped = 5, // 播放停止
  36. };
  37. typedef enum GDTSDKLoginType {
  38. GDTSDKLoginTypeUnknow = 0,
  39. GDTSDKLoginTypeWeiXin = 1, //微信账号
  40. GDTSDKLoginTypeQQ = 2, //QQ账号
  41. } GDTSDKLoginType;
  42. typedef NS_ENUM(NSUInteger, GDTVideoPlayPolicy) {
  43. GDTVideoPlayPolicyUnknow = 0, // 默认值,未设置
  44. GDTVideoPlayPolicyAuto = 1, // 用户角度看起来是自动播放
  45. GDTVideoPlayPolicyManual = 2 // 用户角度看起来是手动播放或点击后播放
  46. };
  47. typedef NS_ENUM(NSUInteger, GDTVideoRenderType) {
  48. GDTVideoRenderTypeUnknow = 0,
  49. GDTVideoRenderTypeSDK = 1,
  50. GDTVideoRenderTypeDeveloper = 2
  51. };
  52. typedef NS_ENUM (NSUInteger, GDTRewardAdType) {
  53. GDTRewardAdTypeVideo = 0,//激励视频
  54. GDTRewardAdTypePage = 1 //激励浏览
  55. };
  56. //static inline BOOL isIPhoneXSeries() {
  57. // if (@available(iOS 11.0, *)) {
  58. // UIWindow *mainWindow = [[[UIApplication sharedApplication] delegate] window];
  59. // if (mainWindow.safeAreaInsets.bottom > 0.0) {
  60. // return YES;
  61. // }
  62. // }
  63. // return NO;
  64. //}