Created
February 27, 2017 12:00
-
-
Save agungf/3a35d0d15a574ebb81af520e970dbb12 to your computer and use it in GitHub Desktop.
Dacast player code snipper from IOS App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IBOutlet weak var videoWebView: UIWebView! | |
videoWebView.allowsInlineMediaPlayback = false | |
videoWebView.mediaPlaybackRequiresUserAction = true | |
videoWebView.scrollView.scrollEnabled = false | |
let videoURLString = String(format:"%@/%@?file_id=%@&ip=%@&ua=%@", RGConstant.Services.URL.videoBaseURL, RGConstant.Services.URL.Path.videoPlayer, fileIDVideo, ipAdress,userAgent) | |
let videoURL = NSURL(string: videoURLString) | |
let request = NSMutableURLRequest(URL: videoURL!) | |
if let token = TokenManager.sharedManager.getToken() { | |
request.setValue(String(format: "Bearer %@", token), forHTTPHeaderField:"Authorization") | |
} | |
videoWebView.loadRequest(request) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment