-
Notifications
You must be signed in to change notification settings - Fork 5
feat: Add Media Session custom attributes #41
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
feat: Add Media Session custom attributes #41
Conversation
BrandonStalnaker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks right I just want the session custom attributes logic to also handle basic number types
| for each attributeKey in attributeKeys | ||
| if (mputils.isString(mediaSessionAttributes[attributeKey])) then | ||
| eventAttributes[attributeKey] = mediaSessionAttributes[attributeKey] | ||
| end if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have an elseif here for if the value is an integer? Then you could use ToStr() like on line 1835 to convert it to a string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrandonStalnaker thanks for the catch, just added handling non-string attributes logic
rmi22186
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i agree with brandon's comment. otherwise lgtm
|
There seems to be a formatting issue, although it doesn't say what it is https://github.com/mParticle/mparticle-roku-sdk/actions/runs/15123567891/job/42511174341?pr=41#step:5:1 Can you run locally and see if you can fix it? maybe cursor can help. |
|
@rmi22186 - the only issue is I tried running that command and I'm getting "zsh: command not found: bsfmt", I probably have to install it from somewhere |
Summary
Testing Plan
mediaSession = mpConstants.MediaSession.build("ABC123", "Space Pilot 3000", mparticleConstants().MEDIA_CONTENT_TYPE.VIDEO, mparticleConstants().MEDIA_STREAM_TYPE.LIVE_STREAM, 1800000, {"testMediaSeshAttr": "testValMedia"})mediaSession = mpConstants.MediaSession.build("ABC123", "Space Pilot 3000", mparticleConstants().MEDIA_CONTENT_TYPE.VIDEO, mparticleConstants().MEDIA_STREAM_TYPE.LIVE_STREAM, 1800000)mediaSession.mediaSessionAttributes = {"testMediaAttr2": "testVal2"}Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)