Skip to content
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

Adds custom media session attributes docs to readme #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

schallock
Copy link

Summary

  • Adds explanation of and examples for custom media session attributes

Testing Plan

  • This is just a docs change, no testing needed

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

@sonarcloud
Copy link

sonarcloud bot commented Jun 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link

@jasonmgeorge jasonmgeorge left a comment

Choose a reason for hiding this comment

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

Added a suggestion on the wording around setting session attributes.

@@ -62,6 +65,22 @@ options.customAttributes = ["testKey": "testValue"]
mediaSession.logPause(options: options)
```

### Custom media session attributes

You can create custom media session attributes when initializing a new media session by including the custom media session attributes object directly in `MPMediaSession.init`:

Choose a reason for hiding this comment

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

This one is slightly different from Android and Web. For iOS the mediaSessionAttributes variable is set on the mediaSession instance after init.

Suggested change
You can create custom media session attributes when initializing a new media session by including the custom media session attributes object directly in `MPMediaSession.init`:
You can create custom media session attributes after initializing a new media session by setting the `mediaSessionAttributes` variable on the `mediaSession` object:

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