-
Notifications
You must be signed in to change notification settings - Fork 31
Bridge CMCD event player and configuration #842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
11ba5ff
feat: add CMCD player and source configuration TypeScript API
devin-ai-integration[bot] 20503fb
feat(android): bridge CMCD player and source configuration
devin-ai-integration[bot] 05786ff
feat(ios): bridge CMCD player and source configuration
devin-ai-integration[bot] 91fe791
Move CMCD API files
rbnbtns 1043c1b
Combine existing and new source configuration
rbnbtns 070dbc1
Limit existing properties to request mode
rbnbtns 366b0b7
Update docs
rbnbtns 4224e1e
Make transmission mode optional to make request mode optional
rbnbtns 4834110
Update documentation
rbnbtns dbea00b
Update changelog
rbnbtns 83672c7
Include cmcd specifc iOS files
rbnbtns 8230707
Use CmcdSourceConfiguration
rbnbtns 9adfa8a
Map existing sessionID to native sessionId
rbnbtns 6466fbf
Fix doc example
rbnbtns bddc729
Explicitly disable the web cmcd connector if request mode is disabled
rbnbtns a68edbd
Better struct typing
rbnbtns File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| // THEOplayerRCTView+CmcdConfig.swift | ||
|
|
||
| import Foundation | ||
| import THEOplayerSDK | ||
|
|
||
| struct CmcdConfig { | ||
| var externalSessionId: String? | ||
| var userId: String? | ||
| var eventEndpoints: [CMCDEndpointConfiguration]? | ||
| } | ||
|
|
||
| extension THEOplayerRCTView { | ||
|
|
||
| func parseCmcdConfig(configDict: NSDictionary) { | ||
| if let cmcdDict = configDict["cmcd"] as? NSDictionary { | ||
| self.cmcdConfig.externalSessionId = cmcdDict["externalSessionId"] as? String | ||
| self.cmcdConfig.userId = cmcdDict["userId"] as? String | ||
| self.cmcdConfig.eventEndpoints = (cmcdDict["eventEndpoints"] as? [[String: Any]])?.compactMap { dict -> CMCDEndpointConfiguration? in | ||
| guard let url = dict["url"] as? String else { return nil } | ||
| return CMCDEndpointConfiguration(url: url) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| func playerCmcdConfiguration() -> CMCDConfiguration? { | ||
| let config = self.cmcdConfig | ||
| if config.externalSessionId == nil && config.userId == nil && config.eventEndpoints == nil { | ||
| return nil | ||
| } | ||
| return CMCDConfiguration( | ||
| externalSessionId: config.externalSessionId, | ||
| userId: config.userId, | ||
| eventEndpoints: config.eventEndpoints | ||
| ) | ||
| } | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.