rFlex / SCRecorder

iOS camera engine with Vine-like tap to record, animatable filters, slow motion, segments editing
Apache License 2.0
3.06k stars 583 forks source link

how to Controls for fullscreen playback #366

Open NaiyerAghaz opened 7 years ago

NaiyerAghaz commented 7 years ago

how can i use like this
// Configure the movie player controller

   moviePlayer.controlStyle = MPMovieControlStyleDefault;

from SCVideoPlayerView class
NaiyerAghaz commented 7 years ago

please help me out as soon as possible. my full code is here i want to default controller for play back full screen.

 _player = [SCPlayer player];
    _player.delegate = self;
    playerView = [[SCVideoPlayerView alloc] initWithPlayer:_player];
    playerView.frame = self.vWRecording.frame;
    playerView.playerLayer.videoGravity = AVLayerVideoGravityResize;
    [playerView sizeToFit];

    [self.vWRecording insertSubview:playerView aboveSubview:self.vWRecording];
    playerView.SCImageViewEnabled=YES;

  UITapGestureRecognizer *TapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(playerViewTouch:)];
    self.vWRecording.userInteractionEnabled = YES;
    [self.vwtranparant addGestureRecognizer:TapRecognizer];

.............
-(void)playerViewTouch :(UITapGestureRecognizer *)gesture{

    [_player setItemByAsset:recordSession.assetRepresentingSegments];
    if([_player isPlaying])

    {
        self.vwtranparant.hidden = NO;

        [_player pause];

    }else
    {

        self.btnPlay.selected = YES;
        self.vwtranparant.hidden = YES;

        [_player play];
    }

}