EZOpenSDK  v4.7.1
 All Classes Functions Properties
Instance Methods | Class Methods | Properties | List of all members
EZPlayer Class Reference

Player class. More...

#import <EZPlayer.h>

Inheritance diagram for EZPlayer:

Instance Methods

(BOOL) - destoryPlayer
 
(void) - setPlayerView:
 
(BOOL) - startRealPlay
 
(BOOL) - stopRealPlay
 
(void) - setPlayVerifyCode:
 
(BOOL) - openSound
 
(BOOL) - closeSound
 
(BOOL) - startVoiceTalk
 
(BOOL) - stopVoiceTalk
 
(BOOL) - audioTalkPressed:
 
(BOOL) - startPlaybackFromCloud:
 
(BOOL) - startPlaybackFromDevice:
 
(BOOL) - pausePlayback
 
(BOOL) - resumePlayback
 
(void) - seekPlayback:
 
(NSDate *) - getOSDTime
 
(BOOL) - stopPlayback
 
(BOOL) - startLocalRecord:
 
(BOOL) - startLocalRecordWithPath:
 
(BOOL) - stopLocalRecord
 
(UIImage *) - capturePicture:
 

Class Methods

(instancetype) + createPlayerWithDeviceSerial:cameraNo:
 
(instancetype) + createPlayerWithUrl:
 
(instancetype) + createPlayerWithUserId:cameraNo:streamType:
 

Properties

id< EZPlayerDelegatedelegate
 delegate
 
BOOL backgroundModeByPlayer
 Auto process when app enter background.YES:auto process;NO:no process,default YES.
 

Detailed Description

Player class.

Method Documentation

- (BOOL) audioTalkPressed: (BOOL)  isPressed

Method use in semiduplex intercom mode.Switch listen and speak mode.

Parameters
isPressedYES:speak mode;NO listen mode.default No.
Returns
YES/NO
- (UIImage *) capturePicture: (NSInteger)  quality

Capture picture

Parameters
qualitypicture quality.range 0-100. 100 highest quality.
Returns
image
- (BOOL) closeSound

close sound

Returns
YES/NO
+ (instancetype) createPlayerWithDeviceSerial: (NSString *)  deviceSerial
cameraNo: (NSInteger)  cameraNo 

Create player with device serial and channel number.

Parameters
deviceSerialdevice serial
cameraNochannel number
Returns
EZPlayer object
+ (instancetype) createPlayerWithUrl: (NSString *)  url

Create player with url address.

Parameters
urlurl address
Returns
EZPlayer object
+ (instancetype) createPlayerWithUserId: (NSInteger)  userId
cameraNo: (NSInteger)  cameraNo
streamType: (NSInteger)  streamType 

Create player with LAN device.

Parameters
userIduser id.Login LAN device then get the id.
cameraNochannel number
streamTypestream type 1:main stream 2:sub stream
Returns
EZPlayer object
- (BOOL) destoryPlayer

destory player

Returns
YES/NO;
- (NSDate *) getOSDTime

Get current play time progress

Returns
play time
- (BOOL) openSound

Open sound

Returns
YES/NO
- (BOOL) pausePlayback

Pause playback

- (BOOL) resumePlayback

Resume playback

- (void) seekPlayback: (NSDate *)  offsetTime

Play according to offset time

Parameters
offsetTimeoffset time
- (void) setPlayerView: (UIView *)  playerView

Set preview view

Parameters
playerViewpreview view
- (void) setPlayVerifyCode: (NSString *)  verifyCode

Set verify code

Parameters
verifyCodeverify code
- (BOOL) startLocalRecord: (void(^)(NSData *data))  recordDataBlock

Start record stream return stream data

Parameters
recordDataBlockcallback return stream data
Returns
YES/NO
- (BOOL) startLocalRecordWithPath: (NSString *)  path

Start record stream with storage path

Parameters
pathstorage path
Returns
YES/NO
- (BOOL) startPlaybackFromCloud: (EZCloudRecordFile *)  cloudFile

Start playback with cloud file.

Parameters
cloudFileplayback file in cloud
Returns
YES/NO
- (BOOL) startPlaybackFromDevice: (EZDeviceRecordFile *)  deviceFile

Start playback with file in SD card.

Parameters
deviceFileplayback file in SD card.
Returns
YES/NO
- (BOOL) startRealPlay

Start live

Returns
YES/NO
- (BOOL) startVoiceTalk

Start intercom

Returns
YES/NO
- (BOOL) stopLocalRecord

Stop record

Returns
YES/NO
- (BOOL) stopPlayback

Stop playback

- (BOOL) stopRealPlay

Stop live

Returns
YES/NO
- (BOOL) stopVoiceTalk

stop intercom

Returns
YES/NO

The documentation for this class was generated from the following file: