Comments (9)
这个应该是用了UIMenu 才会有这个问题。你可以换成不用UIMenu,
from ksplayer.
这个应该是用了UIMenu 才会有这个问题。你可以换成不用UIMenu,
试了下用UIAlertController
也会,能提供一个示例吗
1-2.mp4
我是直接改的Demo仓库里的RootViewController
private class TableViewCell: UITableViewCell {
public let vodListButton = UIButton()
#if os(iOS)
fileprivate let playerView = IOSVideoPlayerView()
#else
fileprivate let playerView = CustomVideoPlayerView()
#endif
override public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
contentView.addSubview(playerView)
playerView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
contentView.heightAnchor.constraint(equalTo: contentView.widthAnchor, multiplier: 0.65),
playerView.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 5),
playerView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
playerView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
playerView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
])
vodListButton.tintColor = .white
if let vodListButton = vodListButton as? UIButton {
vodListButton.setImage(UIImage(systemName: "list.and.film"), for: .normal)
vodListButton.setImage(UIImage(systemName: "list.and.film"), for: .selected)
}
vodListButton.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
vodListButton.widthAnchor.constraint(equalToConstant: 30),
])
playerView.toolBar.addArrangedSubview(vodListButton)
vodListButton.addTarget(self, action: #selector(presentAlert), for: .touchUpInside)
}
@objc func presentAlert() {
let alertController = UIAlertController(title: "Title", message: "Message", preferredStyle: .alert)
alertController.addAction(UIAlertAction(title: "OK", style: .default))
var topController = UIApplication.shared.keyWindow?.rootViewController
while let presentedViewController = topController?.presentedViewController {
topController = presentedViewController
}
topController?.present(alertController, animated: true, completion: nil)
}
@available(*, unavailable)
required init?(coder _: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
from ksplayer.
可以关闭自动旋转的支持吗?
from ksplayer.
你手机的锁定屏幕应该是打开的吧。所以这个走的应该是强制旋转,而不是自动旋转。
from ksplayer.
你手机的锁定屏幕应该是打开的吧。所以这个走的应该是强制旋转,而不是自动旋转。
可以在我手机屏幕锁定开关未开启的状态下,关闭KSPlayer的自动旋转吗?即我手动旋转手机,KSPlayer不自动响应旋转。
from ksplayer.
这个应该是可以的。
from ksplayer.
看你的文档说了支持自动旋转,但是代码中没看到哪个配置可以控制这个能力。
from ksplayer.
看你的文档说了支持自动旋转,但是代码中没看到哪个配置可以控制这个能力。
KSOptions.supportedInterfaceOrientations
用这个可以控制
from ksplayer.
那需要实时动态调整吗?不然如果只给了portrait,那不是不能手动旋转了?
from ksplayer.
Related Issues (20)
- Video stutters (visionOS) HOT 5
- Installing via SPM as a package dependency fails in Xcode 15.3. HOT 1
- Video rebuffers? on seek in demo even cache option enabled HOT 9
- FPS Variability HOT 17
- Dolby Vision is purple HOT 6
- Playing this streams times out HOT 7
- Stream buffers very frequently on 3G but OK on WiFi HOT 1
- 前后台切换bug HOT 2
- [tvOS] 4K content on 1080p displays stutter and buffer a lot HOT 5
- TracyPlayer does not play stream HOT 5
- avformat can't open input - In test app it works, production app it doesn't HOT 2
- Cannot run AV1 codecs Video HOT 4
- 打开了logLevel为debug,还是没有显示debug的日志 HOT 2
- Invalid bundle identifier when pushing to testflight using KSPlayer via SPM (doesnt happen over ccoapods) HOT 6
- Xcode 15.4上传App Store报错 HOT 2
- Can the caching function be added? HOT 5
- 您好,如何在不播放的情况下,获取视频的总时间长度? 目前貌似没有 api 可以获取? HOT 1
- Stream doesn't start HOT 2
- Compilation warning in AudioEnginePlayer.swift
- Unable to add via Swift Package manager HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ksplayer.