cine-io / cineio-broadcast-android

The cine.io Android Broadcast SDK
https://www.cine.io/products/broadcast
MIT License
52 stars 32 forks source link

Resolution #6

Closed lgorse closed 9 years ago

lgorse commented 9 years ago

This is a proposed resolution for: https://github.com/cine-io/cineio-broadcast-android/issues/5

The ints in BroadcastConfig are set to Integers so they can be null, satisfying the checks that are set up in BroadcastActivity to ensure that a default resolution is captured.

Sorry a commit correcting build.gradle is sneaking up in there - I have yet to figure out how to ignore build.gradle in the android-sdk subdirectory.

trshafer commented 9 years ago

This is super helpful. You're totally right that an uninitialized int is 0. So we should initialize it manually to -1 and then check for -1 when including it in the bundle extras.

I'll merge this and make the necessary changes.

To avoid committing the other config files, check out git add --patch and git checkout --patch. That will help you decide what to commit. I always patch add for every commit.

trshafer commented 9 years ago

Thanks @lgorse. Merged and pushed 0.0.11.

lgorse commented 9 years ago

Cool! I wasn't sure if the -1 was the best solution, since it requires a "magic number" which can get lost in the mix, whereas null values are fairly straightforward to the client.

On Sat, Jan 17, 2015 at 4:06 PM, Thomas Shafer notifications@github.com wrote:

Thanks @lgorse https://github.com/lgorse. Merged and pushed 0.0.11 https://github.com/cine-io/cineio-broadcast-android/releases/tag/v0.0.11 .

— Reply to this email directly or view it on GitHub https://github.com/cine-io/cineio-broadcast-android/pull/6#issuecomment-70390395 .


Laurent Gorse MBA, class of 2013 Stanford Graduate School of Business 650.644.9188 lgorse@stanford.edu gsb.stanford.edu|Facebook: StanfordGSB http://facebook.com/StanfordGSB |Twitter: @StanfordBiz http://twitter.com/StanfordBiz