Skip to content

Update configuration module to support media keys#91

Merged
yangyansong-adbe merged 3 commits intoadobe:mediafrom
yangyansong-adbe:media_config
Oct 24, 2023
Merged

Update configuration module to support media keys#91
yangyansong-adbe merged 3 commits intoadobe:mediafrom
yangyansong-adbe:media_config

Conversation

@yangyansong-adbe
Copy link
Copy Markdown
Contributor

@yangyansong-adbe yangyansong-adbe commented Oct 20, 2023

#100

The supported media config keys:

  • edgemedia.channel
  • edgemedia.playerName
  • edgemedia.appVersion

@yangyansong-adbe yangyansong-adbe changed the title Update configuration module to support media keys [WIP] Update configuration module to support media keys Oct 20, 2023
@yangyansong-adbe yangyansong-adbe marked this pull request as ready for review October 20, 2023 21:53
@yangyansong-adbe yangyansong-adbe changed the title [WIP] Update configuration module to support media keys Update configuration module to support media keys Oct 20, 2023
m._media_configuration[key] = configuration[key]
end if
end for
channel = _adb_optStringFromMap(configuration, m._CONFIG_KEY.MEDIA_CHANNEL)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should add a method
optValidStringFromMap which will return either non empty string or invalid, so we dont need to check the string one more time.

this:

playerName = _adb_optStringFromMap(configuration,
m._CONFIG_KEY.MEDIA_PLAYER_NAME)
 if not _adb_isEmptyOrInvalidString(playerName)
     m._media_playerName = playerName
 end if

becomes:

m._media_playerName = _adb_optValidStringFromMap(configuration, m._CONFIG_KEY.MEDIA_PLAYER_NAME) 

Copy link
Copy Markdown
Contributor Author

@yangyansong-adbe yangyansong-adbe Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it won't work anyway. For example, in the case of overwriting the existing configuration, we still need to validate the existence of the media keys.

@yangyansong-adbe yangyansong-adbe merged commit f0990b4 into adobe:media Oct 24, 2023
@yangyansong-adbe yangyansong-adbe deleted the media_config branch January 16, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants