Skip to content

Implement session Manager - Initial Structure, Setup and Usage#106

Merged
addb merged 8 commits intoadobe:mediafrom
addb:sessionManagerBase
Nov 10, 2023
Merged

Implement session Manager - Initial Structure, Setup and Usage#106
addb merged 8 commits intoadobe:mediafrom
addb:sessionManagerBase

Conversation

@addb
Copy link
Copy Markdown
Contributor

@addb addb commented Nov 8, 2023

Description

Note:
We might not need clientSessionId since we just need to have one active session at a time. And here we maintain a map of inactive sessions and not all sessions. So mostly will drop the clientSessionId from the sessionManager and session class.

MediaSessionManager.brs:

  • It holds reference to the current active session and also maintains the inactive sessions.
  • It is responsible to trigger the inactive sessions to dispatch all the pending hits.
  • It is also responsible to delete and cleanup inactive and finished sessions.

MediaSession.brs:

  • Each client session will have MediaSession instance.
  • It maintains ping interval, playback state etc.
  • It handles the edgeRequestQueue and all the responses success and errors.
  • It also is responsible to read sessionConfig to update channel and send pings based on ping interval settings.
  • It has logic to detect idle and long running sessions.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@addb addb changed the title Session manager base Implement session Manager - Initial Structure and Setup Nov 8, 2023
@addb addb changed the title Implement session Manager - Initial Structure and Setup Implement session Manager - Initial Structure, Setup and Usage Nov 9, 2023
@@ -0,0 +1,266 @@
' ********************** Copyright 2023 Adobe. All rights reserved. **********************
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

MediaSession -> mediaSession for consistency.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I will do this change at the end.

if isAd then
return m._sessionConfig["adpinginterval"]
interval = m._sessionConfig[m._PUBLIC_CONSTANTS.MEDIA_SESSION_CONFIGURATION.AD_PING_INTERVAL]
if interval >= m._MIN_AD_PING_INTERVAL_SEC and interval <= _MAX_AD_PING_INTERVAL_SEC then
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

m._MAX_AD_PING_INTERVAL_SEC

@addb addb merged commit 0a2eee7 into adobe:media Nov 10, 2023
@addb addb linked an issue Nov 11, 2023 that may be closed by this pull request
@addb addb deleted the sessionManagerBase branch November 22, 2023 19:34
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.

Media session management

3 participants