INPlayMediaIntent ignores the time period "video"


I am organising SiriKit on my app, and to date so good, however I’ve discovered that when defining consumer vocabulary for playlist names, that something with the phrase "video" will get ignored. "movies" fares just a little higher, however nonetheless would not consequence within the conduct I would count on (extra on that under).

I’ve the next code in my AppDelegate‘s didFinishLaunchingWithOptions func:

let playlistTitles = [
    "trending video"
]

let vocabulary = INVocabulary.shared()
let playlistTitleSet = NSOrderedSet(array: playlistTitles)
vocabulary.setVocabularyStrings(playlistTitleSet, of: .mediaPlaylistTitle)

After I run my app utilizing the this command Play trending video within the {App} and fix a breakpoint in my IntentHandler I can see that the mediaSearch object is nil.

If I alter the playlist identify in my vocabulary code to "shardy denims" after which hit the identical breakpoint I see the mediaSearch object I would count on:

<INMediaSearch: 0x104b45550> {
    reference = 0;
    mediaType = 5;
    sortOrder = 0;
    albumName = <null>;
    mediaName = shardy denims;
    genreNames = (
    );
    artistName = <null>;
    moodNames = (
    );
    releaseDate = <null>;
    mediaIdentifier = <null>;
}

I then went and edited my playlist names within the vocabulary to incorporate "trending movies" (as a substitute of "trending video"), this no less than returned a mediaSearch object that included a mediaName, nonetheless, on this case there was no mediaType of .playlist like within the earlier instance:

<INMediaSearch: 0x104a498b0> {
    reference = 0;
    mediaType = 0;
    sortOrder = 0;
    albumName = <null>;
    mediaName = trending movies;
    genreNames = (
    );
    artistName = <null>;
    moodNames = (
    );
    releaseDate = <null>;
    mediaIdentifier = <null>;
}

Any concepts on how I can get "trending video" acknowledged as a playlist identify in my consumer vocabulary for the app?

Similar Posts

Leave a Reply

Your email address will not be published.