Hello @lucky.goyal , it’s me again
I have an issue with subtitles when casting video on chromecast stick.
So some info first :
I’m using my own view for casting it inside app and we had the same issue.
We had normal subtitles positioned on bottom of video and when forced subtitles were appearing on screen it was placed on the same Y position that normal subtitles. Then I discovered this subtitle position parameter ( it is in range of 0.0 to 1.0 ) and using that I somehow were able to move my subtitles up and it solved the case.
But when casting video with enabled subtitles I don’t have such control because we are using your receiver and in my understanding any subtitle handling is on receiver’s html/js side.
- Bitmovin version : 3.38.0 ( we also checked the newest one 3.39.0, problem still exists )
- Receiver id : FFE417E5
- Message namespace : urn:x-cast:com.bitmovin.player.caf
Hi @michal.rabinski , thanks for your query. As I understand from the description, you are looking for a way to change the vertical position of subtitles during casting. It seems you are able to do this on local playback on device, is this correct?
Can you please share following additional information to help us understand the use case better?
- What do you refer to with forced subtitles vs normal subtitles?
- What position parameter(in range of 0.0 to 1.0 ) helped you change position on local player?
- What is the format of subtitles for which you need to change the default position?
- Can you please share a screenshot/image of the current behaviour and expected behaviour to help us understand the exact current and expected behaviour?
In general, do change the subtitle position compared to the default one in CAF receiver, you may need to use a custom CAF receiver. You can build a custom CAF receiver using the reference code available at GitHub - bitmovin/bitmovin-player-caf-receiver: CAF receiver implementation to communication with Bitmovin Player SDKs
The player used under the hood in CAF receiver is MPL(for HLS) or Shaka (for DASH). The position of subtitles should depend on the information within subtitle file. Depending on your answers for above questions, we may be able to provide inputs on the modification required on CAF receiver side.
Hi @lucky.goyal
Yes, I want to change vertical position of subtitles during casting only when forced subtitles are also visible. I will refer what I mean by “forced subtitles” later on.
Yes, in my local playback ( on phone device ) I am able to resolve issue by reading line parameter.
First of all let me show you what I meant by “forced subtitles”
You can see them for example in The Last of Us, episode 02, 60 seconds after start of episode.
Sometimes there are additional subtitles visible ( example from images above ) like this " Verzeihen Sie die … " it is added automatically , I don’t know if it’s embeded into video stream or Bitmovin is adding it automatically because there is not a line of code for handling that added from my side so it must be added on your side at least.
At the top area of screen above is “I apologize about your lunch.” subtitle, that one is handled/added by me of course.
By default this upper one has been placed below together with forced subtitle and they overlapped each other and it has been unreadable.
But later on I found out that when forced subtitles are present then Cue object that comes when CueEnter is fired has different line
value.
When there is no forced subtitles line = 0.7
otherwise it’s 0.1
and this change occurs I’m moving my subtitles at the top of the screen ( refer to images I posted above ) or at the bottom of the screen when there is no forced subtitles visible.
I don’t know if it’s recommended approach but now everything is more readable.
As for subtitles format type I don’t know how to check that, could you please give me a hint ?
I’m already using this custom CAF receiver, I used it when we were debugging CORS issue earlier on. Do I need to modify something there in those github files?
You know, in android app I’m using my default view so it’s understandable that I need to handle forced subtitles situation myself but I thought that it’s handled internally inside receiver code