Example #1
0
        public virtual VSMXBaseObject getPlayerStatus(VSMXBaseObject @object)
        {
            VSMXBaseObject playerStatus;

            if (playing)
            {
                playerStatus = new VSMXObject(interpreter, "PlayerStatus");
                playerStatus.setPropertyValue("playListNumber", new VSMXNumber(interpreter, playListNumber));
                playerStatus.setPropertyValue("chapterNumber", new VSMXNumber(interpreter, chapterNumber));
                playerStatus.setPropertyValue("videoNumber", new VSMXNumber(interpreter, videoNumber));
                playerStatus.setPropertyValue("audioNumber", new VSMXNumber(interpreter, audioNumber));
                playerStatus.setPropertyValue("audioFlag", new VSMXNumber(interpreter, audioFlag));
                playerStatus.setPropertyValue("subtitleNumber", new VSMXNumber(interpreter, subtitleNumber));
                playerStatus.setPropertyValue("subtitleFlag", new VSMXNumber(interpreter, subtitleFlag));
            }
            else
            {
                playerStatus = VSMXUndefined.singleton;
            }

            //if (log.DebugEnabled)
            {
                Console.WriteLine(string.Format("MoviePlayer.getPlayerStatus() returning {0}", playerStatus));
            }

            return(playerStatus);
        }
Example #2
0
        private static void createTable(VSMXInterpreter interpreter, Display display, Controller controller, VSMXObject parent, RCO.RCOEntry mainTable, int id, string name)
        {
            VSMXBaseObject table = new VSMXObject(interpreter, null);

            parent.setPropertyValue(name, table);

            RCO.RCOEntry[] entries = findEntries(mainTable, id);

            if (entries != null)
            {
                foreach (RCO.RCOEntry entry in entries)
                {
                    createObjectFromEntry(interpreter, display, controller, table, entry);
                }
            }
        }
Example #3
0
        public virtual void onChapter(int chapterNumber)
        {
            //if (log.DebugEnabled)
            {
                Console.WriteLine(string.Format("MoviePlayer.onChapter chapterNumber={0:D}", chapterNumber));
            }

            VSMXBaseObject callback = object.getPropertyValue("onChapter");

            if (callback is VSMXFunction)
            {
                VSMXBaseObject argument = new VSMXObject(interpreter, null);
                argument.setPropertyValue("chapterNumber", new VSMXNumber(interpreter, chapterNumber));

                VSMXBaseObject[] arguments = new VSMXBaseObject[1];
                arguments[0] = argument;
                interpreter.interpretFunction((VSMXFunction)callback, null, arguments);
            }
        }
Example #4
0
        public virtual VSMXBaseObject getResumeInfo(VSMXBaseObject @object)
        {
            VSMXBaseObject resumeInfo;

            if (playing)
            {
                resumeInfo = new VSMXObject(interpreter, "ResumeInfo");
                resumeInfo.setPropertyValue("playListNumber", new VSMXNumber(interpreter, playListNumber));
            }
            else
            {
                resumeInfo = VSMXUndefined.singleton;
            }

            //if (log.DebugEnabled)
            {
                Console.WriteLine(string.Format("MoviePlayer.getResumeInfo() returning {0}", resumeInfo));
            }

            return(resumeInfo);
        }