https://github.com/0xced/XCDYouTubeKit/issues/157

MPMoviePlayerViewController

@interface MPMoviePlayerController (BackgroundPlayback)

#import "MPMoviePlayerController+BackgroundPlayback.h"
#
#

Thread 1: Exception: "MPMoviePlayerController is no longer available. Use AVPlayerViewController in AVKit."

_player = [[MPMoviePlayerController alloc] initWithContentURL:nil];

AVPlayer *_player;
_player = [[AVPlayer alloc] initWithContentURL:nil];
    _player = [[AVPlayer alloc] initWithURL:nil];

Property 'view' not found on object of type 'AVPlayer *'

{
"body":{"id":"2gN5l1PJQHo=","sex":"GOXjbJ8/rFQ=","phone":"xqHmggVdb1S7qZ7Or9Vepg==","no_mbr_site":"FK/Qli9YF2xXjm4Ki1ESAw==","no_mbr":"+vjuEVubVKFXjm4Ki1ESAw==","email":"PI9YuD4aPx2i8FIU8eJ/83fWc4rxIrNp","yn_join_mbr_site":"XvOWbi0Kw3s=","mail_yn":"XvOWbi0Kw3s=","name":"TwjUVvceNiQpfBvH15RFtA==","brth_dt":"rzhLH0n8r11Xjm4Ki1ESAw==","card_list":[],"sms_yn":"XvOWbi0Kw3s="},
"header":
{
"message":"success",
"result":"0000",
"running_time":"71",
"session_key":"abcdefgggghhh"
}
}

Network Not Reachable"

 UIAlertView *alert =[[UIAlertView alloc] initWithTitle:@"" message:NSLocalizedString(@"Network Not Reachable",nil) delegate:nil cancelButtonTitle:@"다시시도" otherButtonTitles:nil];

{
"body":{"id":"2gN5l1PJQHo=","sex":"GOXjbJ8/rFQ=","phone":"xqHmggVdb1S7qZ7Or9Vepg==","no_mbr_site":"FK/Qli9YF2xXjm4Ki1ESAw==","no_mbr":"+vjuEVubVKFXjm4Ki1ESAw==","email":"PI9YuD4aPx2i8FIU8eJ/83fWc4rxIrNp","yn_join_mbr_site":"XvOWbi0Kw3s=","mail_yn":"XvOWbi0Kw3s=","name":"TwjUVvceNiQpfBvH15RFtA==","brth_dt":"rzhLH0n8r11Xjm4Ki1ESAw==","card_list":[],"sms_yn":"XvOWbi0Kw3s="},
"header":
{
"message":"success",
"result":"0000",
"running_time":"158",
"session_key":"abcdefgggghhh"
}
}


, length=503


2020-04-13 04:11:48.531695+0900 DaelimMuseum[69671:10470414] <PlayerViewController.m:(557)> play url = https://www.daelimmuseum.org:443/att/%5B365994_372809%5D20200412210543.mp4

    
    NSURL *url = [[NSURL alloc] initWithString:playurl]; // url can be remote or local

MPMoviePlayerController 마이그레이션 완료. 역시 작업은 새벽인가.
최적은 작업 타임존은 3~5시

 



- (void)pinchZoom:(UIPinchGestureRecognizer *)recognizer
{
    NSLog(@"Pinch scale: %f", recognizer.scale);
    
    if(recognizer.scale < 1) recognizer.scale = 1;
    
    CGAffineTransform transform = CGAffineTransformMakeScale(recognizer.scale, recognizer.scale);
    //                                       you can implement any int/float value in context of what scale you want to zoom in or out
    mainPanel.transform = transform;
    
    // make these static so they can be used across gesture states
    static CGAffineTransform initialTransform;
    static CGPoint initialAnchor;
    
    if (recognizer.state == UIGestureRecognizerStateBegan) {
        // save these for later states
        initialTransform = recognizer.view.transform;
        initialAnchor = recognizer.view.layer.anchorPoint;
        
        // get the center point of the pinch
        CGPoint touch = [recognizer locationInView:mainPanel];
        
        // anchor point is relative to the view bounds:  0 ... up to 1.0, for both x and y
        CGFloat anchorX = touch.x / recognizer.view.bounds.size.width;
        CGFloat anchorY = touch.y / recognizer.view.bounds.size.height;
        
        // set the layer anchor point AND position, to where the view was initially pinched
        [self setAnchorPoint:CGPointMake(anchorX,anchorY) forView:mainPanel];
        
    } else if (recognizer.state == UIGestureRecognizerStateChanged) {
        // perform the pinch zoom
        mainPanel.transform = CGAffineTransformScale(initialTransform,recognizer.scale,recognizer.scale);
        
    } else if (recognizer.state == UIGestureRecognizerStateEnded) {
        // reset the scale when it's done
        recognizer.scale = 1;
        
        // restore the original anchor point
        [self setAnchorPoint:initialAnchor forView:mainPanel];
    }

    CGRect transformedBounds = CGRectApplyAffineTransform(mainPanel.bounds, mainPanel.transform);
    
    [_scrollview setContentSize:CGSizeMake(transformedBounds.size.width, transformedBounds.size.height)];
//    [_scrollview setContentSize:CGSizeMake(transformedBounds.size.width / 2.7, transformedBounds.size.height / 2.7)];
    
}

'Blog History' 카테고리의 다른 글

169  (0) 2020.04.14
168  (0) 2020.04.14
166  (0) 2020.04.12
165  (0) 2020.04.12
164  (0) 2020.04.12

+ Recent posts