Skip to content

Commit

Permalink
Merge pull request #2 from EkoLabs/new_urls_event
Browse files Browse the repository at this point in the history
New urls event
  • Loading branch information
ptelad authored Jul 22, 2020
2 parents 836bc13 + 0bb4e83 commit c7c119d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions samples/HelloEko/HelloEko.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = 32U3WAAGM3;
INFOPLIST_FILE = HelloEko/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -385,7 +385,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = 32U3WAAGM3;
INFOPLIST_FILE = HelloEko/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
1 change: 0 additions & 1 deletion samples/HelloEko/HelloEko/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ class ViewController: UIViewController, EkoPlayerViewDelegate, EkoUrlDelegate, E
self.view.addSubview(playerView)
playerView.frame = CGRect(x: 20, y: 369, width: 374, height: 260)
playerView.delegate = self
playerView.urlDelegate = self
playerView.appName = "SampleApp"
}

Expand Down
2 changes: 1 addition & 1 deletion sdk/EkoPlayerSDK/EkoPlayerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ enum PlayerEventError : LocalizedError {
}

// the URL might not be encoded, so encode it before passing it to the delegate
if (eventName == "eko.urls.openinparent") {
if (eventName == "eko.urls.intent") {
if let args = json["args"] as? Array<AnyObject> {
if !args.isEmpty, let urlString = args[0]["url"] as? String {
if let escapedString = urlString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) {
Expand Down
6 changes: 3 additions & 3 deletions sdk/EkoPlayerSDK/EkoProjectLoader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class EkoProjectLoader: NSObject {
options.events.append("eko.canplay")
}
}
if (!options.events.contains("urls.openinparent")) {
options.events.append("urls.openinparent")
if (!options.events.contains("urls.intent")) {
options.events.append("urls.intent")
}
if (!options.events.contains("share.intent")) {
options.events.append("share.intent")
Expand Down Expand Up @@ -73,7 +73,7 @@ class EkoProjectLoader: NSObject {
} else {
// attempt to get the embed url from the response, throw an error if unable to
if let projectEmbed = data["embedUrl"] as? String {
totalUrl = "\(projectEmbed)?embedapi=1.0&sharemode=proxy\(urlParam)"
totalUrl = "\(projectEmbed)?embedapi=1.0&sharemode=proxy&urlsmode=proxy\(urlParam)"
} else {
throw LoadingError.malformedResponse(message: "Embed url not found - Missing embed url in response")
}
Expand Down

0 comments on commit c7c119d

Please sign in to comment.