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