Need help audio and subtitle setting

Need help audio and subtitle setting

For a qt qml application , i have to use the plex api.
I managed to have token, sections and movies metadata.
i set the mediaplayer source to :

http://host:port/library/parts/918/1484335510/file.avi?X-Plex-Token=*************
And all works very fine.
I also get all audio languages and subtitle avaibles for the movie but when i call

put–>http://host:port/library/parts/" + ratingKey + “? subtitleStreamID=” + id;
or
put–>http://host:port/library/parts/" + ratingKey + “?audioStreamID=” + id;

absolutely nothing happened.
Haw can i do it.

Need help for audio and subtitle setting with plex api on javascript