Hello,
I work with HLS streams with webvtt subtitles in the main playlist. I create an AVPlayer object and I want to overide the default style for my subtitles, so I create a AVTextStyleRule.
let textStyle:AVTextStyleRule = AVTextStyleRule(textMarkupAttributes: [
kCMTextMarkupAttribute_CharacterEdgeStyle as String: kCMTextMarkupCharacterEdgeStyle_DropShadow,
kCMTextMarkupAttribute_BackgroundColorARGB as String: [0.0,0.0,0.0,0.0]
kCMTextMarkupAttribute_BaseFontSizePercentageRelativeToVideoHeight as String: 5.5,
])!it works fine for edge style and for font size, but it's like opacity for "BackgroundColorARGB" attribute doesn't work in swift 2.0.
For example, if I put :
[0.0,1.0,0.0,0.0]as value for :
kCMTextMarkupAttribute_BackgroundColorARGBI obtain a red background with 50% of opacity. If I change opacity to 1.0, I also obtain a red background with 50% of opacity.
Is it a bug in swift 2.0 or can I change opacity with another attribute ?
thanks,