Comments (15)
I have implemented seek with arrows but time stamps and progress bar dont update with seek
from ksplayer.
Plus it freezes ui sometime
from ksplayer.
You can check this function
panGestureAction
from ksplayer.
How to use it please provide code.
from ksplayer.
@objc private func panGestureAction(_ pan: UIPanGestureRecognizer) {
// 播放结束时,忽略手势,锁屏状态忽略手势
guard !replayButton.isSelected, !isLock else { return }
// 根据上次和本次移动的位置,算出一个速率的point
let velocityPoint = pan.velocity(in: self)
switch pan.state {
case .began:
// 使用绝对值来判断移动的方向
if abs(velocityPoint.x) > abs(velocityPoint.y) {
scrollDirection = .horizontal
} else {
scrollDirection = .vertical
}
panGestureBegan(location: pan.location(in: self), direction: scrollDirection)
case .changed:
panGestureChanged(velocity: velocityPoint, direction: scrollDirection)
case .ended:
panGestureEnded()
default:
break
}
}
open func panGestureChanged(velocity point: CGPoint, direction: KSPanDirection) {
if direction == .horizontal {
if !KSPlayerManager.enablePlaytimeGestures {
return
}
isSliderSliding = true
if totalTime > 0 {
// 每次滑动需要叠加时间,通过一定的比例,使滑动一直处于统一水平
tmpPanValue += panValue(velocity: point, direction: direction, currentTime: Float(toolBar.currentTime), totalTime: Float(totalTime))
tmpPanValue = max(min(tmpPanValue, Float(totalTime)), 0)
showSeekToView(second: Double(tmpPanValue), isAdd: point.x > 0)
}
}
}
from ksplayer.
pan gesture will not work its right and left arrows only on old or universal remotes.
from ksplayer.
you can override pressesBegan
for leftArrow and rightArrow to seek
from ksplayer.
you can override
pressesBegan
for leftArrow and rightArrow to seek
i did that your seek function has issue sometimes video goes black. and when i seek, slider and time stamps dont update with seek. it updates only after playing video.
from ksplayer.
Hi, i updated the code and seek issue has got more worse
from ksplayer.
you can update the demo and pull requests. then i will look the code and fixed it.
from ksplayer.
you can update the demo and pull requests. then i will look the code and fixed it.
ok thanks
from ksplayer.
Can you please update code in the pod to give this functionality by default? Set the velocity with three different speeds on pressing arrows. @kingslay
from ksplayer.
@kingslay Can you please update soon?
from ksplayer.
Can you please update?
from ksplayer.
i have not a old apple tv remotes. You can initiate a merge request.
from ksplayer.
Related Issues (20)
- Voices/Dialogues not heard with AudioUnit HOT 2
- AudioUnit crashes HOT 2
- *** Important Issues to be fixed HOT 9
- Issue with some live tv streams HOT 14
- OpenSSL not enabled by default HOT 2
- Can't seek forward/bakwards with a pre-recorded .ts stream (TVOS) HOT 16
- 可以在播放的时候,适时的改变视频源的分辨率吗? HOT 1
- 在播放某个视频时会出现拖影,闪屏的问题 HOT 2
- VisionOS: 在ImmersiveSpace中渲染基于Metal的VR视频 HOT 2
- iOS真机前后台切换bug
- Small subtitles on iPad HOT 3
- 添加 Package 无法将最新的 FFmpegKit 添加进去 HOT 4
- Broken subtitle track names HOT 2
- SwiftUI player view 没有初始化 PIPController HOT 1
- 7.1 played as stereo HOT 1
- Interlaced stream looks shaky if the reference frame =1 using Yadifx2 HOT 13
- Unable to use the remote in tvOS HOT 5
- Sound problems on 7.1 tracks HOT 3
- 在播放途中闪退 HOT 4
- Deinterlacing problem with some Top Field First videos HOT 18
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.