StarPlayerSubtitleView

Objective-C

@interface StarPlayerSubtitleView : UIView

@property(nonatomic, weak)      id<StarPlayerSubtitleDatasource> datasource;    //target datasource

/**
 * initialize with url
 * @param url 자막 url
*/
- (instancetype)initWithContentUrl:(NSURL*)url;

/**
 * initialize with url, language
 * @param url 자막 url
 * @param languageCode 언어코드
 */
- (instancetype)initWithContentUrl:(NSURL*)url
                        asLanguage:(NSString*)languageCode;

/**
 * 자막 url 및 언어코드 설정
 * @param url 자막 url
 * @param languageCode 언어코드
 */
- (void)setContentUrl:(NSURL*)url asLanguage:(NSString*)languageCode;

//subtitle controller
- (void)start;
- (void)pause;
- (void)stop;

/**
 * 자막 텍스트 clear
 */
- (void)clearOfSubtitleText;

/**
 * 지막 폰트 크기 설정
 * @param size 자막 폰트 크기
 */
- (void)setFontSize:(int)size;

/**
 * 자막 폰트 색상 설정
 * @param color 자막 폰트 색상
 */
- (void)setFontColor:(NSString*)color;

/**
* 자막 수직 정렬 (default bottom)
* @param verticalAlign top, bottom
*/
- (void)setVerticalAlign:(SubtitleVerticalAlign)verticalAlign;
@end

Swift

class StarPlayerSubtitleView

Undocumented

  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, weak)      id<StarPlayerSubtitleDatasource> datasource

    Swift

    weak var datasource: StarPlayerSubtitleDatasource! { get set }
  • initialize with url

    Declaration

    Objective-C

    - (instancetype)initWithContentUrl:(NSURL *)url;

    Swift

    init!(contentUrl url: Any!)

    Parameters

    url

    자막 url

  • initialize with url, language

    Declaration

    Objective-C

    - (instancetype)initWithContentUrl:(NSURL *)url
                            asLanguage:(NSString *)languageCode;

    Swift

    init!(contentUrl url: Any!, asLanguage languageCode: Any!)

    Parameters

    url

    자막 url

    languageCode

    언어코드

  • 자막 url 및 언어코드 설정

    Declaration

    Objective-C

    - (void)setContentUrl:(NSURL *)url asLanguage:(NSString *)languageCode;

    Swift

    func setContentUrl(_ url: Any!, asLanguage languageCode: Any!)

    Parameters

    url

    자막 url

    languageCode

    언어코드

  • Undocumented

    Declaration

    Objective-C

    - (void)start;

    Swift

    func start()
  • Undocumented

    Declaration

    Objective-C

    - (void)pause;

    Swift

    func pause()
  • Undocumented

    Declaration

    Objective-C

    - (void)stop;

    Swift

    func stop()
  • 자막 텍스트 clear

    Declaration

    Objective-C

    - (void)clearOfSubtitleText;

    Swift

    func clearOfSubtitleText()
  • 지막 폰트 크기 설정

    Declaration

    Objective-C

    - (void)setFontSize:(int)size;

    Swift

    func setFontSize(_ size: Int32)

    Parameters

    size

    자막 폰트 크기

  • 자막 폰트 색상 설정

    Declaration

    Objective-C

    - (void)setFontColor:(NSString *)color;

    Swift

    func setFontColor(_ color: Any!)

    Parameters

    color

    자막 폰트 색상

  • 자막 수직 정렬 (default bottom)

    Declaration

    Objective-C

    - (void)setVerticalAlign:(SubtitleVerticalAlign)verticalAlign;

    Swift

    func setVerticalAlign(_ verticalAlign: Any!)

    Parameters

    verticalAlign

    top, bottom