1
InitialObjectDescriptor {
3
audioProfileLevelIndication 255
4
visualProfileLevelIndication 254
5
sceneProfileLevelIndication 1
6
graphicsProfileLevelIndication 1
7
ODProfileLevelIndication 1
11
decConfigDescr DecoderConfigDescriptor {
13
decSpecificInfo BIFSConfig {
30
info ["This shows script used to retrieve system time" "" "GPAC Regression Tests" "(C) 2002-2004 GPAC Team"]
31
title "Script Date() test"
36
appearance Appearance {
42
geometry DEF TXT Text {
43
string ["MPEG4 time on your system"]
45
justify ["MIDDLE" "MIDDLE"]
52
DEF TIMER TimeSensor {
56
eventIn SFTime set_time
57
field SFNode str USE TXT
58
url ["javascript:function set_time(value, text) {today = new Date();the_day = today.getDate();the_weekday = today.getDay();the_month = today.getMonth();the_year = today.getYear();the_hour = today.getHours();the_minute = today.getMinutes();the_second = today.getSeconds();am_pm = 0;the_initials = 'a.m.';if (the_year < 1900) the_year = the_year + 1900;if ((the_hour >=2) && (the_hour <=11)) {am_pm = the_hour;the_initials = 'a.m.';} else if (the_hour == 0) {am_pm = 12;the_initials = 'a.m.';} else if (the_hour == 12) {am_pm = 12;the_initials = 'p.m.';} else if (the_hour >=13) {am_pm = the_hour - 12;the_initials = 'p.m.';}if (the_minute <=9) the_minute = '0' + (the_minute);if (the_second <=9) the_second = '0' + (the_second);if (the_month == '0') the_month = 'January';else if (the_month == '1') the_month = 'February';else if (the_month == '2') the_month = 'March';else if (the_month == '3') the_month = 'April';else if (the_month == '4') the_month = 'May';else if (the_month == '5') the_month = 'June';else if (the_month == '6') the_month = 'July';else if (the_month == '7') the_month = 'August';else if (the_month == '8') the_month = 'September';else if (the_month == '9') the_month = 'October';else if (the_month == '10') the_month = 'November';else if (the_month == '11') the_month = 'December';if (the_weekday == '0') the_weekday = 'Sunday';else if (the_weekday == '1') the_weekday = 'Monday';else if (the_weekday == '2') the_weekday = 'Tuesday';else if (the_weekday == '3') the_weekday = 'Wednesday';else if (the_weekday == '4') the_weekday = 'Thursday';else if (the_weekday == '5') the_weekday = 'Friday';else if (the_weekday == '6') the_weekday = 'Saturday';if (the_day == '1') the_day = '1st';else if (the_day == '2') the_day = '2nd';else if (the_day == '3') the_day = '3rd';else if (the_day == '4') the_day = '4th';else if (the_day == '21') the_day = '21st';else if (the_day == '22') the_day = '23rd';else if (the_day == '31') the_day = '31st';else the_day = the_day + 'th';str.string[1] = the_weekday + ' ' + the_day + ' ' + the_month + ', ' + the_year;str.string[2] = am_pm + ':' + the_minute + ':' + the_second + ' ' + the_initials;}function initialize() {set_time(0, 0);}" ]
63
ROUTE TIMER.cycleTime TO SC.set_time