Comments (3)
override open func player(layer: KSPlayerLayer, state: KSPlayerState) {
super.player(layer: layer, state: state)
if state == .readyToPlay, let player = layer.player {
print(player.naturalSize)
// list the all subtitles
let subtitleInfos = srtControl.filterInfos { _ in true }
subtitleInfos.forEach {
print($0.name)
}
subtitleInfos.first?.makeSubtitle { result in
self.resource?.subtitle = try? result.get()
}
for track in player.tracks(mediaType: .audio) {
print("audio name: \(track.name) language: \(track.language ?? "")")
}
}
}
from ksplayer.
override open func player(layer: KSPlayerLayer, state: KSPlayerState) { super.player(layer: layer, state: state) if state == .readyToPlay, let player = layer.player { print(player.naturalSize) // list the all subtitles let subtitleInfos = srtControl.filterInfos { _ in true } subtitleInfos.forEach { print($0.name) } subtitleInfos.first?.makeSubtitle { result in self.resource?.subtitle = try? result.get() } for track in player.tracks(mediaType: .audio) { print("audio name: \(track.name) language: \(track.language ?? "")") } } }
Player has issue getting resolution of video it always returns 0 , 0
from ksplayer.
please provide the playback url
from ksplayer.
Related Issues (20)
- Metal Airplay Video only cast audio HOT 2
- 截图Function失败 HOT 3
- 播放某些视频时画面会卡住,声音不影响 HOT 1
- Pod update fail. HOT 9
- 请问怎样卸载啊? HOT 1
- Picture In Picture broken HOT 5
- Random crash on iOS
- How's the performance compared to VLC? HOT 1
- Live TV subtitles have some horrible green background HOT 15
- No podspec found for `FFmpegKit` in `../FFmpegKit` HOT 1
- video freezes on tvOS HOT 4
- 更新到最新版本后,打包时报错 HOT 19
- 无法显示cc隐藏字幕
- Fullscreen button
- Demo App HOT 4
- 25 / 30 FPS streams stutter HOT 28
- 某些视频播放时会崩溃 HOT 3
- tvOS 端播放时卡顿会是什么原因? HOT 6
- OpenSSL and KSME Crash on tvOS HOT 10
- Slider and SwiftUI HOT 1
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.