Reputation: 1
In my receiver.js I am styling the captions through the TextTrackStyle. I could do most of the things except for the windowType ROUNDED_CORNERS. Nothing happens when I modify the property windowRoundedCornerRadius, I tried from 10 to 1000. Does anybody have a solution?
let textTrackStyle = new cast.framework.messages.TextTrackStyle();
textTrackStyle.fontFamily = "Nunito-Medium";
textTrackStyle.fontScale = 1;
textTrackStyle.backgroundColor = "#000000B3"; // Black with 70% opacity
textTrackStyle.windowType = "ROUNDED_CORNERS";
textTrackStyle.windowRoundedCornerRadius = 10;
playerManager.addEventListener(cast.framework.events.EventType.PLAYER_LOAD_COMPLETE, () => {
let textTracksManager = playerManager.getTextTracksManager();
textTracksManager.setTextTrackStyle(textTrackStyle);
});
I am following this documentation: https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages.TextTrackStyle
Excepted: Rounded Corners in captions window
Got: Squared Corners
Upvotes: 0
Views: 52
Reputation: 174
The docs show an attribute called windowCornerRadius
. You're adding Rounded
to the property so it's not actually updating with the correct value.
Upvotes: 0