OOReactSkinModel.h
1 //
2 // OOReactSkinModel.h
3 // OoyalaSkinSDK
4 //
5 // Created by Maksim Kupetskii on 8/13/18.
6 // Copyright © 2018 ooyala. All rights reserved.
7 //
8 
9 #import <React/RCTBridgeDelegate.h>
10 
11 @class OOOoyalaPlayer;
12 @class OOSkinOptions;
14 @class RCTRootView;
15 @protocol OOSkinViewControllerDelegate;
16 
17 
18 @interface OOReactSkinModel : NSObject<RCTBridgeDelegate>
19 
20 @property (nonnull, nonatomic) NSDictionary *skinConfig;
21 @property (nullable, nonatomic, readwrite) OOClosedCaptionsStyle *closedCaptionsDeviceStyle;
22 @property (nonatomic, readonly) CGRect videoViewFrame;
23 
24 - (nonnull instancetype)initWithWithPlayer:(nonnull OOOoyalaPlayer *)player
25  skinOptions:(nonnull OOSkinOptions *)skinOptions
26  skinControllerDelegate:(nonnull id<OOSkinViewControllerDelegate>)skinControllerDelegate;
27 - (nonnull RCTRootView*)viewForModuleWithName:(nonnull NSString *)moduleName;
28 - (void)sendEventWithName:(nonnull NSString *)eventName body:(nullable id)body;
29 - (void)setIsReactReady:(BOOL)isReactReady;
30 - (void)ccStyleChanged:(nullable NSNotification *)notification;
31 
32 // Note: This is for IMA ad playback only.
33 // When IMA ad plays, IMA consumes clicks for learn more, skip, etc and notify ooyala if the click is not consumed.
34 // toggle play/pause as if the alice ui is clicked.
35 // see: OOSkinPlayerObserver bridgeAdTappedNotification
37 - (void)maybeLoadDiscovery:(nullable NSString *)embedCode;
38 - (void)setReactViewInteractionEnabled:(BOOL)reactViewInteractionEnabled;
39 
40 @end
41 
42 
43 @protocol OOReactSkinModelDelegate <NSObject>
44 // Handling events sent from RN
45 - (void)toggleFullscreen;
46 - (void)toggleStereoMode;
47 - (void)handlePip;
48 - (void)handleIconClick:(NSInteger)index;
49 - (void)handlePlayPause;
50 - (void)handlePlay;
51 - (void)handleReplay;
52 - (void)handleRewind;
53 - (void)handleSocialShare;
54 - (void)handleLearnMore;
55 - (void)handleSkip;
56 - (void)handleMoreOption;
57 - (void)handleUpNextDismiss;
58 - (void)handleUpNextClick;
59 - (void)handleLanguageSelection:(nullable NSString *)language;
60 - (void)handleAudioTrackSelection:(nonnull NSString *)audioTrackName;
61 - (void)handlePlaybackSpeedRateSelection:(nullable NSNumber *)selectedPlaybackSpeedRate;
62 - (void)handleOverlay:(nullable NSString *)url;
63 - (void)handleTouch:(nonnull NSDictionary *)result;
64 - (void)handleScrub:(Float64)position;
65 - (void)setEmbedCode:(nonnull NSString *)embedCode;
66 - (void)handleDiscoveryClick:(nullable NSString *)bucketInfo embedCode:(nonnull NSString *)embedCode;
67 - (void)handleDiscoveryImpress:(nullable NSString *)bucketInfo;
68 - (void)handleVolumeChanged:(float)volume;
69 
70 @end
OOClosedCaptionsStyle * closedCaptionsDeviceStyle
Definition: OOReactSkinModel.h:21
void handlePlayPause()
Definition: OOReactSkinModel.m:293
void handleMoreOption()
Definition: OOReactSkinModel.m:277
Definition: OOReactSkinModel.h:18
void handleLearnMore()
Definition: OOReactSkinModel.m:273
NSDictionary * skinConfig
Definition: OOReactSkinModel.h:20
void handlePip()
Definition: OOReactSkinModel.m:285
void toggleStereoMode()
Definition: OOReactSkinModel.m:379
void handleReplay()
Definition: OOReactSkinModel.m:303
void handleSkip()
Definition: OOReactSkinModel.m:334
void handleUpNextClick()
Definition: OOReactSkinModel.m:346
The OoyalaPlayer is the heart of the playback system.
Definition: OOOoyalaPlayerFacade.h:58
void handleUpNextDismiss()
Definition: OOReactSkinModel.m:350
CGRect videoViewFrame
Definition: OOReactSkinModel.h:22
void handleRewind()
Definition: OOReactSkinModel.m:307
Definition: OOSkinOptions.h:13
Defines text style to be used when displaying closed captions.
Definition: OOClosedCaptionsStyle.h:11
void handleSocialShare()
Definition: OOReactSkinModel.m:338
void playPauseFromAdTappedNotification()
Definition: OOReactSkinModel.m:297
void handlePlay()
Definition: OOReactSkinModel.m:289
void toggleFullscreen()
Definition: OOReactSkinModel.m:375