Comments (32)
你能提供下这个url吗?我用最新的代码,然后用播放https://github.com/kingslay/KSPlayer/raw/develop/Tests/KSPlayerTests/Resources/dvd_subtitle.mkv是不会有问题的。这个也是图片字幕
from ksplayer.
你的意思是commit e8f6161, 导致图片字幕出现问题吗?
from ksplayer.
你这个是文字字幕还是图片字幕呢?我最近是有改了文字字幕(ass格式的)
from ksplayer.
from ksplayer.
from ksplayer.
你用最新的代码试下。我周末的时候有修复了这个问题。如果还是不行的话 你把URL发给我下 我debug下
from ksplayer.
With the most recent code, the subtitles don't appear at all.
To recap:
- If I go back to the version before those pod updates -> everything works well;
- If I go after, subtitles show broken;
- If I go to the latest, subtitles don't work anymore (don't appear).
I can't share URLs unfortunately atm.
from ksplayer.
你是否可以只截取一分钟的视频,然后上传到github。
from ksplayer.
或者你可以把ass字幕从视频剥离出来。然后单独发给我ass字幕文件
from ksplayer.
I confirm that is a problem with your updates. Atm the only thing I could do is to go way back and force push a different commit on my fork (because :commit
in the podfile doesn't work, it always take the latest).
from ksplayer.
我有网上找了几个ass字幕来进行测试,是可以显示字幕的。所以你这边需要提供给我有问题的字幕。我才能排查是什么问题导致。
from ksplayer.
Now looks like you fixed one problem, but it came back with another problem.
Observe how tiny and almost not visible are the subtitle now:
And how were, when I use the same app code, but I go back to past versions with KSPlayer pod:
from ksplayer.
Noticed that after selecting a subtitle, the subtitleLabel gets the font set to 16 instead fo keeping the font size.
Also the color is totally bad.
from ksplayer.
@kingslay this needs to be reopened. Please see my latest comments. Thx.
from ksplayer.
Thank you. @kingslay Now the style is back to normal, but not the size. I have a large subtitles set, but instead of showing the old size like the picture in the comment above, it is super small.
from ksplayer.
I can confirm that on iOS/iPadOS the subtitles colour and size no longer change. Used to work fine. Works on tvOS.
from ksplayer.
因为你这个是ass字幕。ass字幕指定了字体大小和颜色。所以就无法修改字体大小和颜色
from ksplayer.
Sorry but if until few days ago it used to work well and the dimension was right, how can you say this now?
I posted a picture of the same movie before and after and you can see the dimension is different although the code is the same.
@UnknownCoder807 for me doesn't work not even on tvOS.
I'm using an older version of this library for now because this problem.
from ksplayer.
Because yours is an ass subtitle. ass subtitles specify the font size and color. So you can’t change the font size and color
I just tried an older testflight build of my app and subtitle colour and size for live tv could be changed.
I then opened the latest testflight version (with all ksplayer commits so far) and the exact same stream as before and the subtitle colour and size cannot be changed.
This is the same issue as the OP is having I am sure.
from ksplayer.
是的,因为之前不支持解析ass的样式,最近的代码才支持的。所以才有这个问题。你可以直接从NSAttributedString取出string,而不用NSAttributedString。这样就可以自定义样式呢
from ksplayer.
Because yours is an ass subtitle. ass subtitles specify the font size and color. So you can’t change the font size and color
I just tried an older testflight build of my app and subtitle colour and size for live tv could be changed.
I then opened the latest testflight version (with all ksplayer commits so far) and the exact same stream as before and the subtitle colour and size cannot be changed.
This is the same issue as the OP is having I am sure.
edit to add :
It's movies/tv series as well that won't allow colour change. and also, I was mistaken, it is broken on tvOS too.
I am not sure what you've done @kingslay but customised subtitles no longer work.
from ksplayer.
因为NSAttributedString带有字体大小和颜色。你们可以不用NSAttributedString。用String就可以了
from ksplayer.
因为NSAttributedString带有字体大小和颜色。你们可以不用NSAttributedString。用String就可以了
I don't even know what this means.
I will roll back to an earlier commit and just use ksplayer only for then. But whatever you have changed has broken a major feature of ksplayer and sadly it seems you can't see this.
from ksplayer.
even forcing the colour to .red it is still white
from ksplayer.
把Text(AttributedString(text)) 改成Text(AttributedString(text.stinrg)) 字体大小和颜色就可以生效了
from ksplayer.
然后也把.if(self.textPosition == nil) { 去掉就可以
from ksplayer.
把代码改成
Text(AttributedString(text.string))
.font(Font(SubtitleModel.textFont))
.shadow(color: .black.opacity(0.9), radius: 1, x: 1, y: 1)
.foregroundColor(SubtitleModel.textColor)
.italic(SubtitleModel.textItalic)
.background(SubtitleModel.textBackgroundColor)
.multilineTextAlignment(.center)
.alignmentGuide(textPosition.horizontalAlign) {
$0[.leading]
}
.padding(textPosition.edgeInsets)
from ksplayer.
Thanks, this has fixed it!
from ksplayer.
so in a non swift ui environment with custom view, what I do is only selecting the subtitle. Do you have an example of how to change the code to make it work?
Currently I can only change the properties of the subtitle label, such as the size, but it's ignored.
from ksplayer.
@kingslay how can I reach the same result using playerView.srtControl.selectedSubtitleInfo
in my custom player wrapper / view?
from ksplayer.
@kingslay would you help me understanding this?
from ksplayer.
I think you referenced the wrong issue?
from ksplayer.
Related Issues (20)
- 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 2
- 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
- 双语字幕重叠 HOT 3
- Error sanbox when build application
- Package resolution failed HOT 2
- Fix Apple TV App HOT 1
- Video cache support HOT 5
- Crash when view livestream HOT 1
- 能否自定义一个KSPictureInPictureController? HOT 3
- 使用swift Package Manager更新KSPlayer,添加依赖失败
- 请问咱这个播放器支持3d播放吗? 左右眼 HOT 6
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.