var remaining_audio_init_timeout; function DrawTB(UseAudio, ImagePath, CamNbr, MediaRecording, HideMicSettings) // NOTE: HideMicSettings = "yes" for 207, otherwise it should be "no" (or undefined) { if (document.Player) { if (UseAudio == "yes") { if (HideMicSettings == "yes") { document.Player.ToolbarConfiguration = "+play,+snapshot,+fullscreen,+mute,+volume"; if (ImagePath.indexOf("mpeg4") != -1) { if (MediaRecording != 0) { document.Player.ToolbarConfiguration = "+play,+snapshot,+rec,+fullscreen,+mute,+volume"; document.Player.EnableRecording = MediaRecording; } } else { remaining_audio_init_timeout = 5000; doAudioCheck(ImagePath, CamNbr, MediaRecording); } } else { remaining_audio_init_timeout = 5000; doAudioCheck(ImagePath, CamNbr, MediaRecording); } } else if (MediaRecording != 0) { document.Player.ToolbarConfiguration = "+play,+snapshot,+rec,+fullscreen"; document.Player.EnableRecording = MediaRecording; } else { document.Player.ToolbarConfiguration = "+play,+snapshot,+fullscreen"; } if (UseAudio == "yes") { document.Player.Play(); } } } function doAudioCheck(ImagePath, CamNbr, MediaRecording) { if (!document.AudioComponent) { if (remaining_audio_init_timeout > 0) { setTimeout('doAudioCheck()', 250); remaining_audio_init_timeout -= 250; } else if (ImagePath.indexOf("mpeg4") != -1 && MediaRecording != 0) { document.Player.ToolbarConfiguration = "+play,+snapshot,+rec,+fullscreen"; document.Player.EnableRecording = MediaRecording; } else { document.Player.ToolbarConfiguration = "+play,+snapshot,+fullscreen"; } } else { initAudio(ImagePath, CamNbr, MediaRecording); } } function initAudio(imagepath, camnbr, mediarecording) { document.Player.AudioConfigURL = "/axis-cgi/view/param.cgi?action=list&group=Audio,AudioSource.A0"; document.Player.AudioTransmitURL = "/axis-cgi/audio/transmit.cgi"; if (imagepath.indexOf("mjpg") != -1) { document.Player.AudioReceiveURL = "/axis-cgi/audio/receive.cgi?camera=" + camnbr; document.Player.ToolbarConfiguration = "+play,+snapshot,+fullscreen,+audiocontrol"; } if (imagepath.indexOf("mpeg4") != -1) { if (mediarecording != 0) { document.Player.ToolbarConfiguration = "+play,+snapshot,+rec,+fullscreen,+audiocontrol"; document.Player.EnableRecording = mediarecording; } else { document.Player.ToolbarConfiguration = "+play,+snapshot,+fullscreen,+audiocontrol"; } } } function InstallFilter(prodName, ID, CLSID_filter, ver_filter, cab, installText1, text, installText2, installText3, installText4) { var createdElement = document.createElement('
' + ID + ' ' + installText1 + ' ' + text + ' ' + installText2 + ' ' + installText3 + '
' +ID + ' ' + installText4 + '
'); filterinstallocation.appendChild(createdElement); } function InstallDecoder(prodName, ID, CLSID_AMC, cab, ver_AMC, authorized, notAuthorizedText, authorizedText, installDecoderText1, installDecoderText2) { document.write('

' + notAuthorizedText + '
'); } else { document.write('

' + authorizedText + '
') } else { document.write('/incl/license.shtml\')">' + authorizedText + '
') } } document.write('
' + installDecoderText1); if (authorized == "yes") { document.write('
' + installDecoderText2); } document.write('

'); } function drawMpeg4Dec(height, width, imagepath, CLSID_AMC, cab, ver_AMC) { document.write('
'); } function drawAacDec(height, width, imagepath, CLSID_AAC_dec, cab, ver_AAC_dec) { document.write(''); } function DrawAMC(prodName, ID, height, width, imagepath, CLSID_AMC, cab, ver_AMC, ShowAMCToolbar, ptzgui, useWithCam, camnbr, UseRel, ShowRelCross, ShowSVG, UseMotion, UseAudio, rtspPort, external, installText1, text, installText2, installText3, installText4, mediaRecording, extra, enableAreaZoom) // NOTE: extra = "yes" -> 207, extra = "9999" means centermode (zoom=9999) is activated in 212PTZ, otherwise extra should be "no" or undefined. { var rtspAddress = "rtsp://" + location.hostname if (imagepath.indexOf("mpeg4") != -1) { var mpeg4 = "yes"; } if (imagepath.indexOf("mjpg") != -1) { var mjpg = "yes"; } if (imagepath.indexOf("mpeg2") != -1) { var mpeg2 = "yes"; } if (imagepath.indexOf("sdp") != -1) { var multicast = "yes"; } document.write(''); if(mpeg4 == "yes" && external == "no") { document.write(''); } else { document.write(''); } if ((mpeg4 == "yes") && (multicast != "yes")) { document.write(''); } else if (multicast == "yes") { document.write(''); } if (mjpg == "yes") { document.write(''); } if (mpeg2 == "yes") { document.write(''); } if (extra == "yes") { // 207 document.write(''); } document.write(''); } else { document.write('value="0">'); } document.write(''); } else { document.write('value="0">'); } if (UseAudio == "yes") { document.write(''); } else { document.write(''); } if (UseMotion == "yes") { document.write(''); } else { document.write(''); } if ((ptzgui == "yes") && (useWithCam == "yes")) { document.write(''); } document.write('
' + ID + ' ' + installText1 + ' ' + text + ' ' + installText2 + ' ' + installText3 + '
' + ID + ' ' + installText4); document.write('

'); if (document.Player.ShowToolbar) { // This line is essential when installing AMC or else volume and mute buttons will show until reload if (ShowAMCToolbar == "yes") { if (extra == "yes") { // = 207 document.Player.ToolbarConfiguration = "+play,+snapshot,+fullscreen,+mute,+volume"; } else if (mpeg4 == "yes" && mediaRecording != 0) { document.Player.ToolbarConfiguration = "+play,+snapshot,+rec,+fullscreen"; document.Player.EnableRecording = mediaRecording; } else { document.Player.ToolbarConfiguration = "+play,+snapshot,+fullscreen"; } } } if (UseMotion == "yes") { document.Player.UIMode = "MDConfig"; document.Player.MotionConfigURL = "/axis-cgi/operator/param.cgi?ImageSource=" + [camnbr - 1] document.Player.MotionDataURL = "/axis-cgi/motion/motiondata.cgi"; } if (ShowSVG == "yes") { document.Player.SvgDataURL = "/axis-cgi/iv/stream.cgi?channel=9"; } document.Player.EnableContextMenu = "1"; if ((enableAreaZoom == "yes") && (useWithCam == "yes")) { document.Player.EnableJoystick = "True"; document.Player.EnableAreaZoom = "True"; } } //-->