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

Remember decision for "Background music" on chapter start #14

Closed
fhemberger opened this issue Oct 10, 2018 · 9 comments
Closed

Remember decision for "Background music" on chapter start #14

fhemberger opened this issue Oct 10, 2018 · 9 comments

Comments

@fhemberger
Copy link
Contributor

Set a cookie remembering the last state of the checkbox

@emanchado
Copy link
Owner

emanchado commented Oct 11, 2018

Great suggestion! This had probably crossed my mind at some point but it got lost in the void. I'll see how easy it is to do.

@emanchado
Copy link
Owner

I'm wondering about this: should this be tied to the computer, to the player, or to the story/character? All of them make sense to me, I'm not sure what the most common case, or common expectation, would be.

Probably the last one is the least likely to be expected by the user, but I'm not sure about the other two.

@blinks
Copy link

blinks commented Oct 22, 2018

To the computer would be fine -- I'm normally reading on the same devices, and it's easy enough to toggle on the page itself (which should not toggle the default, for what it's worth).

The big thing is just avoiding the interstitial.

@blinks
Copy link

blinks commented Oct 22, 2018

To the story doesn't work -- I don't want someone else to set my default. To the character might be odd, because I feel like I'd have the same preference no matter who I'd be playing.

It's effectively to the user, but the device is 90% there.

@emanchado
Copy link
Owner

Ah, by "story" I only meant "character" (from the POV of a player, and assuming one character per player, there's no difference). I agree that making it "global" per story would be terrible. I thought character could make sense because maybe playing different stories with different narrators could make a difference or something. But yeah, unlikely.

About the device, I wonder if that's preferable to user (see below; it should be possible). Because if sometimes I read on a desktop computer, and sometimes on a tablet, I might have different preferences. But then again, if a tablet is shared, it might be annoying to use the browser itself to save the preferences.

Finally, it is possible to make it a preference to the user (as in the email address). I don't think players think much about it, but they do have a user in NARROWS. By default it won't have a password, but they can go to the hostname of their installation and ask to reset their own password. Then they can login and create new stories or whatever. When they are readers, the special URLs are sent via email so they don't have to login just to read and reply to the chapters, but that's just a convenience. So the point is that players do have a user in the database, and it shouldn't be hard to save a preference there if that's the best solution.

One potential problem I see with skipping the "start" page completely, though, is that on mobile devices it may be impossible to start any music without any user interaction. I guess I could always give the option only to never start the music, but it feels a bit flimsy to not go both ways.

@blinks
Copy link

blinks commented Oct 22, 2018

Another reason for device is that my home computer I might not mind having music on, but my work computer (and my phone) should be silent.

@fhemberger
Copy link
Contributor Author

Also, by device is the easiest to implement (just check for a client side cookie). So that would be a good point to start.

@emanchado
Copy link
Owner

@fhemberger: heh, this is Elm. Sometimes what is easy and what is hard is flipped around (compared to JavaScript, anyway) 😅

But I now think that approach makes the most sense, so I'm going to start by setting a cookie with whatever the last selection was, and use that as a default (instead of always defaulting to true).

@blinks: I'm pretty sure that at least on some (popular) mobile browsers it's not possible to start playing music without user interaction, so I think it won't be possible to start a chapter with music just by loading the URL. I'm tempted to separate the removal of the "Start page" to another issue, so we can discuss and track better. Hopefully when I'm done with the cookie thing I will have clearer ideas about the rest.

@emanchado
Copy link
Owner

I just finished branch issue14-settings-cookie with an initial implementation for remembering the last checkbox value for the background music thing.

I'll test a little bit more and merge and release in a couple of days. Then I'll start experimenting and thinking about the other stuff, possibly after moving it to a new issue. Thanks a lot for the ideas and the discussion!

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

No branches or pull requests

3 participants