Skip to content

Why is category removed from TTS.IOptions? #11

@randnetdd

Description

@randnetdd

Category has been removed from TTS.IOptions in commit fafba8c.

Why is this change?

The category option is a flag required to mute TTS when the mute mode is turned on on the iPhone.

    NSString* category = [options objectForKey:@"category"];

    [[AVAudioSession sharedInstance] setActive:NO withOptions:0 error:nil];
    if ([category isEqualToString:@"ambient"]) {
        [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient
                                         withOptions:0 error:nil];
    } else {
        [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback
                                         withOptions:AVAudioSessionCategoryOptionDuckOthers error:nil];
    }

Thank you,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions