Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Use a dispatch for setting the vpv.frame #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion prototype/VideoPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

@import UIKit;
@import AVFoundation;
@import Dispatch;


@interface VideoPlayerView : UIView
@property (nonatomic) AVPlayer *player;
Expand Down Expand Up @@ -69,7 +71,10 @@ - (int) isPlaying {
return YES;
}

vpv.frame = window.frame;
dispatch_async(dispatch_get_main_queue(), ^{
vpv.frame = window.frame;
});


if (! player.rate) {
[ self stop ];
Expand Down