Skip to content

Commit

Permalink
Add Ref Files
Browse files Browse the repository at this point in the history
  • Loading branch information
swagatnayak committed Mar 15, 2021
1 parent 6378874 commit 85bb521
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 2 deletions.
Binary file modified .DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SubtitleWithAVPlayerViewController: UIViewController, AVPlayerViewControll
func initiatePlayerViewController() {

// MARK: - Enter media url here here
guard let url = URL(string: "http://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel.ism/.m3u8") else {
guard let url = URL(string: "https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/master.m3u8") else {
return
}

Expand Down
Binary file added RefFiles/.DS_Store
Binary file not shown.
Binary file added RefFiles/Screenshot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added RefFiles/Screenshot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
4 changes: 3 additions & 1 deletion SNAVPlayerSubtitles/Classes/SNAVPlayerSubtitles.swift
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public extension AVPlayerViewController {
// Label
subtitleLabel = UILabel()
subtitleLabel?.translatesAutoresizingMaskIntoConstraints = false
subtitleLabel?.backgroundColor = UIColor.clear
subtitleLabel?.backgroundColor = UIColor.black.withAlphaComponent(CGFloat(0.6))
subtitleLabel?.textAlignment = .center
subtitleLabel?.numberOfLines = 0
subtitleLabel?.font = UIFont.boldSystemFont(ofSize: UI_USER_INTERFACE_IDIOM() == .pad ? 40.0 : 22.0)
Expand All @@ -360,6 +360,8 @@ public extension AVPlayerViewController {
subtitleLabel?.layer.shouldRasterize = true;
subtitleLabel?.layer.rasterizationScale = UIScreen.main.scale
subtitleLabel?.lineBreakMode = .byWordWrapping
subtitleLabel?.layer.cornerRadius = 8
subtitleLabel?.clipsToBounds = true
contentOverlayView?.addSubview(subtitleLabel!)

// Position
Expand Down

0 comments on commit 85bb521

Please sign in to comment.