-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathBrightcovePlayerSDK-Swift.h
7712 lines (7390 loc) · 424 KB
/
BrightcovePlayerSDK-Swift.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
#ifndef BRIGHTCOVEPLAYERSDK_SWIFT_H
#define BRIGHTCOVEPLAYERSDK_SWIFT_H
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#if defined(__OBJC__)
#include <Foundation/Foundation.h>
#endif
#if defined(__cplusplus)
#include <cstdint>
#include <cstddef>
#include <cstdbool>
#include <cstring>
#include <stdlib.h>
#include <new>
#include <type_traits>
#else
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <string.h>
#endif
#if defined(__cplusplus)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnon-modular-include-in-framework-module"
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
# include <ptrauth.h>
#else
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
# ifndef __ptrauth_swift_value_witness_function_pointer
# define __ptrauth_swift_value_witness_function_pointer(x)
# endif
# ifndef __ptrauth_swift_class_method_pointer
# define __ptrauth_swift_class_method_pointer(x)
# endif
#pragma clang diagnostic pop
#endif
#pragma clang diagnostic pop
#endif
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if !defined(SWIFT_RUNTIME_NAME)
# if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
# else
# define SWIFT_RUNTIME_NAME(X)
# endif
#endif
#if !defined(SWIFT_COMPILE_NAME)
# if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
# else
# define SWIFT_COMPILE_NAME(X)
# endif
#endif
#if !defined(SWIFT_METHOD_FAMILY)
# if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
# else
# define SWIFT_METHOD_FAMILY(X)
# endif
#endif
#if !defined(SWIFT_NOESCAPE)
# if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
# else
# define SWIFT_NOESCAPE
# endif
#endif
#if !defined(SWIFT_RELEASES_ARGUMENT)
# if __has_attribute(ns_consumed)
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
# else
# define SWIFT_RELEASES_ARGUMENT
# endif
#endif
#if !defined(SWIFT_WARN_UNUSED_RESULT)
# if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
# else
# define SWIFT_WARN_UNUSED_RESULT
# endif
#endif
#if !defined(SWIFT_NORETURN)
# if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
# else
# define SWIFT_NORETURN
# endif
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if !defined(SWIFT_DEPRECATED_OBJC)
# if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
# else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
# endif
#endif
#if defined(__OBJC__)
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#endif
#if !defined(SWIFT_EXTERN)
# if defined(__cplusplus)
# define SWIFT_EXTERN extern "C"
# else
# define SWIFT_EXTERN extern
# endif
#endif
#if !defined(SWIFT_CALL)
# define SWIFT_CALL __attribute__((swiftcall))
#endif
#if !defined(SWIFT_INDIRECT_RESULT)
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
#endif
#if !defined(SWIFT_CONTEXT)
# define SWIFT_CONTEXT __attribute__((swift_context))
#endif
#if !defined(SWIFT_ERROR_RESULT)
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
#endif
#if defined(__cplusplus)
# define SWIFT_NOEXCEPT noexcept
#else
# define SWIFT_NOEXCEPT
#endif
#if !defined(SWIFT_C_INLINE_THUNK)
# if __has_attribute(always_inline)
# if __has_attribute(nodebug)
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
# else
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
# endif
# else
# define SWIFT_C_INLINE_THUNK inline
# endif
#endif
#if defined(_WIN32)
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
#endif
#else
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL
#endif
#endif
#if defined(__OBJC__)
#if __has_feature(objc_modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import AVFoundation;
@import CoreFoundation;
@import CoreMedia;
@import Foundation;
@import ObjectiveC;
@import UIKit;
#endif
#import <BrightcovePlayerSDK/BrightcovePlayerSDK.h>
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
#pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="BrightcovePlayerSDK",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if defined(__OBJC__)
@class NSString;
/// This object represents an ad.
SWIFT_CLASS("_TtC19BrightcovePlayerSDK6BCOVAd")
@interface BCOVAd : NSObject
/// Is this ad skippable. Boolean NSNumber.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull PropertyKeySkippable;)
+ (NSString * _Nonnull)PropertyKeySkippable SWIFT_WARN_UNUSED_RESULT;
/// Skip time. NSNumber seconds after which you can skip the ad.
/// Ignored unless kBCOVAdPropertyKeySkippable is “YES”.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull PropertyKeySkipTime;)
+ (NSString * _Nonnull)PropertyKeySkipTime SWIFT_WARN_UNUSED_RESULT;
/// Array of NSStrings representing Clickthrough URLs
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull PropertyKeyClickthroughURLs;)
+ (NSString * _Nonnull)PropertyKeyClickthroughURLs SWIFT_WARN_UNUSED_RESULT;
/// Array of NSStrings representing Tracking URLs
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull PropertyKeyTrackingURLs;)
+ (NSString * _Nonnull)PropertyKeyTrackingURLs SWIFT_WARN_UNUSED_RESULT;
/// The title of the ad.
@property (nonatomic, readonly, copy) NSString * _Nonnull title;
/// The id of the ad.
@property (nonatomic, readonly, copy) NSString * _Nonnull adId;
/// The begin time of the ad.
@property (nonatomic, readonly) CMTime beginTime;
/// The duration of the ad.
@property (nonatomic, readonly) CMTime duration;
/// The properties of the ad.
@property (nonatomic, readonly, copy) NSDictionary * _Nonnull properties;
/// This is the designated initializer. It creates an ad.
/// \param title The title of the ad.
///
/// \param adId The id of the ad.
///
/// \param beginTime The time in the video in which the ad will play.
///
/// \param duration The duration of the ad.
///
/// \param properties The properties of the ad.
///
///
/// returns:
/// An initialized ad.
- (nonnull instancetype)initWithTitle:(NSString * _Nonnull)title adId:(NSString * _Nonnull)adId beginTime:(CMTime)beginTime duration:(CMTime)duration properties:(NSDictionary * _Nullable)properties OBJC_DESIGNATED_INITIALIZER;
/// Returns true if <code>ad</code> is equivalent to this instance.
/// \param ad The ad to test for equivalence with this instance.
///
///
/// returns:
/// Whether <code>ad</code> is equivalent to this instance.
- (BOOL)isEqualToAd:(BCOVAd * _Nonnull)ad SWIFT_WARN_UNUSED_RESULT;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@property (nonatomic, readonly) NSUInteger hash;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
/// This object represents a sequence of ads intended to be viewed in sequence,
/// at the same point in the video.
SWIFT_CLASS("_TtC19BrightcovePlayerSDK14BCOVAdSequence")
@interface BCOVAdSequence : NSObject
/// The begin time of the sequence.
@property (nonatomic, readonly) CMTime beginTime;
/// The duration of the sequence.
@property (nonatomic, readonly) CMTime duration;
/// /The ads that make up the sequence.
@property (nonatomic, readonly, copy) NSArray<BCOVAd *> * _Nonnull ads;
/// The properties of the sequence.
@property (nonatomic, readonly, copy) NSDictionary * _Nonnull properties;
/// This is the designated initializer. It creates an ad sequence.
/// \param ads The ads that make up the sequence.
///
/// \param properties The properties of the ad sequence.
///
///
/// returns:
/// An initialized ad sequence.
- (nonnull instancetype)initWithAds:(NSArray<BCOVAd *> * _Nonnull)ads properties:(NSDictionary * _Nonnull)properties OBJC_DESIGNATED_INITIALIZER;
/// Returns true if <code>adSequence</code> is equivalent to this instance.
/// \param adSequence The ad sequence to test for equivalence with this instance.
///
///
/// returns:
/// Whether <code>adSequence</code> is equivalent to this instance.
- (BOOL)isEqualToAdSequence:(BCOVAdSequence * _Nonnull)adSequence SWIFT_WARN_UNUSED_RESULT;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@property (nonatomic, readonly) NSUInteger hash;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
@class BCOVBasicSessionProviderOptions;
/// The basic playback session provider provides core functionality to yield
/// playback sessions corresponding to an enumeration of BCOVVideo objects.
SWIFT_CLASS("_TtC19BrightcovePlayerSDK24BCOVBasicSessionProvider")
@interface BCOVBasicSessionProvider : NSObject <BCOVPlaybackSessionProvider>
/// Returns a basic session provider initialized with the specified options.
/// \param options The options for the session provider to return.
///
///
/// returns:
/// A basic playback session provider configured with the specified options.
- (nonnull instancetype)initWithOptions:(BCOVBasicSessionProviderOptions * _Nullable)options OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
@class BCOVVideo;
@class BCOVSource;
/// Optional configuration for basic session providers.
SWIFT_CLASS("_TtC19BrightcovePlayerSDK31BCOVBasicSessionProviderOptions")
@interface BCOVBasicSessionProviderOptions : NSObject
/// The default policy selects the first source with a deliveryType of “HLS”. If no
/// source is found, it falls back to first source with a deliveryType of
/// “MP4”. If neither are found, it returns nil.
@property (nonatomic, copy) BCOVSource * _Nullable (^ _Nonnull sourceSelectionPolicy)(BCOVVideo * _Nullable);
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
/// The basic source selection policy decides which source to select from a BCOVVideo object.
SWIFT_CLASS("_TtC19BrightcovePlayerSDK30BCOVBasicSourceSelectionPolicy")
@interface BCOVBasicSourceSelectionPolicy : NSObject <NSCopying>
/// Select the first video in HLS with the specified scheme.
/// If no such source is found, the first HLS source with any scheme is returned.
/// If no HLS sources are present, the first MP4 is returned.
/// If none of the above is found, the first source of any kind is returned.
/// This is the default source selection policy (using BCOVSource.URLSchemeHTTPS as the scheme).
/// \param scheme The preferred scheme (BCOVSource.URLSchemeHTTP or BCOVSource.URLSchemeHTTPS) of the source URL.
///
///
/// returns:
/// A source selection policy that prefers HLS with the specified scheme.
+ (BCOVBasicSessionProviderSourceSelectionPolicy _Nonnull)sourceSelectionHLSWithScheme:(NSString * _Nonnull)scheme SWIFT_WARN_UNUSED_RESULT;
/// Select the first video in HLS, regardless of scheme.
/// If no HLS source is found, select the first source with a deliveryType of
/// “MP4”. If neither is found, the first source of any kind is returned.
///
/// returns:
/// A source selection policy that prefers HLS over MP4.
+ (BCOVBasicSessionProviderSourceSelectionPolicy _Nonnull)sourceSelectionHLS SWIFT_WARN_UNUSED_RESULT;
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
@protocol BCOVComponentIdentity;
/// Objects which must be registered with the BCOVPlayerSDKManager in order to
/// activate their functionality should conform to the BCOVComponent protocol.
SWIFT_PROTOCOL("_TtP19BrightcovePlayerSDK13BCOVComponent_")
@protocol BCOVComponent <NSObject>
/// Uniquely identifies this component with the returned component identity.
@property (nonatomic, readonly, strong) id <BCOVComponentIdentity> _Nonnull bcov_componentIdentity;
@optional
/// This method allows the BCOVPlayerSDKManager to supply contextual information
/// to this component when it is registered.
/// \param componentContext The contextual information to be communicated to this component.
///
- (void)bcov_setComponentContext:(NSDictionary * _Nonnull)componentContext;
@end
/// Identifies a BCOVComponent to the BCOVPlayerSDKManager.
SWIFT_PROTOCOL("_TtP19BrightcovePlayerSDK21BCOVComponentIdentity_")
@protocol BCOVComponentIdentity <NSObject>
/// A concrete class which uniquely identifies an object that conforms to the
/// BCOVComponent protocol.
@property (nonatomic, readonly) Class _Nonnull componentClass;
/// An identifier which uniquely identifies a specific version of an object that
/// conforms to the BCOVComponent protocol. This identifier should be updated
/// whenever a new version of the component is released, to help in identifying
/// which specific components have been registered with the BCOVPlayerSDKManager.
@property (nonatomic, readonly, copy) NSString * _Nonnull versionIdentifier;
@end
@class BCOVMutableCuePoint;
@class BCOVCuePoint;
/// Value class representing a cue point in the Brightcove Player SDK ecosystem.
/// A cue point is used to specify a position on the timeline of a piece of
/// content that can be used for any purpose (often for programmatic control
/// over when advertisements should be shown). When playback reaches a cue point,
/// the playback session sends an event on its <code>cuePoints</code> signal that includes
/// the BCOVCuePoint value.
SWIFT_PROTOCOL("_TtP19BrightcovePlayerSDK20BCOVCuePointProtocol_")
@protocol BCOVCuePointProtocol <NSObject>
/// The time at which the cue point occurs on the timeline of the BCOVVideo
/// which owns it.
@property (nonatomic, readonly) CMTime position;
/// An identifier for the kind of this cue point. There is no predetermined
/// enumeration of values for this property. The value to use may be required
/// by certain Brightcove Player SDK for iOS plugins, or it can be used for
/// some other client-specific purpose. The core SDK does not use this value.
@property (nonatomic, readonly, copy) NSString * _Nullable type;
/// Additional properties of the cue point. The keys and values are unspecified,
/// specific keys or values may be required by certain Brightcove Player SDK for
/// iOS plugins, or it can be used for some other client-specific purpose. The
/// core SDK does not use this value.
@property (nonatomic, readonly, copy) NSDictionary<NSString *, NSObject *> * _Nonnull properties;
/// Returns a modified version of this cue point. Because BCOVCuePoint objects
/// are immutable, an entirely new BCOVCuePoint must be created even if only
/// a single change is needed. Therefore, this method provides a convenient way
/// to obtain a temporary mutable copy of this instance and modify it (within
/// <code>updateBlock</code>).
/// Do not attempt to save a reference to the mutable cue point passed to
/// <code>updateBlock</code>, as the behavior of doing this is undefined. Instead, make
/// whatever modifications are necessary in the block and then capture the cue
/// point object returned from this method.
/// <ul>
/// <li>
/// Parameters:
/// </li>
/// <li>
/// updateBlock A block which is passed a mutable copy of this cue point.
/// </li>
/// </ul>
///
/// returns:
/// The copy of this cue point modified by <code>updateBlock</code>.
- (BCOVCuePoint * _Nonnull)update:(SWIFT_NOESCAPE void (^ _Nonnull)(BCOVMutableCuePoint * _Nonnull))updateBlock SWIFT_WARN_UNUSED_RESULT;
@end
/// Implementation of BCOVCuePointProtocol.
SWIFT_CLASS("_TtC19BrightcovePlayerSDK12BCOVCuePoint")
@interface BCOVCuePoint : NSObject <BCOVCuePointProtocol, NSCopying, NSMutableCopying>
/// Cue point type representing the start of an ad slot
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull TypeAdSlot;)
+ (NSString * _Nonnull)TypeAdSlot SWIFT_WARN_UNUSED_RESULT;
/// Cue point type representing a companion ad
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull TypeAdCompanion;)
+ (NSString * _Nonnull)TypeAdCompanion SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull PropertyKeyName;)
+ (NSString * _Nonnull)PropertyKeyName SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly, copy) NSString * _Nullable type;
@property (nonatomic, readonly) CMTime position;
@property (nonatomic, readonly, copy) NSDictionary<NSString *, NSObject *> * _Nonnull properties;
/// The cue point position immediately before the first time interval of the
/// video which owns it. This is generally used to implement pre-roll ad
/// functionality.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) CMTime PositionTypeBefore;)
+ (CMTime)PositionTypeBefore SWIFT_WARN_UNUSED_RESULT;
/// The cue point position immediately after the last time interval of the
/// video which owns it. This is generally used to implement post-roll ad
/// functionality.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) CMTime PositionTypeAfter;)
+ (CMTime)PositionTypeAfter SWIFT_WARN_UNUSED_RESULT;
/// Constructs a new cue point with the specified type and position.
/// \param type The type of the new cue point.
/// -position The position of the new cue point.
///
///
/// returns:
/// A new cue point with the specified type and position.
- (nonnull instancetype)initWithType:(NSString * _Nonnull)type position:(CMTime)position OBJC_DESIGNATED_INITIALIZER;
/// Constructs a new cue point with the specified type, position, and properties.
/// \param type The type of the new cue point.
///
/// \param position The position of the new cue point.
///
/// \param properties The properties of the new cue point.
///
///
/// returns:
/// A new cue point with the specified type, position, and properties.
- (nonnull instancetype)initWithType:(NSString * _Nullable)type position:(CMTime)position properties:(NSDictionary<NSString *, NSObject *> * _Nullable)properties OBJC_DESIGNATED_INITIALIZER;
- (BCOVCuePoint * _Nonnull)update:(SWIFT_NOESCAPE void (^ _Nonnull)(BCOVMutableCuePoint * _Nonnull))updateBlock SWIFT_WARN_UNUSED_RESULT;
/// Returns an NSComparisionResult indicating whether this cue point’s position
/// is earlier, the same, or later than the position of <code>cuePoint</code>. Only
/// positions are compared.
/// \param cuePoint The cue point whose position is to be compared with this instance.
///
///
/// returns:
/// Whether this cue point’s position is earlier, the same, or later.
- (enum NSComparisonResult)compare:(BCOVCuePoint * _Nonnull)cuePoint SWIFT_WARN_UNUSED_RESULT;
/// Returns <code>true</code> if this instance’s position is <code>position</code>.
/// \param position The position to test this instance’s position against.
///
///
/// returns:
/// Whether this instance has the specified position.
- (BOOL)hasPosition:(CMTime)position SWIFT_WARN_UNUSED_RESULT;
/// Returns <code>true</code> if <code>cuePoint</code> is equivalent to this instance.
/// \param cuePoint The cue point to test for equivalence with this instance.
///
///
/// returns:
/// Whether <code>cuePoint</code> is equivalent to this instance.
- (BOOL)isEqualToCuePoint:(BCOVCuePoint * _Nullable)cuePoint SWIFT_WARN_UNUSED_RESULT;
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
- (id _Nonnull)mutableCopyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@property (nonatomic, readonly) NSUInteger hash;
/// Returns a cue point with the specified type and properties whose position is
/// kBCOVCuePointPositionTypeAfter.
/// \param type The type of the cue point to return.
///
/// \param properties The properties of the cue point to return.
///
///
/// returns:
/// The “after” cue point with the specified type and properties.
+ (BCOVCuePoint * _Nonnull)afterCuePointOfType:(NSString * _Nullable)type properties:(NSDictionary<NSString *, NSObject *> * _Nullable)properties SWIFT_WARN_UNUSED_RESULT;
/// Returns a cue point with the specified type and properties whose position is
/// kBCOVCuePointPositionTypeBefore.
/// \param type The type of the cue point to return.
///
/// \param properties The properties of the cue point to return.
///
///
/// returns:
/// The “before” cue point with the specified type and properties.
+ (BCOVCuePoint * _Nonnull)beforeCuePointOfType:(NSString * _Nullable)type properties:(NSDictionary<NSString *, NSObject *> * _Nullable)properties SWIFT_WARN_UNUSED_RESULT;
/// Returns a cue point with the specified type and properties whose position in
/// seconds is at <code>positionInSeconds</code>.
/// \param type The type of the cue point to return.
///
/// \param positionInSeconds The position (in seconds) of this cue point into the timeline of the video which owns it.
///
/// \param properties The properties of the cue point to return.
///
///
/// returns:
/// The cue point with the specified type, position, and properties.
+ (BCOVCuePoint * _Nullable)cuePointWithType:(NSString * _Nullable)type positionInSeconds:(NSTimeInterval)positionInSeconds properties:(NSDictionary<NSString *, NSObject *> * _Nullable)properties SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
/// A collection of cue points, each element ordered by its position according
/// to the natural ordering of CMTime values.
SWIFT_CLASS("_TtC19BrightcovePlayerSDK22BCOVCuePointCollection")
@interface BCOVCuePointCollection : NSObject
/// Constructs and returns a BCOVCuePointCollection from the cue points in the
/// specified array. The returned collection will be ordered according to the
/// positions of the cue points. The ordering of multiple cue points with
/// the same position is not guaranteed.
/// \param cuePoints The new cue point collection’s cue points.
///
///
/// returns:
/// The new cue point collection with the specified cue points.
- (nonnull instancetype)initWithArray:(NSArray<BCOVCuePoint *> * _Nullable)cuePoints;
/// Constructs and returns a BCOVCuePointCollection with a single cue point.
/// \param cuePoint The new cue point collection’s cue point.
///
///
/// returns:
/// The new cue point collection with the specified cue point.
- (nonnull instancetype)initWithCuePoint:(BCOVCuePoint * _Nullable)cuePoint;
/// Returns this collection’s cue point objects in an array. The elements of the
/// array will have the same order as the ordering of cue points in this
/// collection.
///
/// returns:
/// This collection’s cue points in an array.
@property (nonatomic, readonly, copy) NSArray<BCOVCuePoint *> * _Nonnull array;
/// Returns the number of cue points in this collection.
///
/// returns:
/// The number of cue points in this collection.
@property (nonatomic, readonly) NSInteger count;
/// Returns all cue points in this collection after the specified time.
/// \param time The time after which corresponding cue points should be returned.
///
///
/// returns:
/// All cue points in this collection after the specified time.
- (BCOVCuePointCollection * _Nonnull)cuePointsAfterTime:(CMTime)time SWIFT_WARN_UNUSED_RESULT;
/// Returns all cue points in this collection before the specified time.
/// \param time The time before which corresponding cue points should be returned.
///
///
/// returns:
/// All cue points in this collection before the specified time.
- (BCOVCuePointCollection * _Nonnull)cuePointsBeforeTime:(CMTime)time SWIFT_WARN_UNUSED_RESULT;
/// Returns all cue points in this collection at exactly the specified time.
/// \param time The time at which corresponding cue points should be returned.
///
///
/// returns:
/// All cue points in this collection at exactly the specified time.
- (BCOVCuePointCollection * _Nonnull)cuePointsAtTime:(CMTime)time SWIFT_WARN_UNUSED_RESULT;
/// Returns all cue points in this collection at or after the specified time.
/// \param time The time at or after which corresponding cue points should be returned.
///
///
/// returns:
/// All cue points in this collection at or after the specified time.
- (BCOVCuePointCollection * _Nonnull)cuePointsAtOrAfterTime:(CMTime)time SWIFT_WARN_UNUSED_RESULT;
/// Returns all cue points in this collection at or before the specified time.
/// \param time The time at or before which corresponding cue points should be eturned.
///
///
/// returns:
/// All cue points in this collection at or before the specified time.
- (BCOVCuePointCollection * _Nonnull)cuePointsAtOrBeforeTime:(CMTime)time SWIFT_WARN_UNUSED_RESULT;
/// Returns all cue points in this collection between the specified times.
/// \param lowerBound The lower boundary, at or below which cue points should not be returned.
///
/// \param upperBound The upper boundary, at or above which cue points should not be returned.
///
///
/// returns:
/// All cue points in this collection between the specified times.
- (BCOVCuePointCollection * _Nonnull)cuePointsAfterTime:(CMTime)lowerBound beforeTime:(CMTime)upperBound SWIFT_WARN_UNUSED_RESULT;
/// Returns all cue points in this collection between the specified times,
/// inclusive of the upper bound.
/// \param lowerBound The lower boundary, at or below which cue points should not be returned.
///
/// \param upperBound The upper boundary, above which cue points should not be returned.
///
///
/// returns:
/// All cue points in this collection between the specified times.
- (BCOVCuePointCollection * _Nullable)cuePointsAfterTime:(CMTime)lowerBound atOrBeforeTime:(CMTime)upperBound SWIFT_WARN_UNUSED_RESULT;
/// Returns all cue points in this collection between the specified times,
/// inclusive of the lower bound.
/// \param lowerBound The lower boundary, below which cue points should not be returned.
///
/// \param upperBound The upper boundary, at or above which cue points should not be returned.
///
///
/// returns:
/// All cue points in this collection between the specified times.
- (BCOVCuePointCollection * _Nonnull)cuePointsAtOrAfterTime:(CMTime)lowerBound beforeTime:(CMTime)upperBound SWIFT_WARN_UNUSED_RESULT;
/// Returns all cue points in this collection, at or between the specified times.
/// \param lowerBound The lower boundary, below which cue points should not be returned.
///
/// \param upperBound The upper boundary, above which cue points should not be returned.
///
///
/// returns:
/// All cue points in this collection, at or between the specified times.
- (BCOVCuePointCollection * _Nonnull)cuePointsAtOrAfterTime:(CMTime)lowerBound atOrBeforeTime:(CMTime)upperBound SWIFT_WARN_UNUSED_RESULT;
/// Returns all cue points in this collection of the specified type.
/// \param type The type of cue points to be returned.
///
///
/// returns:
/// All cue points in this collection, of the specified type.
- (BCOVCuePointCollection * _Nonnull)cuePointsOfType:(NSString * _Nonnull)type SWIFT_WARN_UNUSED_RESULT;
/// Returns <code>true</code> if this instance has the same cue points in the same order as <code>collection</code>.
/// \param collection The collection with which to compare this instance.
///
///
/// returns:
/// Whether this instance is equivalent to <code>collection</code>.
- (BOOL)isEqualToCollection:(BCOVCuePointCollection * _Nullable)collection SWIFT_WARN_UNUSED_RESULT;
/// Returns the cue point at the specified index, or nil if the specified index
/// is greater than the highest index into the collection.
/// \param index The index into this collection of the desired cue point.
///
///
/// returns:
/// The cue point at the specified index, or nil if this collection does not have a cue point at that index.
- (BCOVCuePoint * _Nullable)objectAtIndexedSubscript:(NSInteger)index SWIFT_WARN_UNUSED_RESULT;
/// A boolean value to ignore cuepoints. This may be useful
/// if ads are being played in the current AVPlayer instance
/// and you want to ignore progress events temporarily until
/// the primary video is swapped back in.
@property (nonatomic) BOOL ignoreCuePoints;
/// Returns a new cue point collection containing the specified cue points.
/// \param cuePoints An array of cue point objects to include in the collection.
///
///
/// returns:
/// A new cue point collection containing the specified cue points.
+ (BCOVCuePointCollection * _Nonnull)collectionWithArray:(NSArray<BCOVCuePoint *> * _Nonnull)cuePoints SWIFT_WARN_UNUSED_RESULT;
/// Returns a singleton cue point collection containing no cue points.
///
/// returns:
/// A singleton cue point collection containing no cue points.
+ (BCOVCuePointCollection * _Nonnull)emptyCollection SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
@interface BCOVCuePointCollection (SWIFT_EXTENSION(BrightcovePlayerSDK)) <NSCopying>
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
@end
@interface BCOVCuePointCollection (SWIFT_EXTENSION(BrightcovePlayerSDK))
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@property (nonatomic, readonly) NSUInteger hash;
@end
@interface BCOVCuePointCollection (SWIFT_EXTENSION(BrightcovePlayerSDK))
- (void)observeValueForKeyPath:(NSString * _Nullable)keyPath ofObject:(id _Nullable)object change:(NSDictionary<NSKeyValueChangeKey, id> * _Nullable)change context:(void * _Nullable)context;
@end
typedef SWIFT_ENUM(NSInteger, BCOVEconomics, closed) {
BCOVEconomicsAdSupported = 0,
BCOVEconomicsFree = 1,
BCOVEconomicsPublisherPays = 2,
BCOVEconomicsPayMedia = 3,
};
@class NSError;
SWIFT_CLASS("_TtC19BrightcovePlayerSDK19BCOVErrorTranslator")
@interface BCOVErrorTranslator : NSObject
/// Returns a human readable error code from an <code>NSError</code>
/// The Brightcove iOS SDK has a number <code>NSError</code> objects that are created
/// in various instances, each one within a specific error domain with a specific error code.
/// This class can be used to translate one of these <code>NSError</code> object’s error code into a
/// human readable string.
/// \param error The NSError object to translate.
///
///
/// returns:
/// A readable error code. May be <code>nil</code> if the <code>NSError</code> is not an internal Brightcove error.
+ (NSString * _Nullable)readableErrorCodeForError:(NSError * _Nonnull)error SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
typedef SWIFT_ENUM(NSInteger, BCOVFPSAuthProxyErrorCode, closed) {
/// Request for Application Certificate failed.
BCOVFPSAuthProxyErrorCodeApplicationCertificateRequestFailed = 69401,
/// Request for Key failed.
BCOVFPSAuthProxyErrorCodeContentKeyRequestFailed = 69402,
/// Key request generation failed.
BCOVFPSAuthProxyErrorCodeContentKeyGenerationFailed = 69403,
BCOVFPSAuthProxyErrorCodeNoKeyRequestURLForRendition = 69404,
};
@class AVAssetResourceLoadingRequest;
@class NSData;
@class AVContentKeyRequest;
@class NSURLResponse;
@class NSDate;
/// Implement this protocol when interacting with a custom FPS license server.
SWIFT_PROTOCOL("_TtP19BrightcovePlayerSDK25BCOVFPSAuthorizationProxy_")
@protocol BCOVFPSAuthorizationProxy <NSObject>
@optional
/// Optional method.
/// This method is only called when downloading a video when the license has not
/// been preloaded prior to downloading.
/// Implement this method to handle retrieving the content identifier from the loading request.
/// This is called for each asset.
/// No guarantee is made as to the thread that this is called on.
/// You should return the content identifier corresponding to this loading request.
/// This is typically extracted from the “skd://…” URL in loadingRequest.request.URL.
/// The content identifier will be passed to [AVAssetResourceLoadingRequest
/// streamingContentKeyRequestDataForApp:contentIdentifier:options:error:]
/// to retrieve the SPC.
/// If this method is not provided, the default method will be used. The default method
/// removes “skd://” from loadingRequest.request.URL to generate the content identifier.
/// \param loadingRequest The skd:// loading request made for the asset.
///
///
/// returns:
/// The content identifier in a Data object.
- (NSData * _Nullable)contentIdentifierFromLoadingRequest:(AVAssetResourceLoadingRequest * _Nonnull)loadingRequest SWIFT_WARN_UNUSED_RESULT;
@required
/// Implement this method to handle retrieving the content identifier from the content key request.
/// This is called for each asset.
/// No guarantee is made as to the thread that this is called on.
/// You should return the content identifier corresponding to this content key request.
/// This is typically extracted from the “skd://…” value in keyRequest.identifier.
/// The content identifier will be passed to [AVContentKeySession makeStreamingContentKeyRequestDataForApp:
/// contentIdentifier:options:completionHandler] to retrieve the SPC.
/// \param keyRequest The AVContentKeyRequest for the asset.
///
///
/// returns:
/// The content identifier in a Data object.
- (NSData * _Nullable)contentIdentifierFromKeyRequest:(AVContentKeyRequest * _Nullable)keyRequest SWIFT_WARN_UNUSED_RESULT;
/// Implement this method to handle retrieving the content key for a video that
/// is being downloaded for offline playback. This is called for each asset.
/// No guarantee is made as to the thread that this is called on.
/// \param contentKeyIdentifier The “skd://…” loading request URL string made for the asset.
///
/// \param keyRequest The key request data returned by [AVAssetResourceLoadingRequest streamingContentKeyRequestDataForApp:contentIdentifier:options:error:].
///
/// \param source The BCOVSource used to make this request.
///
/// \param options The parameters originally passed to <code>-BCOVOfflineVideoManager requestVideoDownload:mediaSelections:parameters:completion:</code>
///
/// \param completionHandler The completion handler to return the content key. If returning an error, you must leave the contentkey and response parameters nil.
///
- (void)encryptedContentKeyForContentKeyIdentifier:(NSString * _Nonnull)contentKeyIdentifier contentKeyRequest:(NSData * _Nullable)keyRequest source:(BCOVSource * _Nullable)source options:(NSDictionary * _Nullable)options completionHandler:(void (^ _Nonnull)(NSURLResponse * _Nullable, NSData * _Nullable, NSDate * _Nullable, NSError * _Nullable))completionHandler;
@end
@class NSURL;
@class NSURLSession;
/// Class responsible for interacting with Brightcove FairPlay services.
SWIFT_CLASS("_TtC19BrightcovePlayerSDK26BCOVFPSBrightcoveAuthProxy")
@interface BCOVFPSBrightcoveAuthProxy : NSObject <BCOVFPSAuthorizationProxy>
/// Error domain for FairPlay Auth Proxy related errors.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull ErrorDomain;)
+ (NSString * _Nonnull)ErrorDomain SWIFT_WARN_UNUSED_RESULT;
/// Key for retreiving response data from an NSError object’s userInfo dictionary.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull ResponseData;)
+ (NSString * _Nonnull)ResponseData SWIFT_WARN_UNUSED_RESULT;
/// The base url for FairPlay related license requests. The default URL points to
/// fps.brightcove.com.
/// If set to nil, the default URL pointing at fps.brightcove.com will be re-created.
@property (nonatomic, copy) NSURL * _Nullable fpsBaseURL;
/// The key request URL for FairPlay related key requests.
/// Normally set to nil, in which case the key request URL
/// will be retrieved from the Video Cloud Playback API response.
@property (nonatomic, copy) NSURL * _Nullable keyRequestURL;
/// URLSession shared across all network calls to the BCOVFPSBrightcoveAuthProxy.
/// This object is created when the Playback Service is initialized.
/// If you wish to use your own URLSession you can set it here.
/// If set to nil, the default URLSession will be re-created.
@property (nonatomic, strong) NSURLSession * _Nullable sharedURLSession;
/// Creates a BCOVFPSAuthorizationProxy to interacts with fps.brightcove.com.
/// \param pubId The publisher id. Must not be nil.
///
/// \param appId The application id registered with fps.brightcove.com. May be nil
/// if not using fps.brightcove.com.
///
///
/// returns:
/// An initialized proxy.
- (nonnull instancetype)initWithPublisherId:(NSString * _Nullable)pubId applicationId:(NSString * _Nullable)appId OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
/// Retrieves the Application Certificate. This should be done as soon as possible
/// and should be cached for no longer than 6 hours.
/// \param completionHandler Executed when the request is completed. If applicationCetificate
/// is nil, the error will be populated. The block
/// will be executed on the main thread.
///
- (void)retrieveApplicationCertificate:(void (^ _Nonnull)(NSData * _Nullable, NSError * _Nullable))completionHandler;
@end
@interface BCOVFPSBrightcoveAuthProxy (SWIFT_EXTENSION(BrightcovePlayerSDK))
- (NSData * _Nullable)contentIdentifierFromLoadingRequest:(AVAssetResourceLoadingRequest * _Nonnull)loadingRequest SWIFT_WARN_UNUSED_RESULT;
- (NSData * _Nullable)contentIdentifierFromKeyRequest:(AVContentKeyRequest * _Nullable)keyRequest SWIFT_WARN_UNUSED_RESULT;
- (void)encryptedContentKeyForContentKeyIdentifier:(NSString * _Nonnull)contentKeyIdentifier contentKeyRequest:(NSData * _Nullable)keyRequest source:(BCOVSource * _Nullable)source options:(NSDictionary * _Nullable)options completionHandler:(void (^ _Nonnull)(NSURLResponse * _Nullable, NSData * _Nullable, NSDate * _Nullable, NSError * _Nullable))completionHandler;
@end
SWIFT_CLASS("_TtC19BrightcovePlayerSDK16BCOVFPSConstants")
@interface BCOVFPSConstants : NSObject
/// Error domain for FairPlay related errors.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull ErrorDomain;)
+ (NSString * _Nonnull)ErrorDomain SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
typedef SWIFT_ENUM(NSInteger, BCOVFPSErrorCode, closed) {
/// Error occured requesting content key.
BCOVFPSErrorCodeStreamingContentKeyRequest = 69401,
/// Error occured requesting application certificate.
BCOVFPSErrorCodeApplicationCertificateRequest = 69404,
};
SWIFT_CLASS("_TtC19BrightcovePlayerSDK19BCOVFairPlayLicense")
@interface BCOVFairPlayLicense : NSObject
/// A Boolean boxed in an NSValue.
/// If <code>true</code>, the downloaded FairPlay content will be assigned
/// a license that does not expire.
/// If absent or <code>false</code>, the <code>BCOVFairPlayLicense/RentalDurationKey</code> must be set.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull PurchaseKey;)
+ (NSString * _Nonnull)PurchaseKey SWIFT_WARN_UNUSED_RESULT;
/// Specifies the rental duration of the FairPlay license, in seconds.
/// The number should be a positive integer greater than zero.
/// The rental period begins as soon as the download request is made.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull RentalDurationKey;)
+ (NSString * _Nonnull)RentalDurationKey SWIFT_WARN_UNUSED_RESULT;
/// Specifies the duration of the FairPlay License, in seconds,
/// after playback has started.
/// The number should be a positive integer greater than zero.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull PlayDurationKey;)
+ (NSString * _Nonnull)PlayDurationKey SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end