How can I make this command work correctly
I have a film with the director's commentary, I put it as the fifth audio.
Let's suppose I choose audio 3 in the audio menu which is in Spanish, then I activate the director's audio and stop the disc from playing.
Now when I return the disc I want the menu to resume, continue my film in the last audio which in this case is the director's commentary, but when selecting to turn off commented audio number 5, I want it to return to audio number 3 , which was the last choice made before activating audio 5.
How can I make the command? I tried via gpr as follows
1- Language menu Audio 01
Audio 02int curPlayListID = manager.getPlaylistID();
manager.setGPR(10, 5);
manager.selectAudioStream('Playlist Movie', 1, curPlayListID == 'Playlist Movie');
manager.UpdateCurrent_PM_popupaudioMenu();
manager.activateSegment("S:PM_popupsubtitlesMenu.show_menu");
manager.UpdateCurrent_PM_popupaudioMenu();
ETC...int curPlayListID = manager.getPlaylistID();
manager.setGPR(10, 6);
manager.selectAudioStream('Playlist Movie', 2, curPlayListID == 'Playlist Movie');
manager.UpdateCurrent_PM_popupaudioMenu();
manager.activateSegment("S:PM_popupsubtitlesMenu.show_menu");
manager.UpdateCurrent_PM_popupaudioMenu();
02 - Menu deactivating the director's audio
These commands work correctly, when you disable the comment, the audio returns to the previous one, but this is only when the disc has not been ejectedint streamId = 0;
int chapterId = manager.getCurrentChapter();
int curPlayListID = manager.getPlaylistID();
if (manager.getGPR(10)==5) {
manager.selectAudioStream('Playlist Movie', 1, curPlayListID == 'Playlist Movie');
}
if (manager.getGPR(10)==6) {
manager.selectAudioStream('Playlist Movie', 2, curPlayListID == 'Playlist Movie');
}
if (manager.getGPR(10)==7) {
manager.selectAudioStream('Playlist Movie', 3, curPlayListID == 'Playlist Movie');
}
if (manager.getGPR(10)==8) {
manager.selectAudioStream('Playlist Movie', 4, curPlayListID == 'Playlist Movie');
}
{
manager.activateButtonEx("H:PM_popupMenu.Handler", "mm_bonus", false);
manager.activateSegment("S:PM_popupMenu.show_menu");
}
When reinserting the disc it plays where it left off with audio 5, but when I go to deactivate it does not activate audio 3 which was the last choice made.
How do I fix this problem?
I put the command in the Menu to summarize the command in YES:
It returns me audio 1, because the gpr is 10=5 it is the first audio, but I wanted it to activate audio 3, or 2 or 4, whichever the person chose before activating audio 5 and stopping playbackint streamId = 0;
int chapterId = manager.getCurrentChapter();
int curPlayListID = manager.getPlaylistID();
{
manager.setGPR(10, 5);
}
{
manager.playMovie();
}
{
manager.Close_Popup();
}
My settings in On JAR startup
manager.Store_Streams();
int streamId = 0;
int chapterId = manager.getCurrentChapter();
int curPlayListID = manager.getPlaylistID();
boolean canExec = true;
if (canExec && (manager.canResume('Playlist Movie'))) {
canExec = false;
manager.setGPR(10, 1);
manager.allowSaveState(true);
manager.saveMediaState();
manager.setStartPlayMarkResume();
manager.playVideo('Playlist Movie');
manager.activateSegment("S:Movie");
}
if (canExec) {
canExec = false;
manager.allowSaveState(true);
manager.saveMediaState();
manager.setStartPlayMark(#1);
manager.playVideo('SONY');
manager.activateSegment("S:Movie");
}
if ((curPlayListID == 'Movie')) {
streamId = manager.getCurrentAudioID();
} else {
streamId = manager.getAudioID('Movie', true);
}
if (canExec && ((streamId == 1))) {
canExec = false;
manager.setGPR(10, 5);
}