Comments (5)
currentTime
totalTime
public protocol KSPlayerLayerDelegate: AnyObject {
func player(layer: KSPlayerLayer, state: KSPlayerState)
func player(layer: KSPlayerLayer, currentTime: TimeInterval, totalTime: TimeInterval)
func player(layer: KSPlayerLayer, finish error: Error?)
func player(layer: KSPlayerLayer, bufferedCount: Int, consumeTime: TimeInterval)
}
from ksplayer.
No way to do it like on VLC? :
func totalTimeFormatted() -> String {
if currentPlayerEngine == .FFMPEG {
// Need KSTotalTime here
return ksPlayerView...
} else {
return VLCplayer.media?.length.stringValue ?? "00:00"
}
}
from ksplayer.
duration Total time
currentPlaybackTime
public protocol MediaPlayback: AnyObject {
var duration: TimeInterval { get }
var naturalSize: CGSize { get }
var currentPlaybackTime: TimeInterval { get }
func prepareToPlay()
func shutdown()
func seek(time: TimeInterval, completion: @escaping ((Bool) -> Void))
}
from ksplayer.
Sorry but I don't know how I can use it from the ksPlayerView var I've :-D
from ksplayer.
你可以看我的demo
也可以搜索下currentPlaybackTime 这个关键字。看下要怎么用。
from ksplayer.
Related Issues (20)
- Observe the `(Embed)` string attached straight away at the end of the subtitle's name. HOT 5
- It takes so long before the audio switches HOT 1
- tvos VideoSettingView 显示不正常 HOT 9
- App强制竖屏,全屏后自动判断视频比例决定宽度占满(竖屏)还是高度占满(横屏) HOT 2
- Multiple streams and audio session switch HOT 8
- Application hang when changing url too quickly HOT 3
- Large amount of crashes detected from Xcode in `Resample.swift` `audioFormat()`
- macOS Somona issue HOT 7
- Live stream freezes for many people HOT 13
- Crash in this library `partial apply for closure #1 in closure #1 in Double.init<A>` HOT 4
- Issue with uploading to apple : NSSpeechRecognitionUsageDescription
- - 增加音频转文字的功能 - feature HOT 7
- Constat crash HOT 3
- CRASH: Audio HOT 16
- Another Crash
- Question: Updating film while it's playing HOT 7
- Crashes in iOS 17.0 HOT 2
- AirPlay not working HOT 3
- Forced subtitles stop working when switching stream HOT 2
- HDR/SDR and Frame rate matching being forced on all the time HOT 12
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.