Skip to content
This repository was archived by the owner on May 6, 2022. It is now read-only.

Conversation

@timmywil
Copy link
Member

This sends the play event based on PLAYBACK_STARTED and PLAYBACK_STOPPED.

@timmywil timmywil requested a review from space-pope December 18, 2020 18:40
Copy link
Contributor

@space-pope space-pope left a comment

Choose a reason for hiding this comment

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

LGTM from a code perspective, though see my question below.

}
TTSEvent.Type.PLAYBACK_COMPLETE -> {
// Playback is not pause-able in iOS
// so this event does not exist there.
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder about the semantics of the events here. Can playback not be interrupted on iOS by the system giving audio focus to another app (e.g. the phone)?

In my mind, if playback can't be paused on iOS, it would be the PLAYBACK_STOPPED event that doesn't exist there, not PLAYBACK_COMPLETE.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can playback not be interrupted on iOS by the system giving audio focus to another app (e.g. the phone)?

Only if that app took over the audio session. Audio can keep playing in the background as well if the user sets the right category and category options, since AudioSession handling is left to the user. While that is something we can know, it is not something currently tracked with an event. But you may be right that the iOS event is more like stopped than complete.

@timmywil timmywil merged commit f90be77 into master Dec 21, 2020
@timmywil timmywil deleted the feature/playback branch December 21, 2020 15:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants