mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Video avatar fixes
This commit is contained in:
parent
a67e5143e1
commit
51a95f3f6f
@ -486,33 +486,33 @@
|
|||||||
progress = 1.0f;
|
progress = 1.0f;
|
||||||
}
|
}
|
||||||
} else if ([next isKindOfClass:[AVAsset class]]) {
|
} else if ([next isKindOfClass:[AVAsset class]]) {
|
||||||
// strongSelf->_playerItem = [AVPlayerItem playerItemWithAsset:(AVAsset *)next];
|
strongSelf->_playerItem = [AVPlayerItem playerItemWithAsset:(AVAsset *)next];
|
||||||
// strongSelf->_player = [AVPlayer playerWithPlayerItem:strongSelf->_playerItem];
|
strongSelf->_player = [AVPlayer playerWithPlayerItem:strongSelf->_playerItem];
|
||||||
// strongSelf->_player.actionAtItemEnd = AVPlayerActionAtItemEndNone;
|
strongSelf->_player.actionAtItemEnd = AVPlayerActionAtItemEndNone;
|
||||||
// strongSelf->_player.muted = true;
|
strongSelf->_player.muted = true;
|
||||||
//
|
|
||||||
// [photoEditor setPlayerItem:strongSelf->_playerItem forCropRect:photoEditor.cropRect cropRotation:0.0 cropOrientation:photoEditor.cropOrientation cropMirrored:photoEditor.cropMirrored];
|
[photoEditor setPlayerItem:strongSelf->_playerItem forCropRect:photoEditor.cropRect cropRotation:0.0 cropOrientation:photoEditor.cropOrientation cropMirrored:photoEditor.cropMirrored];
|
||||||
//
|
|
||||||
// TGDispatchOnMainThread(^
|
TGDispatchOnMainThread(^
|
||||||
// {
|
{
|
||||||
// if ([strongSelf->_currentTabController isKindOfClass:[TGPhotoAvatarCropController class]])
|
if ([strongSelf->_currentTabController isKindOfClass:[TGPhotoAvatarCropController class]])
|
||||||
// [(TGPhotoAvatarCropController *)strongSelf->_currentTabController setPlayer:strongSelf->_player];
|
[(TGPhotoAvatarCropController *)strongSelf->_currentTabController setPlayer:strongSelf->_player];
|
||||||
//
|
|
||||||
// [strongSelf->_previewView performTransitionInWithCompletion:^
|
[strongSelf->_previewView performTransitionInWithCompletion:^
|
||||||
// {
|
{
|
||||||
// }];
|
}];
|
||||||
//
|
|
||||||
// if (strongSelf->_scheduledVideoPlayback) {
|
if (strongSelf->_scheduledVideoPlayback) {
|
||||||
// strongSelf->_scheduledVideoPlayback = false;
|
strongSelf->_scheduledVideoPlayback = false;
|
||||||
// [strongSelf startVideoPlayback:true];
|
[strongSelf startVideoPlayback:true];
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
progress = 1.0f;
|
progress = 1.0f;
|
||||||
doneEnabled = true;
|
doneEnabled = true;
|
||||||
} else if ([next isKindOfClass:[NSNumber class]]) {
|
} else if ([next isKindOfClass:[NSNumber class]]) {
|
||||||
progress = [next floatValue];
|
progress = [next floatValue];
|
||||||
progressVisible = true;
|
progressVisible = true;
|
||||||
// doneEnabled = false;
|
doneEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
TGDispatchOnMainThread(^{
|
TGDispatchOnMainThread(^{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user