mirror of
https://github.com/yattee/yattee.git
synced 2025-01-09 19:10:32 +05:30
Minor improvements
This commit is contained in:
parent
525a01eaed
commit
5c89ae9c66
0
ISSUE_TEMPLATE.md
Normal file
0
ISSUE_TEMPLATE.md
Normal file
@ -52,8 +52,9 @@ final class PlayerControlsModel: ObservableObject {
|
||||
}
|
||||
|
||||
func show() {
|
||||
withAnimation(PlayerControls.animation) {
|
||||
player.backend.updateControls()
|
||||
|
||||
withAnimation(PlayerControls.animation) {
|
||||
presentingControls = true
|
||||
}
|
||||
}
|
||||
@ -65,11 +66,11 @@ final class PlayerControlsModel: ObservableObject {
|
||||
}
|
||||
|
||||
func toggle() {
|
||||
withAnimation(PlayerControls.animation) {
|
||||
if !presentingControls {
|
||||
player.backend.updateControls()
|
||||
}
|
||||
|
||||
withAnimation(PlayerControls.animation) {
|
||||
presentingControls.toggle()
|
||||
}
|
||||
}
|
||||
|
@ -302,6 +302,9 @@ final class PlayerModel: ObservableObject {
|
||||
}
|
||||
|
||||
private func handleNavigationViewPlayerPresentationChange() {
|
||||
backend.setNeedsDrawing(playerNavigationLinkActive)
|
||||
controls.hide()
|
||||
|
||||
if pauseOnHidingPlayer, !playingInPictureInPicture, !playerNavigationLinkActive {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
||||
self.pause()
|
||||
|
@ -2,7 +2,7 @@ import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct PlayerControls: View {
|
||||
static let animation = Animation.easeInOut(duration: 0)
|
||||
static let animation = Animation.easeInOut(duration: 0.2)
|
||||
|
||||
private var player: PlayerModel!
|
||||
|
||||
@ -60,12 +60,8 @@ struct PlayerControls: View {
|
||||
}
|
||||
|
||||
var controlsBackground: some View {
|
||||
model.presentingControls ?
|
||||
AnyView(
|
||||
PlayerGestures()
|
||||
.background(Color.black.opacity(0.5))
|
||||
) :
|
||||
AnyView(Color.clear)
|
||||
.background(Color.black.opacity(model.presentingControls ? 0.5 : 0))
|
||||
}
|
||||
|
||||
var timeline: some View {
|
||||
@ -145,7 +141,7 @@ struct PlayerControls: View {
|
||||
HStack {
|
||||
fullscreenButton
|
||||
Spacer()
|
||||
button("Music Mode", systemImage: "music.note")
|
||||
// button("Music Mode", systemImage: "music.note")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,14 +33,14 @@ final class MPVOGLView: GLKView {
|
||||
glClear(UInt32(GL_COLOR_BUFFER_BIT))
|
||||
}
|
||||
|
||||
override func draw(_: CGRect) {
|
||||
override func draw(_ rect: CGRect) {
|
||||
glGetIntegerv(UInt32(GL_FRAMEBUFFER_BINDING), &defaultFBO!)
|
||||
|
||||
if mpvGL != nil {
|
||||
var data = mpv_opengl_fbo(
|
||||
fbo: Int32(defaultFBO!),
|
||||
w: Int32(bounds.size.width) * Int32(contentScaleFactor),
|
||||
h: Int32(bounds.size.height) * Int32(contentScaleFactor),
|
||||
w: Int32(rect.size.width) * Int32(contentScaleFactor),
|
||||
h: Int32(rect.size.height) * Int32(contentScaleFactor),
|
||||
internal_format: 0
|
||||
)
|
||||
var flip: CInt = 1
|
||||
|
@ -114,6 +114,7 @@ struct VideoPlayerView: View {
|
||||
Color.clear
|
||||
.onAppear {
|
||||
player.playerSize = proxy.size
|
||||
// TODO move to backend method
|
||||
player.mpvBackend.client?.setSize(proxy.size.width, proxy.size.height)
|
||||
}
|
||||
.onChange(of: proxy.size) { _ in
|
||||
|
@ -3002,8 +3002,8 @@
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 20;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
CURRENT_PROJECT_VERSION = 22;
|
||||
DEVELOPMENT_TEAM = 78Z5H3M6RJ;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
@ -3026,9 +3026,9 @@
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Vendor/mpv/iOS/lib",
|
||||
);
|
||||
MARKETING_VERSION = 1.3.2;
|
||||
MARKETING_VERSION = 1.4;
|
||||
OTHER_LDFLAGS = "-lstdc++";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = stream.yattee.app;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = stream.yattee.app.alpha;
|
||||
PRODUCT_NAME = Yattee;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
@ -3044,7 +3044,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 19;
|
||||
CURRENT_PROJECT_VERSION = 22;
|
||||
DEVELOPMENT_TEAM = 78Z5H3M6RJ;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "GLES_SILENCE_DEPRECATION=1";
|
||||
@ -3064,9 +3064,9 @@
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Vendor/mpv/iOS/lib",
|
||||
);
|
||||
MARKETING_VERSION = 1.3.2;
|
||||
MARKETING_VERSION = 1.4;
|
||||
OTHER_LDFLAGS = "-lstdc++";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = stream.yattee.app;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = stream.yattee.app.alpha;
|
||||
PRODUCT_NAME = Yattee;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
|
Loading…
Reference in New Issue
Block a user