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

Don't stream vid in discovery when not on wifi. #86

Merged
merged 1 commit into from
Feb 9, 2017

Conversation

mbrandonw
Copy link
Contributor

What

Let's not do the live streaming in discovery when the user isn't on wifi. This was a point brought up by @sarenji with regards to people with slow internet and people who need to conserve cellular data.

How

We have a reachability signal producer in the app environment that emits the current value immediately and then any new values as they come. We simply combine this into the signals that control playing/stopping the video and BAM. That easy.

Demo

wifi-3

@mbrandonw
Copy link
Contributor Author

/cc @justinswart @Jwomers @nickste

Copy link
Contributor

@stephencelis stephencelis left a comment

Choose a reason for hiding this comment

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

Love it!

self.playVideoUrl.assertValueCount(1)
self.stopVideo.assertValueCount(0)

self.reachability.value = .wwan
Copy link
Contributor

Choose a reason for hiding this comment

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

Love how easy this ended up being for testing 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

seriously

@Jwomers
Copy link

Jwomers commented Feb 9, 2017

This is great and makes sense! Super slick too :)

@mbrandonw mbrandonw merged commit 584c668 into master Feb 9, 2017
@mbrandonw mbrandonw deleted the wifi-disc-stream branch February 9, 2017 19:25
@theginbin
Copy link
Contributor

very nice! great suggestion @sarenji

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.

None yet

4 participants