BradmaxPlayerSdk
BPSPlayer.h
1 #ifndef BPSPlayer_h
2 #define BPSPlayer_h
3 
4 #import <WebKit/WebKit.h>
5 #import <Foundation/Foundation.h>
6 #import "BPSMPlayerConfig.h"
7 #import "BPSMMedia.h"
8 #import "BPSPlayerDelegate.h"
9 
11 @interface BPSPlayer : WKWebView <WKScriptMessageHandler, WKNavigationDelegate, WKUIDelegate, UIScrollViewDelegate>
12 
13 @property(readonly) BPSMPlayerConfig *playerConfig;
14 
26 @property NSString *remoteBradmaxPlayerEmbedId;
27 
29 @property NSString *localBradmaxPlayerJs;
30 
31 // Private / internal use only settings.
32 @property NSString *_bradmaxPlayerVersion;
33 @property BOOL _hasPlayerLoaded;
34 @property NSMutableArray *_jsScriptsOnPlayerPageLoad;
35 
36 // - Fullscreen support internal properties.
37 @property BOOL _isInFullscreen;
38 @property CGRect _fullscreenBackFrame;
39 @property UIViewAutoresizing _fullscreenBackAutoresizingMask;
40 @property UIView *_fullscreenBackSuperview;
41 @property NSUInteger _fullscreenBackIndexInSuperview;
42 
44 @property(nonatomic, weak) id <BPSPlayerDelegate> playerDelegate;
45 
52 - (void)loadVideoByUrl: (NSString *)mediaSourceUrl
53  withPosterUrl:(NSString *)posterUrl;
54 
59 - (void)loadVideoByUrl: (NSString *)mediaSourceUrl;
60 
64 - (void) addMediaToPlayback:(BPSMMedia *)media;
65 
67 - (void) clearPlaybackList;
68 
72 - (NSMutableArray *) getPlaybackList;
73 
77 - (void) load;
78 
82 - (NSString *) getVersion;
83 
86 - (void) play;
87 
90 - (void) pause;
91 
94 - (void) playPause;
95 
100 - (void)seek:(double) position;
101 
106 - (void)setVolume:(double) volume;
107 
109 - (void) toggleFullscreen;
110 
111 @end
112 #endif
void load()
Loads into WebView configured before player.
Definition: BPSPlayer.m:181
void play()
Starts media playback.
Definition: BPSPlayer.m:331
void pause()
Pause media playback.
Definition: BPSPlayer.m:335
NSMutableArray * getPlaybackList()
Return player current configured Media playlist.
Definition: BPSPlayer.m:49
void toggleFullscreen()
Toggle fullscreen mode.
Definition: BPSPlayer.m:355
NSString * remoteBradmaxPlayerEmbedId
When this identifier is defined, then player version is loaded from bradmax platform.
Definition: BPSPlayer.h:26
Main bradmax player class.
Definition: BPSPlayer.m:21
NSString * localBradmaxPlayerJs
Set customized bradmax JavaScript player asset file.
Definition: BPSPlayer.h:29
Bradmax player configuration object.
Definition: BPSMPlayerConfig.m:5
void clearPlaybackList()
Clears player playback list.
Definition: BPSPlayer.m:44
Represents single video content. It can be in multiple formats and qualities.
Definition: BPSMMedia.m:8
id< BPSPlayerDelegate > playerDelegate
Player delegate for handling player events.
Definition: BPSPlayer.h:44
void playPause()
Toggle between play and pause.
Definition: BPSPlayer.m:339
NSString * getVersion()
Get player version.
Definition: BPSPlayer.m:327