#4 JavaScript::Eval (size: 83371, repeated: 1) var CMPPluginDetection = (function() {
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function(d) {
var c = this.length;
var e = Number(arguments[1]) || 0;
e = (e < 0) ? Math.ceil(e) : Math.floor(e);
if (e < 0) {
e += c
}
for (; e < c; e++) {
if (e in this && this[e] === d) {
return e
}
}
return -1
}
}
var a = null;
function b() {
var v = this;
var w = "PRODUCTION";
var C = 0;
var A = 1;
var G = 2;
var g = 3;
var t = "Flash_Plugin_Update_";
var bd = "Flash_Standalone_Update_";
var e = "DIRECTV_Player_";
var R = "conf.dtvce.com/DIRECTV_client_installers/DIRECTV_Player_Installer/installer-v2.2.2.js";
function L() {
return window.location.protocol == "https:"
}
var n = document.createElement("script");
n.setAttribute("type", "text/javascript");
var be = (L() ? "https://" : "http://") + R;
if (w.indexOf("LOCAL") != -1) {
be = R
}
n.setAttribute("src", be);
document.getElementsByTagName("head")[0].appendChild(n);
var c = {
Mac: {
Chrome: ["4.0", "15.0"],
Firefox: ["3.6", "8.0.1"],
Safari: ["4.0", "5.1.1"]
},
Windows: {
Explorer: ["7.0", "9.0"],
Chrome: ["4.0", "15.0"],
Firefox: ["3.6", "8.0.1"],
Safari: ["4.0", "5.1.2"]
}
};
var S = "*";
var h = ["OS", "OS_VER", "OS_BITNESS", "BROWSER_NAME", "BROWSER_MIN_VERSION", "BROWSER_MAX_VERSION", "SUPPORT_STATUS"];
var f = [
["Windows", "6.2", "*", "*", "0", "9999", A]
];
var bf = {
init: function() {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.fullVersion = this.searchVersion(navigator.userAgent, this.versionSearchString) || this.searchVersion(navigator.appVersion, this.versionSearchString) || "an unknown version";
this.version = parseFloat(this.fullVersion) || "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
this.OSVersion = this.searchVersion(navigator.userAgent, this.versionSearchString) || "an unknown OS version";
while (this.OSVersion.search("_") != -1) {
this.OSVersion = this.OSVersion.replace("_", ".")
}
this.OSBitness = this.getOsBitness(this.OS, this.OSVersion);
this.BrowserBitType = this.getBrowserBitness()
},
searchString: function(a) {
for (var b = 0; b < a.length; b++) {
var c = a[b].string;
var d = a[b].prop;
this.versionSearchString = a[b].versionSearch || a[b].identity;
if (c) {
if (c.indexOf(a[b].subString) != -1) {
return a[b].identity
}
} else {
if (d) {
return a[b].identity
}
}
}
},
searchVersion: function(a, b) {
var c = a.indexOf(b);
if (c == -1) {
return
}
var d = c + b.length + 1;
var e = a.indexOf(" ", d);
return (e == -1) ? a.substring(d) : a.substring(d, e)
},
getOsBitness: function(a, b) {
result = "32";
if ((a == "Windows" && (navigator.userAgent.indexOf("WOW64") != -1 || navigator.userAgent.indexOf("Win64") != -1)) || (a == "Mac" && z(b, "10.5") >= 0)) {
result = "64"
}
return result
},
getBrowserBitness: function() {
var a = (navigator.userAgent.indexOf("x64") != -1) ? "64" : "32";
return a
},
dataBrowser: [{
string: navigator.userAgent,
subString: "Chrome",
identity: "Chrome"
}, {
string: navigator.userAgent,
subString: "OmniWeb",
versionSearch: "OmniWeb/",
identity: "OmniWeb"
}, {
string: navigator.vendor,
subString: "Apple",
identity: "Safari",
versionSearch: "Version"
}, {
prop: window.opera,
identity: "Opera"
}, {
string: navigator.vendor,
subString: "iCab",
identity: "iCab"
}, {
string: navigator.vendor,
subString: "KDE",
identity: "Konqueror"
}, {
string: navigator.userAgent,
subString: "Firefox",
identity: "Firefox"
}, {
string: navigator.vendor,
subString: "Camino",
identity: "Camino"
}, {
string: navigator.userAgent,
subString: "Netscape",
identity: "Netscape"
}, {
string: navigator.userAgent,
subString: "MSIE",
identity: "Explorer",
versionSearch: "MSIE"
}, {
string: navigator.userAgent,
subString: " Gecko",
identity: "Mozilla",
versionSearch: "rv"
}, {
string: navigator.userAgent,
subString: "Mozilla",
identity: "Netscape",
versionSearch: "Mozilla"
}],
dataOS: [{
string: navigator.platform,
subString: "Win",
identity: "Windows",
versionSearch: "Windows NT"
}, {
string: navigator.platform,
subString: "Mac",
identity: "Mac",
versionSearch: "Mac OS X"
}, {
string: navigator.userAgent,
subString: "iPhone",
identity: "iPhone/iPod"
}, {
string: navigator.platform,
subString: "Linux",
identity: "Linux"
}]
};
bf.init();
function z(a, b) {
var c = a.split(".");
var d = b.split(".");
for (var e = 0; e < Math.min(c.length, d.length); e++) {
if (parseInt(c[e]) < parseInt(d[e])) {
return (-1 * (e + 1))
}
if (parseInt(c[e]) > parseInt(d[e])) {
return e + 1
}
}
return 0
}
function r(a, b) {
var c = U(b);
if (c == C) {
c = N(a)
}
return c
}
function U(a) {
for (var b = 0; b < a.length; b++) {
var c = a[b][h.indexOf("OS")];
if (c != S && c != bf.OS) {
continue
}
var d = a[b][h.indexOf("OS_VER")];
if (d != S && z(d, bf.OSVersion) != 0) {
continue
}
var e = a[b][h.indexOf("OS_BITNESS")];
if (e != S && e != bf.OSBitness) {
continue
}
var f = a[b][h.indexOf("BROWSER_NAME")];
if (f != S && f != bf.browser) {
continue
}
var g = a[b][h.indexOf("BROWSER_MIN_VERSION")];
var i = a[b][h.indexOf("BROWSER_MAX_VERSION")];
if (z(bf.fullVersion, g) < 0 || z(bf.fullVersion, i) > 0) {
continue
}
return a[b][h.indexOf("SUPPORT_STATUS")]
}
return C
}
function N(a) {
if (bf.OS in a) {
if (bf.browser in a[bf.OS]) {
if ((bf.OS == "Windows" && bf.BrowserBitType == "32") || bf.OS == "Mac") {
var b = a[bf.OS][bf.browser][0];
var c = a[bf.OS][bf.browser][1];
var d = bf.fullVersion;
if (z(d, b) < 0) {
return G
}
if (z(d, c) > 0) {
return A
}
} else {
return G
}
} else {
return G
}
} else {
return g
}
return C
}
var Y = r(c, f);
var o = "";
var u = -1;
var K = -1;
var T = -1;
var m = "";
var B = false;
var P = "";
var s = -1;
var H = -1;
var x = -1;
var q = "";
var l = true;
function E(a) {
var b = -1;
try {
b = new ActiveXObject(a)
} catch (ae) {
b = {
activeXError: true
}
}
return b
}
function y(a, b) {
return a == undefined ? (b ? T : x) : parseInt(a.replace(/[a-zA-Z]/g, ""), 10)
}
function W(a, b) {
var c = b ? a.split(/ +/) : a.replace("PlayerPlugin ", "");
var d = b ? c[2].split(/\./) : c.split(/\./);
var e = b ? c[3] : d[2];
return {
raw: a,
major: parseInt(d[0], 10),
minor: parseInt(d[1], 10),
revisionStr: e,
revision: y(e, b)
}
}
function Q(a) {
var b = a.split(",");
return {
raw: a,
major: parseInt(b[0].split(" ")[1], 10),
minor: parseInt(b[1], 10),
revision: parseInt(b[2], 10),
revisionStr: b[2]
}
}
function M(a, b, c) {
var d = "";
var e = -1;
var f = -1;
var g = -1;
var h = "";
var i = false;
if (navigator.plugins && navigator.plugins.length > 0) {
var j = navigator.mimeTypes;
if (j && j[a] && j[a].enabledPlugin && j[a].enabledPlugin.description) {
var k = j[a];
if (!c && k) {
d = "1.0.0";
e = "1";
f = "0";
h = "";
g = "0";
i = true
} else {
var n = k.enabledPlugin.description;
var p = W(n, c);
d = p.raw;
e = p.major;
f = p.minor;
h = p.revisionStr;
g = p.revision;
i = true
}
}
} else {
if (navigator.appVersion.indexOf("Mac") == -1 && window.execScript) {
var n = -1;
for (var r = 0; r < b.length && n == -1; r++) {
var s = E(b[r].name);
if (!s.activeXError) {
i = true;
n = c ? b[r].version(s) : "1,0,0";
if (!c) {
s.Shutdown()
}
s = null;
if (n != -1) {
var p = Q(n);
d = p.raw;
e = p.major;
f = p.minor;
h = p.revisionStr;
g = p.revision
}
}
}
}
}
if (c) {
o = d;
flashMajor = e;
flashMinor = f;
m = h;
T = g;
B = i
} else {
P = d;
protectedMajor = e;
protectedMinor = f;
q = h;
x = g;
l = i
}
}
function Z(a) {
return {
installed: a ? B : l,
major: a ? flashMajor : protectedMajor,
minor: a ? flashMinor : protectedMinor,
revision: a ? T : x
}
}
function J(a, b) {
var c = a ? [flashMajor, flashMinor, T] : [protectedMajor, protectedMinor, x];
var d = Math.min(c.length, b.length);
var e = false;
for (i = 0; i < d; i++) {
if (c[i] >= b[i]) {
if (i + 1 < d && c[i] == b[i]) {
continue
} else {
e = true;
break
}
} else {
break
}
}
return e
}
function d(a) {
var b = -1;
try {
b = a.GetVariable("$version")
} catch (ae) {}
return b
}
function D() {
var c = [{
name: "ShockwaveFlash.ShockwaveFlash.7",
version: function(a) {
return d(a)
}
}, {
name: "ShockwaveFlash.ShockwaveFlash.6",
version: function(a) {
var b = "6,0,21";
try {
a.AllowScriptAccess = "always";
b = d(a)
} catch (af) {}
return b
}
}, {
name: "ShockwaveFlash.ShockwaveFlash",
version: function(a) {
return d(a)
}
}];
M("application/x-shockwave-flash", c, true)
}
D();
function I() {
var a = [{
name: "NDS.PlayerPlugin"
}];
M("application/x-pcshow-player", a, false)
}
I();
function F() {
var a = "";
if (navigator.appVersion.indexOf("Win") != -1) {
a = (bf.OSBitness == "32") ? installers.win32_activex : installers.win64_activex
}
if (navigator.appVersion.indexOf("Mac") != -1) {
a = installers.mac_browserPlugin
}
return a
}
function O() {
var a = "";
if (navigator.appVersion.indexOf("Mac") != -1) {
a = installers.mac_browserPlugin
}
if (navigator.appVersion.indexOf("Win") != -1) {
a = (bf.browser == "Explorer") ? (bf.OSBitness == "32") ? installers.win32_activex : installers.win64_activex : (bf.OSBitness == "32") ? installers.win32_browserPlugin : installers.win64_browserPlugin
}
return a
}
function V() {
var a = "";
if (navigator.appVersion.indexOf("Win") != -1) {
a = installers.win
}
if (navigator.appVersion.indexOf("Mac") != -1) {
a = installers.mac
}
return a
}
function X(a, b) {
var c = installers.metrics_url + "?url=";
var d = "";
if (a && b) {
c = c + encodeURIComponent(F());
d = bd
} else {
if (a) {
c = c + encodeURIComponent(O());
d = t
} else {
c = c + encodeURIComponent(V());
d = e
}
}
c = c + "&pe=lnk_d&pev1=" + encodeURIComponent(document.URL) + "&pev2=";
if (a) {
c = c + d + installers.flash_player_version
} else {
c = c + d + installers.directv_player_version
}
window.location = c
}
this.isFlashPlayerInstalled = function() {
return B
};
this.getFlashPlayerVersion = function() {
return Z(true)
};
this.checkFlashPlayerVersion = function() {
return J(true, arguments)
};
this.isProtectedPlayerInstalled = function() {
return l
};
this.getProtectedPlayerVersion = function() {
return Z(false)
};
this.checkProtectedPlayerVersion = function() {
return J(false, arguments)
};
this.downloadPluginInstaller = function() {
X(false, false)
};
this.downloadFlashStandaloneInstaller = function() {
X(true, true)
};
this.downloadFlashPluginInstaller = function() {
X(true, false)
};
this.isBrowserSupported = function() {
return (Y == g) ? G : Y
};
this.isOSSupported = function() {
return (Y != g)
}
}
return new function() {
this.getInstance = function() {
if (a == null) {
a = new b();
a.constructor = null
}
return a
}
}
})();
CMPPluginDetection.getInstance();
function IsIE() {
return (BrowserDetect.browser == "Explorer")
}
function IsChrome() {
return (BrowserDetect.browser == "Chrome")
}
function UseCoreGraphics() {
if (BrowserDetect.OS != "Mac") {
return false
}
if ((BrowserDetect.browser == "Chrome" && BrowserDetect.version < 19) || (BrowserDetect.browser == "Firefox" && BrowserDetect.version < 10) || (BrowserDetect.browser == "Safari" && BrowserDetect.version < 5)) {
return true
}
return false
}
function GetNDSPlayerHtml(d, c, e, h) {
var b = "";
var g = "";
var a = "";
var f = "";
if (IsIE()) {
g = '<PARAM name="windowless" value="' + c + '"></PARAM>';
if (e != null && e != undefined && e.length > 0) {
a = '<PARAM name="skin" value="' + e + '"></PARAM>'
}
if (h != null && h != undefined && h.length > 0) {
f = '<PARAM name="flashvars" value="' + h + '"></PARAM>'
}
b += '<object id="' + d + '" classid="CLSID:7a434a49-f21e-5011-8f99-aa7578492b9c" type="application/x-oleobject" ';
if (UseCoreGraphics()) {
b += 'drawingModel="NPDrawingModelCoreGraphics" '
}
b += 'style="height: 100%; width: 100%;">';
b += g;
b += f;
b += a;
b += "</object>"
} else {
g = ' windowless="' + c + '"';
if (e != null && e != undefined && e.length > 0) {
a = ' skin="' + e + '"'
}
if (h != null && h != undefined && h.length > 0) {
f = ' flashvars="' + h + '"'
}
b += '<embed id="' + d + '" name="' + d + '" type="application/x-pcshow-player" style="height: 100%; width: 100%;"';
if (UseCoreGraphics()) {
b += ' drawingModel="NPDrawingModelCoreGraphics" '
}
b += g;
b += f;
b += a;
b += "></embed>"
}
return b
}
function InjectPlayer(b, c, d) {
var a = GetNDSPlayerHtml("ndsPlugin", b, c, d);
document.write(a)
}
function IsOfflineUI() {
var a = document.location.href;
return (a.indexOf("offline") > -1)
}
var pcshowPlugin;
var amPlugin;
var pcshowQOSObject = null;
var flashUIObjectPtr;
var eventHandlerPtr;
var pcshowPluginCreationFailedHandlerPtr;
var LogFunction;
function EventHandlerFunction(a) {
if (pcshowPlugin == null) {
return
}
pcshowPlugin.ReportPCShowEvent(a, arguments);
pcshowPlugin.SendEventToFlash(a, arguments);
eventHandlerPtr(a, arguments)
}
function PCShowPlugin() {
this.IsInitialized = false;
this.AppVersion = function() {
return amPlugin.AppVersion
};
this.APIVersion = function() {
var a = amPlugin.APIVersion;
if (a == undefined) {
return "1.6"
}
return a
};
this.AppInternalVersion = function() {
return amPlugin.AppInternalVersion
};
this.InstalledFlashVersion = function() {};
this.SystemSpec = function() {
return amPlugin.SystemSpec
};
this.StartSampling = function() {
return amPlugin.StartSampling()
};
this.StopSampling = function() {
return amPlugin.StopSampling()
};
this.EnableDownloadQueue = function() {
return amPlugin.EnableDownloadQueue()
};
this.DisableDownloadQueue = function() {
return amPlugin.DisableDownloadQueue()
};
this.IsDownloadQueueEnabled = function() {
return amPlugin.IsDownloadQueueEnabled
};
this.EnableDownloadWhileStreaming = function() {
return amPlugin.EnableDownloadWhileStreaming()
};
this.DisableDownloadWhileStreaming = function() {
return amPlugin.DisableDownloadWhileStreaming()
};
this.IsDownloadWhileStreamingEnabled = function() {
return amPlugin.IsDownloadWhileStreamingEnabled
};
this.SwitchToOnline = function() {
return amPlugin.SwitchToOnline()
};
this.SwitchToOffline = function() {
return amPlugin.SwitchToOffline()
};
this.IsOnline = function() {
return amPlugin.IsOnline
};
this.CanSwitchOffline = function() {
return amPlugin.CanSwitchOffline
};
this.OfflineURL = function() {
return amPlugin.OfflineUrl
};
this.IsNetworkConnected = function() {
return amPlugin.IsNetworkConnected
};
this.IsPlayingNow = IsPlayingNow;
this.IsDeviceActivated = function() {
return amPlugin.IsDeviceActivated
};
this.IsNetworkConnectionRequired = function() {
return amPlugin.IsNetworkConnectionRequired
};
this.IsSoftwareUpgradeRequired = function() {
return amPlugin.IsSoftwareUpgradeRequired
};
this.DeviceID = function() {
return amPlugin.DeviceID
};
this.HomeDomainID = function() {
return amPlugin.HomeDomainID
};
this.DrmClientID = function() {
return amPlugin.DrmClientID
};
this.UUID = function() {
return amPlugin.UUID
};
this.UniqueDeviceIdentifier = function() {
return amPlugin.UniqueDeviceIdentifier
};
this.UDID = function() {
return amPlugin.UDID
};
this.QOS = function() {
return amPlugin.QOS
};
this.AllowScreenSaver = function(a) {
return amPlugin.AllowScreenSaver(a)
};
this.ActivateDevice = function(a, f, b, e, c, d) {
return amPlugin.ActivateDevice(a, f, b, e, c, d)
};
this.DeactivateDevice = function() {
return amPlugin.DeactivateDevice()
};
this.RefreshViewingRights = function() {
return amPlugin.RefreshViewingRights()
};
this.RequestDownload = function(d, e, b, c, f, a) {
return amPlugin.RequestDownload(d, e, b, c, f, a)
};
this.PauseDownload = function(a) {
return amPlugin.PauseDownload(a)
};
this.ResumeDownload = function(a) {
return amPlugin.ResumeDownload(a)
};
this.DownloadList = function(b, a) {
return amPlugin.DownloadList(b, a)
};
this.DownloadListAssetCount = function() {
return amPlugin.DownloadListAssetCount
};
this.IncreaseDownloadPriority = function(a) {
return amPlugin.IncreaseDownloadPriority(a)
};
this.DecreaseDownloadPriority = function(a) {
return amPlugin.DecreaseDownloadPriority(a)
};
this.LocalAssetCatalog = function() {
return amPlugin.LocalAssetCatalog
};
this.GetRootDownloadPath = function() {
return amPlugin.RootDownloadPath
};
this.SetRootDownloadPath = function(a) {
amPlugin.RootDownloadPath = a
};
this.GetProgressReportStep = function() {
return amPlugin.ProgressReportStep
};
this.SetProgressReportStep = function(a) {
amPlugin.ProgressReportStep = a
};
this.StreamPlaySessionAsync = StreamPlaySessionAsync;
this.LiveStreamPlayURL = LiveStreamPlayURL;
this.LiveEventPlayURL = LiveEventPlayURL;
this.VodStreamPlayURL = VodStreamPlayURL;
this.ABRVodStreamPlayURL = ABRVodStreamPlayURL;
this.FilePlayURL = FilePlayURL;
this.StopStream = StopStream;
this.Resume = Resume;
this.SetURL = SetURL;
this.Pause = Pause;
this.Stop = Stop;
this.SetPlaybackPosition = SetPlaybackPosition;
this.GetPlaybackPosition = GetPlaybackPosition;
this.State = GetPlayState;
this.GetFullScreen = GetFullScreen;
this.SetFullScreen = SetFullScreen;
this.GetScalingMode = GetScalingMode;
this.SetScalingMode = SetScalingMode;
this.GetVolume = GetVolume;
this.SetVolume = SetVolume;
this.GetMute = GetMute;
this.SetMute = SetMute;
this.GetPlayerUIEnabled = GetPlayerUIEnabled;
this.SetPlayerUIEnabled = SetPlayerUIEnabled;
this.GetPreferredAudioLanguage = GetPreferredAudioLanguage;
this.SetPreferredAudioLanguage = SetPreferredAudioLanguage;
this.GetAutoStart = GetAutoStart;
this.SetAutoStart = SetAutoStart;
this.GetMediaDuration = GetMediaDuration;
this.SetAbrLowThreshold = function(a, b, c) {
return amPlugin.SetAbrLowThreshold(a, b, c)
};
this.SetAbrHighThreshold = function(a, c, b) {
return amPlugin.SetAbrHighThreshold(a, c, b)
};
this.SetAbrMaxTuningTime = function(a) {
return amPlugin.SetAbrMaxTuningTime(a)
};
this.GetQOS = function() {
return amPlugin.GetQOS
};
this.statuses = null;
this.getStatus = function(a) {
return this.statuses.getStatus(a)
};
this.parseStatus = function(a) {
return this.statuses.parseStatus(a)
};
this.getStatusDescription = function(a) {
return this.statuses.getDescription(a)
};
this.getStatusType = function(a) {
return this.statuses.getType(a)
};
this.Init = function() {
return amPlugin.Init()
};
this.Shutdown = function() {
return amPlugin.Shutdown()
};
this.GetSessionStartParams = function() {};
this.GetDRMParams = GetDRMParams;
this.QOSInterface = QOSInterface;
this.Caption = function() {
if (this._caption == null) {
this._caption = new PCShowClosedCaptions()
}
return this._caption
};
this.OnBeforeUnload = function() {
this.ReportPCShowJSEvent("BeforeUnload", [])
};
this.DestructPlayer = DestructPlayer;
this.ReportPCShowJSEvent = function() {};
this.ReportPCShowEvent = function() {};
this.SwitchReportSendingTo = function() {};
this.SendEventToFlash = function() {};
this.CallFlashMethod = function() {};
this.SetSkin = function() {};
this.GetSkin = function() {};
this.GetFlashVars = function() {};
this.SetFlashVars = function() {};
this.AssetCorrectViewingMode = function(a, b) {
if (b != this.ViewingSessionModeAsync()) {}
};
this.ViewingSessionModeAsync = function() {
try {
var a = this.APIVersion();
var c = parseFloat(a);
if ((!isNaN(c)) && (c >= 1.7)) {
return true
}
} catch (b) {}
return false
};
this._playSession = null;
this._playSessionAssetId = null;
this.ResetPlaySession = function() {
this._playSession = null;
this._playSessionAssetId = null
};
this.GetPlaySession = function(a) {
if (this._playSessionAssetId == a) {
return this._playSession
}
};
this.GetPlaySessionURL = function(b) {
var a = this.GetPlaySession(b);
if (a != null) {
return a.PlayURL()
}
}
}
function InitializePcShow(l, n, d, f, a, b, h, g) {
pcshowPlugin = new PCShowPlugin();
if (d == undefined || typeof d != "function") {
throw "InitializePcShow: a valid eventHandler function must be passed!"
}
eventHandlerPtr = d;
if (n == undefined || typeof n != "function") {
throw "InitializePcShow: a valid PCShowPluginCreationFailedHandler function must be passed!"
}
pcshowPluginCreationFailedHandlerPtr = n;
flashUIObjectPtr = g;
if (f != undefined && f != null && typeof f == "function") {
LogFunction = f
} else {
LogFunction = function(e) {
return
}
}
try {
if (typeof InitializeReporter == "function" && (VGBrand.reportBack != undefined && VGBrand.reportBack == true)) {
InitializeReporter(a, b, h, null, LogFunction)
} else {
_reporter = null
}
} catch (m) {
LogFunction(m)
}
var c = new PCShowStatuses();
pcshowPlugin.statuses = c;
if (flashUIObjectPtr != null) {
pcshowPlugin.InstalledFlashVersion = function() {
return amPlugin.InstalledFlashVersion
};
pcshowPlugin.SendEventToFlash = function(e, o) {
return SendEventToFlash(e, o)
};
pcshowPlugin.CallFlashMethod = function(e) {
return amPlugin.CallFlashMethod(e)
};
if (BrowserDetect.OS == "Windows") {
pcshowPlugin.SetSkin = function(e) {
pcshowPlayer.Skin = e
};
pcshowPlugin.GetSkin = function() {
return pcshowPlayer.Skin
};
pcshowPlugin.SetFlashVars = function(e) {
pcshowPlayer.FlashVars = e
};
pcshowPlugin.GetFlashVars = function() {
return pcshowPlayer.FlashVars
}
}
}
if (_reporter != null) {
pcshowPlugin.GetSessionStartParams = GetSessionStartParams;
pcshowPlugin.ReportPCShowJSEvent = function(e, o) {
return _reporter.ReportPCShowJSEvent(e, o)
};
pcshowPlugin.ReportPCShowEvent = function(e, o) {
return _reporter.ReportPCShowEvent(e, o)
};
pcshowPlugin.SwitchReportSendingTo = function(e) {
return _reporter.SwitchReportSendingTo(e)
};
_reporter.AttachReportTraps(pcshowPlugin)
}
TryInitPCShowObject(l, 100, 0)
}
function TryInitPCShowObject(b, a, f) {
var d = document.getElementById(b);
if (IsValidNdsObject(d)) {
amPlugin = d;
AttachEvents();
try {
pcshowPlugin.Init()
} catch (c) {
amPlugin = null;
LogFunction("pcshowPlugin.Init EXCEPTION! ndsObjectId=" + b + " tries" + f + " e=" + c);
pcshowPlugin.ReportPCShowJSEvent("PluginCreationFailed", []);
pcshowPluginCreationFailedHandlerPtr("pcshowPlugin.Init threw " + c)
}
InitializePlayer()
} else {
try {
if (f < 20) {
f = f + 1;
setTimeout("TryInitPCShowObject('" + b + "'," + a + "," + f + ")", a)
} else {
amPlugin = null;
pcshowPlugin.ReportPCShowJSEvent("PluginCreationFailed", []);
pcshowPluginCreationFailedHandlerPtr("Timeout")
}
} catch (c) {
LogFunction("**** TryInitPCShowObject IsValidNdsObject=FALSE. EXCEPTION ndsObjectId=" + b + " tries=" + f + " e=" + c);
pcshowPluginCreationFailedHandlerPtr("Error exception= " + c)
}
}
}
function IsValidNdsObject(a) {
if (a == undefined || a == null) {
return false
}
if (a.Init == undefined || a.Init == null) {
return false
}
return true
}
function DestructPcShow() {
flashUIObjectPtr = null;
DetachEvents();
if (pcshowPlugin != undefined && pcshowPlugin != null) {
try {
pcshowPlugin.OnBeforeUnload();
pcshowPlugin.Stop();
pcshowPlugin.Shutdown();
pcshowPlugin.DestructPlayer()
} catch (a) {}
}
pcshowPlugin = null
}
function GetSessionStartParams() {
params = [];
params.push(this.AppVersion());
params.push((this.IsDeviceActivated() ? this.DeviceID() : ""));
params.push((this.IsDeviceActivated() ? this.HomeDomainID() : ""));
params.push(this.IsSoftwareUpgradeRequired());
params.push(this.IsNetworkConnectionRequired());
if (typeof(JSON) == "object") {
params.push(JSON.parse(this.SystemSpec()))
}
return params
}
function GetDRMParams() {
params = [];
params.push((this.IsDeviceActivated() ? this.DeviceID() : ""));
params.push((this.IsDeviceActivated() ? this.HomeDomainID() : ""));
return params
}
function SoftwareUpgradeRequired(a) {
EventHandlerFunction("SoftwareUpgradeRequired", a)
}
function ActivationRequired() {
EventHandlerFunction("ActivationRequired")
}
function ActivationResult(a, b) {
EventHandlerFunction("ActivationResult", a, b);
if (a == 0) {
pcshowPlugin.ReportPCShowJSEvent("DRMStart", pcshowPlugin.GetDRMParams())
}
}
function DownloadStateChanged(a, b) {
EventHandlerFunction("DownloadStateChanged", a, b)
}
function AssetProgress(b, e, c, d, a) {
EventHandlerFunction("AssetProgress", b, e, c, d, a)
}
function PlaybackPositionChanged(b, a) {
EventHandlerFunction("PlaybackPositionChanged", b, a)
}
function InitializationFinished(a) {
var b = false;
if (a == 0) {
b = pcshowPlugin.IsOnline();
LogFunction("PCShow::InitializationFinished: isOnline=" + b);
if (IsOfflineUI()) {
if (b) {
try {
LogFunction("PCShow::InitializationFinished: force SwitchToOffline...");
pcshowPlugin.SwitchToOffline();
LogFunction("PCShow::InitializationFinished: SwitchToOffline success");
b = false
} catch (c) {
LogFunction("PCShow::InitializationFinished: SwitchToOffline failed: " + c)
}
}
}
}
EventHandlerFunction("InitializationFinished", a);
if (a == 0) {
if (b == true) {
pcshowPlugin.SwitchReportSendingTo(true);
pcshowPlugin.ReportPCShowJSEvent("SessionStart", pcshowPlugin.GetSessionStartParams())
} else {
pcshowPlugin.SwitchReportSendingTo(false)
}
}
}
function NetworkAvailabilityChanged(a) {
EventHandlerFunction("NetworkAvailabilityChanged", a)
}
function OfflineCacheAvailabilityChanged(a) {
EventHandlerFunction("OfflineCacheAvailabilityChanged", a)
}
function OfflineCacheProgressChanged(a) {
EventHandlerFunction("OfflineCacheProgressChanged", a)
}
function ManualOnlineChanged(a) {
if (a == true) {
pcshowPlugin.SwitchReportSendingTo(true)
}
EventHandlerFunction("ManualOnlineChanged", a);
if (a == false) {
pcshowPlugin.SwitchReportSendingTo(false)
}
}
function addVGEvent(c, a, b) {
if (!IsIE()) {
c.addEventListener(a, b, false)
} else {
c.attachEvent("on" + a, b)
}
}
function removeVGEvent(c, a, b) {
if (!IsIE()) {
c.removeEventListener(a, b, false)
} else {
c.detachEvent("on" + a, b)
}
}
function AttachEvents() {
try {
addVGEvent(amPlugin, "SoftwareUpgradeRequired", SoftwareUpgradeRequired);
addVGEvent(amPlugin, "ActivationRequired", ActivationRequired);
addVGEvent(amPlugin, "ActivationResult", ActivationResult);
addVGEvent(amPlugin, "Status", Status);
addVGEvent(amPlugin, "DownloadStateChanged", DownloadStateChanged);
addVGEvent(amPlugin, "AssetProgress", AssetProgress);
addVGEvent(amPlugin, "InitializationFinished", InitializationFinished);
addVGEvent(amPlugin, "NetworkAvailabilityChanged", NetworkAvailabilityChanged);
addVGEvent(amPlugin, "OfflineCacheAvailabilityChanged", OfflineCacheAvailabilityChanged);
addVGEvent(amPlugin, "OfflineCacheProgressChanged", OfflineCacheProgressChanged);
addVGEvent(amPlugin, "ManualOnlineChanged", ManualOnlineChanged);
addVGEvent(amPlugin, "StreamUrlChanged", StreamUrlChanged);
addVGEvent(amPlugin, "PlaybackPositionChanged", PlaybackPositionChanged);
addVGEvent(amPlugin, "StateChanged", StateChanged)
} catch (a) {
throw ("AttachEvents error: " + a)
}
}
function DetachEvents() {
if (amPlugin == null || amPlugin == undefined) {
return
}
try {
removeVGEvent(amPlugin, "SoftwareUpgradeRequired", SoftwareUpgradeRequired);
removeVGEvent(amPlugin, "ActivationRequired", ActivationRequired);
removeVGEvent(amPlugin, "ActivationResult", ActivationResult);
removeVGEvent(amPlugin, "Status", Status);
removeVGEvent(amPlugin, "DownloadStateChanged", DownloadStateChanged);
removeVGEvent(amPlugin, "AssetProgress", AssetProgress);
removeVGEvent(amPlugin, "InitializationFinished", InitializationFinished);
removeVGEvent(amPlugin, "NetworkAvailabilityChanged", NetworkAvailabilityChanged);
removeVGEvent(amPlugin, "OfflineCacheAvailabilityChanged", OfflineCacheAvailabilityChanged);
removeVGEvent(amPlugin, "OfflineCacheProgressChanged", OfflineCacheProgressChanged);
removeVGEvent(amPlugin, "ManualOnlineChanged", ManualOnlineChanged);
removeVGEvent(amPlugin, "StreamUrlChanged", StreamUrlChanged);
removeVGEvent(amPlugin, "PlaybackPositionChanged", PlaybackPositionChanged);
removeVGEvent(amPlugin, "StateChanged", StateChanged)
} catch (a) {
throw ("detachEvents error: " + a)
}
}
function QOSInterface() {
if (pcshowQOSObject == null) {
try {
var a = this.GetQOS();
if (a != null) {
pcshowQOSObject = new PCShowQOSInterface(a)
}
} catch (b) {
LogFunction(b)
}
}
return pcshowQOSObject
}
function PCShowQOSInterface(a) {
this._qos = a;
this.SubChannels = function() {
try {
return new PCShowSubChannels(this._qos.SubChannels)
} catch (b) {
LogFunction(b)
}
};
this.CurrentSubChannelIndex = function() {
try {
return this._qos.CurrentSubChannelIndex
} catch (b) {
LogFunction(b)
}
};
this.AvailableBandwidth = function() {
try {
return this._qos.AvailableBandwidth
} catch (b) {
LogFunction(b)
}
}
}
function PCShowSubChannels(a) {
this._subchannels = a;
this.HasNext = function() {
try {
return this._subchannels.HasNext
} catch (b) {
LogFunction(b)
}
};
this.Next = function() {
try {
return this._subchannels.Next()
} catch (b) {
LogFunction(b)
}
};
this.Item = function(b) {
try {
return this._subchannels.Item(b)
} catch (c) {
LogFunction(c)
}
};
this.ToArray = function() {
var c = [];
try {
var d = 0;
while (this.HasNext) {
var b = this.Next();
var f = new SubChannelInfo(b.Bitrate, b.Width, b.Height, b.IsEnabled);
c[d] = f;
d += 1
}
} catch (g) {
LogFunction(g)
}
return c
}
}
function SubChannelInfo(c, a, b, d) {
this.Bitrate = c;
this.Width = a;
this.Height = b;
this.IsEnabled = d
}
function PCShowClosedCaptions() {
this.GetEnabled = function() {
return amPlugin.Caption.Enabled
};
this.SetEnabled = function(a) {
amPlugin.Caption.Enabled = a
};
this.GetLanguage = function() {
return amPlugin.Caption.Language
};
this.SetLanguage = function(a) {
amPlugin.Caption.Language = a
}
}
var VGBrand = {
name: "DTV",
authenticationSettings: function() {
return {
authenticationType: 2,
authenticationToken: '{ "version" : "1", "etoken" : "__USERID__", "siteid" : "YYYYY", "signature" : "ZZZZ", "siteuserid" : "XXXX" }',
licenseToken: '{ "version" : "1", "etoken" : "__USERID__", "siteid" : "YYYYY", "signature" : "ZZZZ", "siteuserid" : "XXXX", "contentId" : "__ASSET_ID__"}'
}
},
playerSettings: function() {
return {
creationMode: "onplay",
uiMode: "flash",
fullscreenMode: "flash",
subtitlesMode: "cc"
}
}
};
(function() {
var a = {
init: function() {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.fullVersion = this.searchVersion(navigator.userAgent, this.versionSearchString) || this.searchVersion(navigator.appVersion, this.versionSearchString) || "an unknown version";
this.version = parseFloat(this.fullVersion) || "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
this.OSVersion = this.searchVersion(navigator.userAgent, this.versionSearchString) || "an unknown OS version";
while (this.OSVersion.search("_") != -1) {
this.OSVersion = this.OSVersion.replace("_", ".")
}
this.OSBitness = this.getOsBitness(this.OS, this.OSVersion)
},
searchString: function(e) {
for (var b = 0; b < e.length; b++) {
var c = e[b].string;
var d = e[b].prop;
this.versionSearchString = e[b].versionSearch || e[b].identity;
if (c) {
if (c.indexOf(e[b].subString) != -1) {
return e[b].identity
}
} else {
if (d) {
return e[b].identity
}
}
}
},
searchVersion: function(d, b) {
var c = d.indexOf(b);
if (c == -1) {
return
}
var f = c + b.length + 1;
var e = d.indexOf(" ", f);
return (e == -1) ? d.substring(f) : d.substring(f, e)
},
compareVersions: function(b, e) {
var f = b.split(".");
var d = e.split(".");
for (var c = 0; c < Math.min(f.length, d.length); c++) {
if (parseInt(f[c]) < parseInt(d[c])) {
return (-1 * (c + 1))
}
if (parseInt(f[c]) > parseInt(d[c])) {
return c + 1
}
}
return 0
},
getOsBitness: function(b, c) {
result = "32";
if ((b == "Windows" && (navigator.userAgent.indexOf("WOW64") != -1 || navigator.userAgent.indexOf("Win64") != -1)) || (b == "Mac" && this.compareVersions(c, "10.5") >= 0)) {
result = "64"
}
return result
},
dataBrowser: [{
string: navigator.userAgent,
subString: "Chrome",
identity: "Chrome"
}, {
string: navigator.userAgent,
subString: "OmniWeb",
versionSearch: "OmniWeb/",
identity: "OmniWeb"
}, {
string: navigator.vendor,
subString: "Apple",
identity: "Safari",
versionSearch: "Version"
}, {
prop: window.opera,
identity: "Opera"
}, {
string: navigator.vendor,
subString: "iCab",
identity: "iCab"
}, {
string: navigator.vendor,
subString: "KDE",
identity: "Konqueror"
}, {
string: navigator.userAgent,
subString: "Firefox",
identity: "Firefox"
}, {
string: navigator.vendor,
subString: "Camino",
identity: "Camino"
}, {
string: navigator.userAgent,
subString: "Netscape",
identity: "Netscape"
}, {
string: navigator.userAgent,
subString: "MSIE",
identity: "Explorer",
versionSearch: "MSIE"
}, {
string: navigator.userAgent,
subString: "Gecko",
identity: "Mozilla",
versionSearch: "rv"
}, {
string: navigator.userAgent,
subString: "Mozilla",
identity: "Netscape",
versionSearch: "Mozilla"
}],
dataOS: [{
string: navigator.platform,
subString: "Win",
identity: "Windows",
versionSearch: "Windows NT"
}, {
string: navigator.platform,
subString: "Mac",
identity: "Mac",
versionSearch: "Mac OS X"
}, {
string: navigator.userAgent,
subString: "iPhone",
identity: "iPhone/iPod"
}, {
string: navigator.platform,
subString: "Linux",
identity: "Linux"
}]
};
a.init();
if (!window.BrowserDetect) {
window.BrowserDetect = a
}
})();
var _InternalPcShowErrors = {};
var _UserErrDictionary = {
A: "Technical error - please try again. If the problem persists please call customer services.",
B: "Communication error - please check your network connection and try again",
C: "Not entitled to view this content",
D: "Software upgrade required",
E: "Content format not supported",
F: "User not activated",
G: "Device problem - please reactivate",
H: "Wrong user name or password",
I: "Maximum number of devices exceeded - please remove other devices and reactivate",
J: "Item already exists",
K: "Item could not be deleted",
L: "Content not found on local disk",
M: "Wrong string format",
N: "Another PCShow instance is currently being run by another user. In order to run PCShow for this user first log the other user off.",
O: "Another instance of PCShow is already active in this process",
P: "Rental period expired for this content",
Q: "Could not write content to disk",
R: "External backend server error - please refer to the payload field for the server error code",
S: "DRM concurrency error",
T: "Playback session timeout",
U: "Please connect to the Internet to refresh DRM data",
W: "Conflict with other UPNP software running on the machine. Please close other upnp software and retry",
X: "Another device asked for concurrency ticket and all slots are taken",
Y: "Another device has asked for concurrency ticket and at least 1 slot was freed"
};
var _UserActionDictionary = {
a: "Show message",
b: "Stop playback and stop streaming if active",
f: "Delete asset",
g: "Go to installation page",
h: "Indicate buffering status",
i: "Indicates that object can be destroyed",
j: "Refresh page"
};
var _statusFields = ["context", "code", "type", "component", "num", "shortName", "userError", "userAction", "public", "desc"];
var _PcShowErrors = {
fe1001f4: ["AdaptationLayer", "1049076", "3", "16", "fe1001f4", "AL_FATAL_ERROR", "A", "a+b", "true", " VG Connect client can not function due to fatal internal error."],
fe1001f5: ["AdaptationLayer", "1049077", "3", "16", "fe1001f5", "AL_ASSET_NOT_DOWNLOADING", "", "", "true", " Requested asset is not downloading, hence: cannot be paused"],
fe1001f6: ["AdaptationLayer", "1049078", "3", "16", "fe1001f6", "AL_SOME_ASSETS_COULD_NOT_BE_DELETED", "", "", "true", " Some of the assets could not be deleted (this error might be raised from the function 'deleteAll')"],
fe1001f7: ["AdaptationLayer", "1049079", "3", "16", "fe1001f7", "AL_RESUME_FAILED", "", "", "true", " Requested asset cannot be resumed, possible reason: asset not paused"],
fe1001f8: ["AdaptationLayer", "1049080", "3", "16", "fe1001f8", "AL_ASSET_NOT_IN_DOWNLOAD_QUEUE", "", "", "true", " Requested asset is not in download queue."],
fe1001f9: ["AdaptationLayer", "1049081", "3", "16", "fe1001f9", "AL_ASSET_NOT_FOUND", "L", "a", "true", " Requested asset is not found in the local catalog"],
fe1001fa: ["AdaptationLayer", "1049082", "3", "16", "fe1001fa", "AL_INVALID_STRING_FORMAT", "M", "a", "true", " String param passed is not in correct format"],
fe1001fb: ["AdaptationLayer", "1049083", "3", "16", "fe1001fb", "AL_ANOTHER_OS_USER_USING_PCSHOW", "N", "a", "true", " VG Connect client does not allow 2 Operating System users to use it synchronously. This error code is raised if the VG Connect media server was invoked by a different OS user."],
fe1001fc: ["AdaptationLayer", "1049084", "3", "16", "fe1001fc", "AL_NOT_INITIALIZED", "", "", "true", " This event will be raised if the application didn't initialize VG Connect properly before using it."],
fe1001fd: ["AdaptationLayer", "1049085", "3", "16", "fe1001fd", "AL_SECOND_INSTANCE", "O", "a", "true", " VG Connect does not allow instantiation of more than 1 instance"],
"3e1001fe": ["AdaptationLayer", "1049086", "0", "16", "3e1001fe", "AL_INITIALIZATION_SUCCEEDED", "", "", "true", " VG Connect client initialization was invoked and has succeeded"],
"7e1001fe": ["AdaptationLayer", "1049086", "1", "16", "7e1001fe", "AL_INITIALIZATION_ALREADY_SUCCEEDED", "", "", "true", " VG Connect client initialization has already succeeded before (not invoked again)"],
fe1001ff: ["AdaptationLayer", "1049087", "3", "16", "fe1001ff", "AL_NEEDS_RESTART", "", "j", "true", " VG Connect client lost connection with the background media server and needs to be restarted"],
fe100200: ["AdaptationLayer", "1049088", "3", "16", "fe100200", "AL_ALLOCATED_BUFFER_TOO_SMALL", "", "", "true", " Buffer passed by the user is too small (for example - buffer allocated to include the URL to give to the player)"],
fe100201: ["AdaptationLayer", "1049089", "3", "16", "fe100201", "AL_RESOURCE_ALLOCATION_FAILED", "", "", "true", " Resource allocation failed"],
fe100202: ["AdaptationLayer", "1049090", "3", "16", "fe100202", "AL_UPNP_CONFLICT", "W", "a", "true", " Conflict with other UPNP software running on the machine."],
fe100203: ["AdaptationLayer", "1049091", "3", "16", "fe100203", "AL_PRIORITY_OUT_OF_RANGE", "", "", "true", " Changing asset priority failed"],
fe100204: ["AdaptationLayer", "1049092", "3", "16", "fe100204", "AL_INVALID_HANDLE", "", "", "true", " Object handle passed as argument is invalid"],
fe100205: ["AdaptationLayer", "1049093", "3", "16", "fe100205", "AL_OPERATION_TIMEOUT", "A", "a+b", "true", " Operation timeout with background media server"],
fd200065: ["Builder", "101", "3", "9", "fd200065", "COULD_NOT_CREATE_RENDERER", "A", "a+b", "true", "Could not create renderer(s)."],
fd20025a: ["Builder", "602", "3", "9", "fd20025a", "COULD_NOT_OPEN_URI", "A", "a+b", "true", "Could not open URI."],
fde00002: ["DRMCredentials", "02", "3", "15", "fde00002", "DRM_CRED_WRONG_USERNAME_OR_PASSWORD", "H", "a+b", "true", "Could not authenticate with the DRM server. Supplied credentials were rejected."],
fde00003: ["DRMCredentials", "03", "3", "15", "fde00003", "DRM_CRED_DEVICE_PROBLEM", "G", "a+b+g", "true", "DRM server reported a device problem - typically this will occur if the device was deleted from the domain"],
fde00004: ["DRMCredentials", "04", "3", "15", "fde00004", "DRM_CRED_NUM_OF_DEVICES_EXCEEDED", "I", "a+b+g", "true", "DRM server refused activation because the maximum number of devices for the current domain was exceeded"],
fde00005: ["DRMCredentials", "05", "3", "15", "fde00005", "DRM_CRED_INTERNAL_ERROR", "A", "a+b", "true", "Indicates an internal DRM error"],
fde00006: ["DRMCredentials", "06", "3", "15", "fde00006", "DRM_CRED_COMMUNICATION_ERROR", "A", "a+b", "true", " Problem in communication with the DRM server"],
fde00007: ["DRMCredentials", "07", "3", "15", "fde00007", "DRM_CRED_EXTERNAL_SERVER_ERROR", "R", "a+b", "true", "Indicates an error returned from the external backend server"],
fde00008: ["DRMCredentials", "08", "3", "15", "fde00008", "DRM_CRED_ACTIVATION_STATUS_REQUIRED", "F", "a+b", "true", "Signifies that activation is required"],
"3de00008": ["DRMCredentials", "08", "0", "15", "3de00008", "DRM_CRED_ACTIVATION_STATUS_ACTIVATED", "", "", "true", "Signifies that user is activated"],
fde0000e: ["DRMCredentials", "14", "3", "15", "fde0000e", "DRM_CRED_DRM_SERVER_ERROR", "A", "a", "true", "There is an internal DRM server error. no action needed from application"],
fde00016: ["DRMCredentials", "22", "3", "15", "fde00016", "DRM_CRED_DEVICE_SUSPENDED", "A", "a+b", "true", "DRM server reported that the device is suspended. Need to unsuspend it in the HE and then retry."],
bde00017: ["DRMCredentials", "23", "2", "15", "bde00017", "DRM_CRED_NETWORK_CONNECTION_REQUIRED", "U", "a", "true", " Network connection required warning"],
"3de00017": ["DRMCredentials", "23", "0", "15", "3de00017", "DRM_CRED_NETWORK_CONNECTION_CONNECTED", "", "", "true", " Network connected"],
fde0001a: ["DRMCredentials", "26", "3", "15", "fde0001a", "DRM_CRED_SGW_SERVICE_NOT_AVAILABLE", "", "", "true", "SGW Service is not available"],
fde0001b: ["DRMCredentials", "27", "3", "15", "fde0001b", "DRM_CRED_SGW_CONNECTION_TIMED_OUT", "", "", "true", "SGW connection timed out"],
fde0001c: ["DRMCredentials", "28", "3", "15", "fde0001c", "DRM_CRED_SGW_HTTP_ERROR", "", "", "true", "SGW HTTP Error"],
fde0001d: ["DRMCredentials", "29", "3", "15", "fde0001d", "DRM_CRED_SGW_FAILURE", "", "", "true", "SGW Failure"],
fdef0001: ["DRMCredentials", "983041", "3", "15", "fdef0001", "DRM_CRED_NW_CONNECTION_STATUS_REQUIRED", "B", "a", "true", "There is no network connection"],
"3def0001": ["DRMCredentials", "983041", "0", "15", "3def0001", "DRM_CRED_NW_CONNECTION_STATUS_OK", "", "", "true", "There is network connection"],
fdef000c: ["DRMCredentials", "983052", "3", "15", "fdef000c", "DRM_CRED_USER_ALREADY_ACTIVATED", "", "", "true", " ActivateDevice was called on VG Connect client that has already been activated"],
fef70000: ["PLAYER", "1507328", "3", "23", "fef70000", "GST_COULD_NOT_CREATE_RENDERER", "A", "a+b", "true", "Could not create renderer(s)."],
fef70001: ["PLAYER", "1507329", "3", "23", "fef70001", "GST_COULD_NOT_OPEN_URI", "A", "a+b", "true", "Could not open URI"],
"7ef70002": ["PLAYER", "1507330", "1", "23", "7ef70002", "SWITCHED_TO_FULL_SCREEN_MODE", "", "", "true", "Player had just switched to full screen mode"],
"7ef70003": ["PLAYER", "1507331", "1", "23", "7ef70003", "SWITCHED_TO_PARTIAL_SCREEN_MODE", "", "", "true", "Player had just switched to partial screen mode"],
fef70004: ["PLAYER", "1507332", "3", "23", "fef70004", "COULDNT_CONNECT_TO_MEDIA_SERVER", "A", "a+b", "true", "Could not communicate with background media server"],
fef7000b: ["PLAYER", "16187403", "3", "23", "fef7000b", "COPY_PROTECTION_ERROR", "A", "a", "true", "Copy Protection Error"],
fef7000c: ["PLAYER", "16187404", "3", "23", "fef7000c", "COPY_PROTECTION_HDCP_ERROR", "A", "a", "true", "Copy Protection HDCP Error, HDCP cannot be enforced because this protection type is not supported on the connection."],
fef7000d: ["PLAYER", "16187405", "3", "23", "fef7000d", "COPY_PROTECTION_CGMSA_ERROR", "A", "a", "true", "Copy Protection CGMSA Error, CGMSA cannot be enforced because this protection type is not supported on the connection."],
fef7000e: ["PLAYER", "16187406", "3", "23", "fef7000e", "COPY_PROTECTION_NOT_SUPPORTED", "A", "a", "true", "Copy Protection not supported, driver doesn't support copy protection"],
fef7000f: ["PLAYER", "16187407", "3", "23", "fef7000f", "INTEGRITY_DLLS_PROBLEMS", "A", "a", "true", "Dlls integrity problems, one or more of the dlls provided by the operating system are not signed correctly or being changed outside."],
bef70010: ["PLAYER", "16187408", "2", "23", "bef70010", "FULL_SCREEN_LOST_FOCUS", "", "", "true", " Full screen lost focus"],
"7ef70010": ["PLAYER", "16187408", "1", "23", "7ef70010", "FULL_SCREEN_GAINED_FOCUS", "", "", "true", " Full screen gained focus"],
fef70011: ["PLAYER", "16187409", "3", "23", "fef70011", "SECURITY_ALERT", "A", "a", "true", "Security Alert"],
fc20006d: ["TSP", "109", "3", "1", "fc20006d", "TSP_USER_NOT_ENTITLED", "C", "a+b", "true", "User not entitled."],
fc20006e: ["TSP", "110", "3", "1", "fc20006e", "TSP_ENTITLEMENT_EXPIRED", "P", "a+b", "true", "Entitlement expired."],
fc200072: ["TSP", "114", "3", "1", "fc200072", "TSP_VGDRM_AGENT_INTERNAL_ERROR", "A", "a+b", "true", "Internal DRM error."],
fc200075: ["TSP", "117", "3", "1", "fc200075", "TSP_WRONG_CLIENT_VERSION", "D", "a+b", "true", "Wrong version of the client application is used."],
fc200076: ["TSP", "118", "3", "1", "fc200076", "TSP_LICENSE_TIMED_OUT", "T", "a+b", "true", "Secure session has expired (currently after 4 hours) and can no longer be used."],
fc210064: ["TSP", "2162788", "3", "1", "fc210064", "TSP_UNKNOWN_ERR", "A", "a+b", "true", "Internal error."],
fc210066: ["TSP", "2162790", "3", "1", "fc210066", "TSP_CONFIG_ERR", "A", "a+b", "true", "Missing mandatory configuration parameter."],
fc210068: ["TSP", "2162792", "3", "1", "fc210068", "TSP_FORMAT_NOT_SUPPORTED", "E", "a+b", "true", "Audio or video format not supported."],
fee00004: ["VIEWING", "4", "3", "23", "fee00004", "VIEWING_USER_NOT_ENTITLED", "C", "a+b", "true", "User Not Entitled"],
fee00005: ["VIEWING", "5", "3", "23", "fee00005", "VIEWING_ENTITLEMENT_EXPIRED", "P", "a+b", "true", "Entitlement Expired"],
fee00006: ["VIEWING", "6", "3", "23", "fee00006", "VIEWING_DRM_SERVER_CONNECTION_PROBLEM", "A", "a+b", "true", "Drm Server Connection Problem"],
fee00007: ["VIEWING", "7", "3", "23", "fee00007", "VIEWING_WRONG_CLIENT_VERSION", "D", "a+b", "true", "Wrong Client Version"],
fee00008: ["VIEWING", "8", "3", "23", "fee00008", "VIEWING_USER_NOT_ACTIVATED", "F", "a+b", "true", "User Not Activated"],
fee00009: ["VIEWING", "9", "3", "23", "fee00009", "VIEWING_INTERNAL_ERROR", "A", "a+b", "true", "Viewing internal error"],
fee0000a: ["VIEWING", "10", "3", "23", "fee0000a", "VIEWING_DRM_LICENSE_TIMED_OUT", "T", "a+b", "true", " License timed out"],
fd800001: ["XferManager", "1", "3", "12", "fd800001", "XFERM_INTERNAL_ERROR", "B", "", "true", "Programming or other internal error."],
fd800068: ["XferManager", "104", "3", "12", "fd800068", "XFERM_DOWNLOAD_ERR", "B", "a+b", "true", "General error while accessing content"],
fd800069: ["XferManager", "105", "3", "12", "fd800069", "XFERM_SESSION_ERR", "A", "a+b", "true", "Error occured while initilizing one of the internal components"],
fd80006a: ["XferManager", "106", "3", "12", "fd80006a", "XFERM_OBJECT_NOT_FOUND", "A", "a+b", "true", "Object Not Found"],
fd80006b: ["XferManager", "107", "3", "12", "fd80006b", "XFERM_DOWNLOAD_HTTP_ERR", "B", "a+b", "true", "Content HTTP request failed"],
fd800074: ["XferManager", "116", "3", "12", "fd800074", "XFERM_LOCALIZER_GENERAL_ERROR", "A", "a+b", "true", "Localizer General Error"],
fd800075: ["XferManager", "117", "3", "12", "fd800075", "XFERM_EMPTY_DRM_LICENSE", "A", "a+b", "true", "Empty DRM license"],
fd800077: ["XferManager", "119", "3", "12", "fd800077", "XFERM_EMPTY_ASSET_ID", "A", "a+b", "true", "Empty Asset ID"],
fd800078: ["XferManager", "120", "3", "12", "fd800078", "XFERM_EMPTY_FECM", "A", "a+b", "true", "Malformed HFECM"],
fd800079: ["XferManager", "121", "3", "12", "fd800079", "XFERM_LOCALIZATION_FAILED", "A", "a+b", "true", "Localization failed"],
fd80007b: ["XferManager", "123", "3", "12", "fd80007b", "XFERM_USER_NOT_ENTITLED", "C", "a+b", "true", "User not entitled to view/download this content"],
fd80007c: ["XferManager", "124", "3", "12", "fd80007c", "XFERM_ENTITLEMENT_EXPIRED", "P", "a+b", "true", "Entitlement expired"],
fd80007d: ["XferManager", "125", "3", "12", "fd80007d", "XFERM_DRM_SERVER_CONNECTION_PROBLEM", "A", "a+b", "true", "No connection to the DRM Server"],
fd80007e: ["XferManager", "126", "3", "12", "fd80007e", "XFERM_WRONG_CLIENT_VERSION", "D", "a+b", "true", "VG Connect client upgrade required"],
fd80007f: ["XferManager", "127", "3", "12", "fd80007f", "XFERM_USER_NOT_ACTIVATED", "F", "a+b", "true", "User not Activated"],
fd800081: ["XferManager", "129", "3", "12", "fd800081", "XFERM_DRM_AGENT_INTERNAL_ERROR", "A", "a+b", "true", "VGDRM Agent Internal Error"],
fd800082: ["XferManager", "130", "3", "12", "fd800082", "XFERM_CONFIG_ERROR", "A", "a+b", "true", "Config error"],
fd800083: ["XferManager", "131", "3", "12", "fd800083", "XFERM_DOWNLOAD_CONNECTION_ERROR", "B", "a+b", "true", "Network connection error - network is not connected or DRM server is not available"],
fd800084: ["XferManager", "132", "3", "12", "fd800084", "XFERM_DOWNLOAD_URL_FORMAT_ERROR", "A", "a+b", "true", "Malformed URL"],
fd800086: ["XferManager", "134", "3", "12", "fd800086", "XFERM_DOWNLOAD_PROTOCOL_NOT_SUPPORTED_ERROR", "", "", "true", "Download protocol not supported"],
"7d800087": ["XferManager", "135", "1", "12", "7d800087", "XFERM_DOWNLOAD_RETRY", "", "", "true", "Retrying connect to server"],
"7d800088": ["XferManager", "136", "1", "12", "7d800088", "XFERM_DOWNLOAD_RECOVERED", "", "", "true", "Recovered after connection lost"],
fd80008a: ["XferManager", "138", "3", "12", "fd80008a", "XFERM_WRITE_PROTECTION", "", "", "true", "Can not write to local storage - media protected for writing"],
fd80008b: ["XferManager", "139", "3", "12", "fd80008b", "XFERM_DISK_FULL", "", "", "true", "Can not write to local storage - disk full"],
"7d80008c": ["XferManager", "140", "1", "12", "7d80008c", "XFERM_ABR_HAS_DATA", "", "", "true", "ABR buffers has data - ending of starvation."],
bd80008c: ["XferManager", "140", "2", "12", "bd80008c", "XFERM_ABR_STARVATION", "", "", "true", "ABR buffers are empty."],
fd80008f: ["XferManager", "143", "3", "12", "fd80008f", "XFERM_DOWNLOAD_PARSE_ASX_ERR", "A", "a", "true", "Download or parse ASX error"],
fd800092: ["XferManager", "146", "3", "12", "fd800092", "XFERM_EXTERNAL_SERVER_ERROR", "R", "a+b", "true", " External backend server error"],
fd800093: ["XferManager", "147", "3", "12", "fd800093", "XFERM_CONCURRENCY_ERROR", "S", "a+b", "true", " DRM concurrency refusal error"],
"3d800094": ["XferManager", "148", "0", "12", "3d800094", "XFERM_ABR_INFO_READY", "", "", "true", " ABR subchannel information is available"],
fd800095: ["XferManager", "149", "3", "12", "fd800095", "XFERM_DEVICE_JAIL_BROKEN_ROOTED", "S", "a+b", "true", " Device is jail broken/rooted"],
fd800096: ["XferManager", "150", "3", "12", "fd800096", "XFERM_LICENSE_TIMED_OUT", "T", "a+b", "true", " License timed out."],
fd800097: ["XferManager", "151", "3", "12", "fd800097", "XFERM_LOCALIZATION_NOT_ALLOWED", "A", "a+b", "true", " localization not allowed (possible reason - token expired)"],
bd800098: ["XferManager", "152", "2", "12", "bd800098", "XFERM_CONCURRENCY_ALERT_RAISED", "X", "a", "true", "Another device has asked for concurrency ticket and all slots are taken"],
"3d800098": ["XferManager", "152", "0", "12", "3d800098", "XFERM_CONCURRENCY_ALERT_CLEARED", "Y", "a", "true", "Another device has asked for concurrency ticket and at least 1 slot was freed"],
fd800099: ["XferManager", "153", "3", "12", "fd800099", "XFERM_ASSET_ALREADY_EXISTS", "J", "a", "true", "Asset requested for download already exists in local catalog"],
fd80009a: ["XferManager", "154", "3", "12", "fd80009a", "XFERM_DOWNLOAD_PROXY_AUTHENTICATION_ERROR", "H", "a", "true", "Invalid credentials provided in proxy authentication"],
fd80009b: ["XferManager", "155", "3", "12", "fd80009b", "XFERM_DOWNLOAD_SERVER_AUTHENTICATION_ERROR", "H", "a", "true", "Invalid credentials provided to Content Server"],
fd80009c: ["XferManager", "156", "3", "12", "fd80009c", "CDN_NO_URL_AVAILABLE", "A", "a+b", "true", "Failed to obtain the CDN base URL"],
fd80009d: ["XferManager", "157", "3", "12", "fd80009d", "XFERM_DOWNLOAD_TIMEOUT_ERROR", "B", "a+b", "true", "Timeout while accessing content"],
fd80009e: ["XferManager", "158", "3", "12", "fd80009e", "DRM_LICENSE_ACQUISITION_TIMED_OUT", "A", "a+b", "true", " License acquisition timed out."],
fd80009f: ["XferManager", "159", "3", "12", "fd80009f", "CDN_SERVICE_NOT_AVAILABLE", "A", "a+b", "true", " CDN Service is not available"],
fd8000a0: ["XferManager", "160", "3", "12", "fd8000a0", "CDN_CONNECTION_TIMED_OUT", "A", "a+b", "true", " CDN connection timed out"],
fd8000a1: ["XferManager", "161", "3", "12", "fd8000a1", "CDN_HTTP_ERROR", "A", "a+b", "true", " CDN HTTP Error."],
fd8000a2: ["XferManager", "162", "3", "12", "fd8000a2", "DRM_VIEWING_IS_NOT_ALLOWED", "A", "a+b", "true", "DRM VIEWING IS NOT ALLOWED"],
fd8000a3: ["XferManager", "163", "3", "12", "fd8000a3", "CDN_FAILURE", "A", "a+b", "true", " CDN Failure."],
fd8000a4: ["XferManager", "164", "3", "12", "fd8000a4", "DRMS_SERVICE_NOT_AVAILABLE", "A", "a+b", "true", " DRMS Service is not available"],
fd8000a5: ["XferManager", "165", "3", "12", "fd8000a5", "DRMS_CONNECTION_TIMED_OUT", "A", "a+b", "true", " DRMS connection timed out"],
fd8000a6: ["XferManager", "166", "3", "12", "fd8000a6", "DRMS_HTTP_ERROR", "A", "a+b", "true", " DRMS HTTP Error."],
fd8000a7: ["XferManager", "167", "3", "12", "fd8000a7", "DRMS_FAILURE", "A", "a+b", "true", " DRMS Failure."],
fd8000a8: ["XferManager", "168", "3", "12", "fd8000a8", "DRMS_EDGE_SERVICE_NOT_AVAILABLE", "A", "a+b", "true", " DRMS EDGE Service is not available"],
fd8000a9: ["XferManager", "169", "3", "12", "fd8000a9", "DRMS_EDGE_CONNECTION_TIMED_OUT", "A", "a+b", "true", " DRMS EDGE connection timed out"],
fd8000aa: ["XferManager", "170", "3", "12", "fd8000aa", "DRMS_EDGE_HTTP_ERROR", "A", "a+b", "true", " DRMS EDGE HTTP Error."],
fd8000ab: ["XferManager", "171", "3", "12", "fd8000ab", "DRMS_EDGE_FAILURE", "A", "a+b", "true", " DRMS EDGE Failure."],
fd8000ac: ["XferManager", "172", "3", "12", "fd8000ac", "DCCS_SERVICE_NOT_AVAILABLE", "A", "a+b", "true", " DCCS Service is not available"],
fd8000ad: ["XferManager", "173", "3", "12", "fd8000ad", "DCCS_CONNECTION_TIMED_OUT", "A", "a+b", "true", " DCCS connection timed out"],
fd8000ae: ["XferManager", "174", "3", "12", "fd8000ae", "DCCS_HTTP_ERROR", "A", "a+b", "true", " DCCS HTTP Error."],
fd8000af: ["XferManager", "175", "3", "12", "fd8000af", "DCCS_FAILURE", "A", "a+b", "true", " DCCS Failure."],
"7d8004b2": ["XferManager", "1202", "1", "12", "7d8004b2", "XFERM_RESOURCE_DOWNLOAD_FAILED", "", "", "true", "Downloading of catalog resource failed"],
"7d8004b5": ["XferManager", "1205", "1", "12", "7d8004b5", "XFERM_RESOURCE_DOWNLOAD_FATAL_ERROR", "", "", "true", "Downloading of catalog resource failed due to a fatal error"],
"7d8004b6": ["XferManager", "1206", "1", "12", "7d8004b6", "XFERM_RESOURCE_DOWNLOAD_TIMED_OUT", "", "", "true", "Downloading of catalog resource timed out"],
"7d8004b9": ["XferManager", "1209", "1", "12", "7d8004b9", "XFERM_RESOURCE_DOWNLOAD_CONNECTION_PROBLEM", "", "", "true", "Connection problem while downloading catalog resource"],
"7d8004ba": ["XferManager", "1210", "1", "12", "7d8004ba", "XFERM_RESOURCE_DOWNLOAD_URL_MALFORMAT", "", "", "true", "Downloading of catalog resource failed due to a malformatted URL"],
"7d8004bd": ["XferManager", "1213", "1", "12", "7d8004bd", "XFERM_RESOURCE_DOWNLOAD_FAILED_HTTP", "", "", "true", "Downloading of catalog resource failed due to an HTTP error"],
"7d80ffff": ["XferManager", "65535", "1", "12", "7d80ffff", "XFERM_RESOURCE_DOWNLOAD_GENERAL_ERROR", "", "", "true", "Downloading of catalog resource failed due to a general error"],
"3d8c0090": ["XferManager", "786576", "0", "12", "3d8c0090", "XFERM_PLAYBACK_READY", "", "", "true", "Playback session ready"],
aaaaaaaa: ["a", "a", "1", "1", "aaaaaaaa", "test", "", "5", "false", "test"]
};
var PCShowJsRevision = "[webapp=11187,repo=11187]";
var pcshowPlayer;
function InitializePlayer() {
if (amPlugin != undefined) {
if (typeof(InvokeExternalXml) == "function") {
amPlugin.InvokeExternalXMLFunction = InvokeExternalXml
}
pcshowPlayer = amPlugin.Player;
return true
}
return false
}
function DestructPlayer() {
if (amPlugin != undefined && amPlugin != null) {
amPlugin.InvokeExternalXMLFunction = null
}
amPlugin = null
}
function StopStream() {
if (this._playSession) {
this._playSession.Stop();
this._playSession = null;
this._playSessionAssetId = null
}
}
function StreamPlaySessionAsync(b, f, g, a, c) {
this.AssetCorrectViewingMode("StreamPlaySessionAsync", true);
try {
this._playSession = amPlugin.StreamPlaySessionAsync(b, f, g, a, c);
this._playSessionAssetId = f
} catch (d) {
this._playSession = null;
this._playSessionAssetId = null
}
}
function LiveStreamPlayURL(d, g, b, c) {
this.AssetCorrectViewingMode("LiveStreamPlayURL", false);
var a = "";
try {
this._playSession = amPlugin.LiveStreamPlaySession(d, g, b, c);
this._playSessionAssetId = d;
a = this._playSession.PlayURL()
} catch (f) {
this._playSession = null;
this._playSessionAssetId = null;
throw f
}
return a
}
function LiveEventPlayURL(d, g, b, c) {
this.AssetCorrectViewingMode("LiveEventPlayURL", false);
var a = "";
try {
this._playSession = amPlugin.LiveEventPlaySession(d, g, b, c);
this._playSessionAssetId = d;
a = this._playSession.PlayURL()
} catch (f) {
this._playSession = null;
this._playSessionAssetId = null;
throw f
}
return a
}
function VodStreamPlayURL(f, g, b, c) {
this.AssetCorrectViewingMode("VodStreamPlayURL", false);
var a = "";
try {
this._playSession = amPlugin.VodStreamPlaySession(f, g, b, c);
this._playSessionAssetId = f;
a = this._playSession.PlayURL()
} catch (d) {
this._playSession = null;
this._playSessionAssetId = null;
throw d
}
return a
}
function ABRVodStreamPlayURL(f, g, b, c) {
this.AssetCorrectViewingMode("ABRVodStreamPlayURL", false);
var a = "";
try {
this._playSession = amPlugin.ABRVodStreamPlaySession(f, g, b, c);
this._playSessionAssetId = f;
a = this._playSession.PlayURL()
} catch (d) {
this._playSession = null;
this._playSessionAssetId = null;
throw d
}
return a
}
function FilePlayURL(b) {
this.AssetCorrectViewingMode("FilePlayURL", false);
var a = "";
try {
this._playSession = amPlugin.FilePlaySession(b);
this._playSessionAssetId = b;
a = this._playSession.PlayURL()
} catch (c) {
this._playSession = null;
this._playSessionAssetId = null;
throw c
}
return a
}
function Resume() {
if (pcshowPlayer != undefined) {
pcshowPlayer.Controls.Resume()
}
}
function SetScalingMode(a) {
if (pcshowPlayer != undefined) {
pcshowPlayer.Settings.ScalingMode = a
}
}
function SetURL(a) {
if (a != "") {
if (pcshowPlayer != undefined) {
pcshowPlayer.URL = a
}
}
}
function Pause() {
if (pcshowPlayer != undefined) {
pcshowPlayer.Controls.Pause()
}
}
function Stop() {
if (pcshowPlayer != undefined) {
pcshowPlayer.Controls.Stop()
}
this.StopStream()
}
function SetPlaybackPosition(a) {
if (pcshowPlayer != undefined && pcshowPlayer.Controls) {
pcshowPlayer.Controls.CurrentPosition = a
}
}
function GetPlaybackPosition() {
var a = 0;
if (pcshowPlayer != undefined) {
a = pcshowPlayer.Controls.CurrentPosition
}
return a
}
function GetPlayState() {
if (pcshowPlayer != undefined) {
return pcshowPlayer.State
}
return 0
}
function GetFullScreen() {
if (pcshowPlayer != undefined) {
return pcshowPlayer.Settings.FullScreen
}
return false
}
function GetScalingMode() {
if (pcshowPlayer != undefined) {
return pcshowPlayer.Settings.ScalingMode
}
return false
}
function SetFullScreen(a) {
if (pcshowPlayer != undefined) {
pcshowPlayer.Settings.FullScreen = a
}
}
function GetVolume() {
if (pcshowPlayer != undefined) {
return pcshowPlayer.Settings.Volume
}
return false
}
function SetVolume(b) {
if (pcshowPlayer != undefined) {
var a;
if (typeof(b) == "number") {
a = b
} else {
a = parseFloat(b)
}
pcshowPlayer.Settings.Volume = a
}
}
function GetMute() {
if (pcshowPlayer != undefined) {
return pcshowPlayer.Settings.Mute
}
return false
}
function SetMute(a) {
if (pcshowPlayer != undefined) {
pcshowPlayer.Settings.Mute = a
}
}
function GetPlayerUIEnabled() {
if (pcshowPlayer != undefined) {
return pcshowPlayer.Settings.EnableUI
}
return false
}
function SetPlayerUIEnabled(a) {
if (pcshowPlayer != undefined) {
pcshowPlayer.Settings.EnableUI = a
}
}
function GetPreferredAudioLanguage() {
if (pcshowPlayer != undefined) {
return pcshowPlayer.Settings.PreferredAudioLanguage
}
}
function SetPreferredAudioLanguage(a) {
if (pcshowPlayer != undefined) {
pcshowPlayer.Settings.PreferredAudioLanguage = a
}
}
function GetMediaDuration() {
var a = 0;
if (pcshowPlayer != undefined) {
if (pcshowPlayer.Media != undefined) {
a = pcshowPlayer.Media.Duration
}
}
return a
}
function GetAutoStart() {
if (pcshowPlayer != undefined) {
return pcshowPlayer.AutoStart
}
return true
}
function SetAutoStart(a) {
if (pcshowPlayer != undefined) {
pcshowPlayer.AutoStart = a
}
}
function Status(b, a, c) {
EventHandlerFunction("Status", pcshowPlugin._playSessionAssetId, a, c)
}
function StreamUrlChanged(a, b) {
EventHandlerFunction("StreamUrlChanged", pcshowPlugin._playSessionAssetId, b)
}
function StateChanged(a) {
var b = GetPlayStateName(a);
if (b != "Paused" && b != "Playing" && b != "Buffering") {
pcshowPlugin.ResetPlaySession()
}
EventHandlerFunction("StateChanged", a, b)
}
function GetPlayStateName(b) {
var a = "Undefined";
switch (b) {
case 0:
a = "None";
break;
case 1:
a = "Stopped";
break;
case 2:
a = "Paused";
break;
case 3:
a = "Playing";
break;
case 4:
a = "Buffering";
break;
case 5:
a = "MediaEnded";
break;
default:
a = "Undefined";
break
}
return a
}
function IsPlayingNow() {
var b = 0;
try {
b = GetPlayState()
} catch (a) {
LogFunction("GetPlayState e=" + a)
}
return (b == 2 || b == 3 || b == 4)
}
var STATUS_TYPES = ["SUCCESS", "INFORMATION", "WARNING", "ERROR", "HTTP_STATUS"];
var COMPONENT_IDS = ["NOT_DEFINED", "TSP", "SOURCE_FILTER", "LOCALIZER_FILTER", "SUBTITLE_FILTER", "ASSET_MGR", "SECURE_ACCESS", "DATA_STORE", "UTILS", "BUILDER", "QOS", "TVV_MGR", "XFER_MGR", "DRM_LOCALIZER", "CATALOG", "DRM_CREDENTIALS", "ADAPTER", "MS_GATEWAY", "HTTP_SERVANT", "CONTENT_PIPE", "XFER_FLOW", "DOWNLOAD_MGR", "UPNP_CLIENT", "PLAYER", "TRANSPORT", "ABR"];
function PCShowStatuses() {
this._statusesHash = joinArrays(_PcShowErrors, _InternalPcShowErrors);
if (this._statusesHash.aaaaaaaa[fieldIndex("num")] != "aaaaaaaa") {
throw "InitializePcShow: PCShow statuses table was not loaded!"
}
this.getStatus = function(b) {
if (!this._statusesHash) {
return null
}
if (typeof(this._statusesHash[b]) == "undefined") {
return null
}
var a = new PCShowStatus(this._statusesHash[b], _UserErrDictionary);
return a
};
this.getDescription = function(a) {
if (!this._statusesHash) {
return null
}
if (typeof(this._statusesHash[a]) == "undefined") {
return ("Status Desc not found!")
}
return getValue("desc", this._statusesHash[a])
};
this.getType = function(a) {
if (!this._statusesHash) {
return null
}
if (typeof(this._statusesHash[a]) == "undefined") {
return ("Status Desc not found!")
}
return getValue("type", this._statusesHash[a])
};
this.parseStatus = function(b) {
if (!this._statusesHash) {
return ("Unknown Status - statuses not initialized")
}
if (typeof(this._statusesHash[b]) == "undefined") {
return ("Unknown Status " + b)
}
var a = new PCShowStatus(this._statusesHash[b], _UserErrDictionary);
return a.parse()
}
}
function PCShowStatus(c, a) {
this.behaviour = getValue("userAction", c);
this.name = getValue("desc", c);
this.statusType = getValue("type", c);
this.comp = getValue("component", c);
this.code = getValue("code", c);
this.message = "";
var b = getValue("userError", c);
if (b != "") {
this.message = a[b];
this.message = this.message == undefined ? "" : this.message
}
this.parse = function(f) {
var d = "<";
d += getIndex(STATUS_TYPES, this.statusType);
d += ",NDS";
d += "," + getIndex(COMPONENT_IDS, this.comp);
d += "," + this.code + ">";
var e = "<" + this.statusType + "," + 15 + "," + this.comp + "," + this.code + ">: ";
return e + d
}
}
function getValue(a, c) {
var b = c[fieldIndex(a)];
if (b == undefined) {
b = ""
}
return b
}
function getIndex(b, a) {
if (a >= 0 && a < b.length) {
return b[a]
}
return "UNKNOWN(" + a + ")"
}
function fieldIndex(b) {
for (var a = 0; a < _statusFields.length; a++) {
if (_statusFields[a] == b) {
return a
}
}
return -1
}
function ConvertToHex(b) {
var a = new Number(b);
return a.toString(16)
}
function joinArrays() {
var b = {};
var a = arguments.length;
for (var c = 0; c < a; c++) {
for (p in arguments[c]) {
if (arguments[c].hasOwnProperty(p)) {
b[p] = arguments[c][p]
}
}
}
return b
}
var displayPCShowEmbeddedFlashLog = false;
function FlashUseLocalConnection() {
return (IsIE() == true)
}
function VgTunnelToHtmlSwf(a) {
if (flashUIObjectPtr == null || flashUIObjectPtr == undefined) {
return
}
var b = [];
if (arguments.length > 1) {
for (var c = 1; c < arguments.length; c++) {
b[c - 1] = arguments[c]
}
}
try {
flashUIObjectPtr[a](b)
} catch (d) {
LogFunction("VgTunnelToHtmlSwf: " + d)
}
}
function VgTunnelToFullscreenSwf(b) {
if (pcshowPlugin == null) {
return
}
var c = arguments[1];
try {
var a = GetActionScriptArray(c);
DoCallFlashMethod(b, [a], "void", false)
} catch (d) {
LogFunction("VgTunnelToFullscreenSwf: " + d)
}
}
function SendEventToFlash(a) {
if (flashUIObjectPtr == null || flashUIObjectPtr == undefined || flashUIObjectPtr.onPCShowEvent == null) {
return
}
var c = arguments[1];
var b = ["", "", "", "", "", ""];
for (var d = 0; d < c.length; d++) {
b[d] = c[d]
}
try {
flashUIObjectPtr.onPCShowEvent(b)
} catch (f) {
LogFunction("SendEventToFlash: " + f)
}
}
function GetActionScriptArray(b) {
var d;
var a = "";
for (var c = 0; c < b.length; c++) {
d = '<property id="' + c + '">' + XmlWrapArg(b[c]) + "</property>";
a += d
}
return a
}
function XmlWrapArg(a) {
if (typeof(a) == "boolean") {
return a ? "<true/>" : "<false/>"
}
var b = "<" + typeof(a) + ">" + a + "</" + typeof(a) + ">";
if (typeof(a) == "string" && a.indexOf("<property id") == 0) {
b = "<array>" + a + "</array>"
}
return b
}
function DoCallFlashMethodAndLog(c, b, a) {
DoCallFlashMethod(c, b, a, true)
}
function DoCallFlashMethod(b, n, m, f) {
var d = "";
var c;
var o = ' returntype="xml"';
c = '<invoke name="' + b + '"' + o + "><arguments>";
for (var g = 0; g < n.length; g++) {
c += XmlWrapArg(n[g])
}
c += "</arguments></invoke>";
if (pcshowPlugin == null) {
return d
}
if (FlashUseLocalConnection()) {
return d
}
var h = "";
try {
h = pcshowPlugin.CallFlashMethod(c);
if (h == null || h == undefined) {
h = ""
}
if (BrowserDetect.OS == "Windows" && h.indexOf("<") != 0) {
throw ("non-xml response: " + h)
}
} catch (l) {
LogFunction("pcshowPlugin.CallFlashMethod(" + c + ") threw " + l);
return d
}
var q = GetXMLDOMFromXMLText(h);
if (m != "void") {
var a = "";
if (q.firstChild.nodeName.toLowerCase() == "string") {
a = "'"
}
d = a + q.firstChild.childNodes[0].nodeValue + a
}
if (f) {
LogFunction("CallFlashMethod(" + c + ")=[" + h + "] returning:[" + d + "]")
}
return d
}
function CallMethodFromEmbeddedFlash() {
var a = GetActionScriptArray(arguments);
var b = DoCallFlashMethod("VGConnectTestAPI", [a], "string", false);
return b
}
function GetXMLDOMFromXMLText(a) {
if (window.DOMParser) {
parser = new DOMParser();
xmlDoc = parser.parseFromString(a, "text/xml")
} else {
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.loadXML(a)
}
return xmlDoc
}
function addArgumentToLine(g, c, b) {
if (g.nodeName.toLowerCase() == "property" || g.nodeName.toLowerCase() == "array") {
var f = g.childNodes;
for (var a = 0; a < f.length; a++) {
var e = addArgumentToLine(f[a], c, b);
if (e != c) {
b = ", "
}
c = e
}
return c
}
var d = "";
c += b;
var h = "";
if (g.hasChildNodes()) {
h = g.childNodes[0].nodeValue
}
if (g.nodeName.toLowerCase() == "false" || g.nodeName.toLowerCase() == "true") {
h = g.nodeName.toLowerCase()
}
if (g.nodeName.toLowerCase() == "string") {
d = "'"
}
c += d + h + d;
return c
}
function InvokeExternalXml(a) {
shouldLog = displayPCShowEmbeddedFlashLog;
if (a.indexOf("GetMediaDuration") > 0 || a.indexOf("GetPlaybackPosition") > 0) {
shouldLog = false
}
if (shouldLog) {
LogFunction(" ---> plugin called InvokeExternalXml(" + a + ")")
}
var b = GetXMLDOMFromXMLText("<root>" + a + "</root>");
var c = "";
var d = b.getElementsByTagName("invoke");
for (i = 0; i < d.length; i++) {
var f = d[i].getAttribute("name");
c = f + "(";
var g = "";
var h = d[i].getElementsByTagName("arguments");
for (j = 0; j < h.length; j++) {
var l = h[j].childNodes;
for (k = 0; k < l.length; k++) {
c = addArgumentToLine(l[k], c, g);
g = ", "
}
}
c += ")"
}
var m;
var n = "";
try {
m = eval(c);
n = XmlWrapArg(m);
if (shouldLog) {
LogFunction(" <--- plugin InvokeExternalXml eval(" + c + ") returned " + n)
}
} catch (e) {
LogFunction(" <--- plugin InvokeExternalXml eval(" + c + ") THREW " + e)
}
return n
}
var CMPEvents = new Object();
CMPEvents.MEDIA_PLAY_EVENT = "mediaPlayEvent";
CMPEvents.MEDIA_STOPPED_EVENT = "mediaStoppedEvent";
CMPEvents.MEDIA_PAUSE_EVENT = "mediaPauseEvent";
CMPEvents.MEDIA_PLAY_COMPLETE_EVENT = "mediaPlayCompleteEvent";
CMPEvents.MEDIA_PLAYER_EVENT = "mediaPlayerEvent";
CMPEvents.MEDIA_PLAYER_ERROR_EVENT = "mediaPlayerErrorEvent";
CMPEvents.CONTROL_PLAY_CLICK = "controlBarPlayClick";
CMPEvents.CONTROL_PAUSE_CLICK = "controlBarPauseClick";
CMPEvents.CONTROL_INFO_CLICK = "controlBarInfoClick";
CMPEvents.CONTROL_VOLUME_CLICK = "controlBarVolumeClick";
CMPEvents.CONTROL_EXPAND_CLICK = "controlBarExpandClick";
CMPEvents.CONTROL_REPLAY_CLICK = "controlReplayClick";
var CMPVideoScaleModes = new Object();
CMPVideoScaleModes.SCALEMODE_EXACTFIT = "exactFit";
CMPVideoScaleModes.SCALEMODE_SHOWALL = "showAll";
CMPVideoScaleModes.SCALEMODE_NOBORDER = "noBorder";
CMPVideoScaleModes.SCALEMODE_NOSCALE = "noScale";
var CMPMediaPlayerTypes = new Object();
CMPMediaPlayerTypes.MEDIA_PLAYER_CLEAR = "mediaPlayerTypeClear";
CMPMediaPlayerTypes.MEDIA_PLAYER_DRM = "mediaPlayerTypeDrm";
var CMPControlBarNames = new Object();
CMPControlBarNames.CONTROLBAR_STANDARD = "controlBarTypeStandard";
CMPControlBarNames.CONTROLBAR_FULLSCREEN = "controlBarTypeFullscreen";
CMPControlBarNames.CONTROLBAR_STANDARD_2COLUMN = "controlBarTypeStandard2Column";
CMPControlBarNames.CONTROLBAR_INSET = "controlBarTypeInset";
var CMPVideoScreenModes = new Object();
CMPVideoScreenModes.SCREENMODE_STANDARD = "videoScreenModeStandard";
CMPVideoScreenModes.SCREENMODE_FULLSCREEN = "videoScreenModeFullscreen";
var CMPEventsCode = new Object();
CMPEventsCode.PLAYER_LOADED_SUCCESS = parseInt("0x10000000");
CMPEventsCode.PLAYER_LOADED_FAILURE = parseInt("0x10000001");
CMPEventsCode.PLAYER_INITIALIZATION_SUCCESS = parseInt("0x10000002");
CMPEventsCode.PLAYER_INITIALIZATION_FAILURE = parseInt("0x10000003");
CMPEventsCode.PLAYER_ACTIVATION_SUCCESS = parseInt("0x10000004");
CMPEventsCode.PLAYER_ACTIVATION_NEEDED = parseInt("0x10000005");
CMPEventsCode.PLAYER_ACTIVATION_FAILURE = parseInt("0xFDE00008");
CMPEventsCode.PLAYER_MISSING_PARAMETERS_ERROR = parseInt("0x10000006");
CMPEventsCode.DUAL_PLAYER_INVOKE_ERROR = parseInt("0xFE1001FD");
CMPEventsCode.PLAYER_FLASH_STANDALONE_REQUIRED = parseInt("0x1000000F");
CMPEventsCode.PLAYER_FULLSCREEN_NOT_AVAILABLE = parseInt("0x1000001F");
CMPEventsCode.PLAYER_FLASH_STANDALONE_AND_PLUGIN_VERSION_MISMATCH = parseInt("0x10000013");
CMPEventsCode.PGWS_SERVICE_CALL_ERROR = parseInt("0x10000008");
CMPEventsCode.AS_SERVICE_CALL_ERROR = parseInt("0x10000009");
CMPEventsCode.PGWS_SERVICE_CALL_RETURNING_EMPTY_LIST = parseInt("0x10000010");
CMPEventsCode.MEDIA_SECURITY_ERROR = parseInt("0x1000000B");
CMPEventsCode.MEDIA_RELATED_OTHER_ERROR = parseInt("0x1000000C");
CMPEventsCode.MEDIA_NOT_FOUND_ERROR = parseInt("0x1000000A");
CMPEventsCode.MEDIA_DISCONNECTED = parseInt("0x1000000D");
CMPEventsCode.MEDIA_REPLAY_REQUIRED = parseInt("0x1000000E");
CMPEventsCode.PLAYER_SHUTDOWN_SUCCEEDED = parseInt("0x10000012");
CMPEventsCode.PLAYER_AL_INITIALIZATION_SUCCEEDED = parseInt("0x3E1001FE");
CMPEventsCode.PLAYER_AL_INITIALIZATION_ALREADY_SUCCEEDED = parseInt("0x7E1001FE");
CMPEventsCode.PLAYER_DRM_CRED_NETWORK_CONNECTION_CONNECTED = parseInt("0x3DE00017");
CMPEventsCode.PLAYER_DRM_CRED_NW_CONNECTION_STATUS_OK = parseInt("0x3DEF0001");
CMPEventsCode.PLAYER_DRM_CRED_SW_VERSION_UP_TO_DATE = parseInt("0xFDEF0009");
CMPEventsCode.PLAYER_DRM_CRED_CONNECTED_TO_SERVER_STATUS_OK = parseInt("0x3DE0000D");
CMPEventsCode.PLAYER_DRM_CRED_SESSION_OPEN_OK = parseInt("0x3DE00011");
CMPEventsCode.PLAYER_DRM_ABR_INFO_READY = parseInt("0x3D800094");
CMPEventsCode.PLAYER_DRM_USER_ALREADY_ACTIVATED = parseInt("0xFDEF000C");
CMPEventsCode.PLAYER_DLNA_SOURCE_BUFFERING_INFO = parseInt("0x7C420066");
CMPEventsCode.PLAYER_DLNA_SOURCE_BUFFERING_SUCCESS = parseInt("0x3C420066");
CMPEventsCode.PLAYER_DLNA_SOURCE_BUFFERING_WARN = parseInt("0xBC420066");
CMPEventsCode.PLAYER_TSP_VIDEO_QOS = parseInt("0x7C21007A");
CMPEventsCode.PLAYER_TSP_AUDIO_QOS = parseInt("0x7C21007B");
CMPEventsCode.PLAYER_DOWNLOAD_RECOVERED = parseInt("0x7D800088");
CMPEventsCode.PLAYER_XFERM_DOWNLOAD_BUFFERING = parseInt("0xBD80008C");
CMPEventsCode.PLAYER_XFERM_PLAYBACK_READY = parseInt("0x3D8C0090");
CMPEventsCode.PLAYER_XFER_DOWNLOAD_COMPLETE = parseInt("0x7D800085");
CMPEventsCode.PLAYER_XFERM_NO_ERR = parseInt("0x3D800000");
CMPEventsCode.PLAYER_FULLSCREEN_SUCCESS = parseInt("0x7EF70002");
CMPEventsCode.PLAYER_PARTIAL_SUCCESS = parseInt("0x7EF70003");
CMPEventsCode.PLAYER_XFERM_DRM_ABR_INFO_READY = parseInt("0x3D8C0094");
CMPEventsCode.PLAYER_NO_ERROR = parseInt("0x3C000000");
CMPEventsCode.PLAYER_TRANSFER_UNSUSPENDED = parseInt("0x7D80008E");
CMPEventsCode.PLAYER_DRM_CRED_ACTIVATION_STATUS_ACTIVATED = parseInt("0x3DE00008");
CMPEventsCode.PLAYER_ALREADY_ACTIVATED_FOR_OTHER_USER = parseInt("0x10000011");
CMPEventsCode.PLAYER_AL_FATAL_ERROR = parseInt("0xFE1001F4");
CMPEventsCode.PLAYER_AL_ASSET_NOT_DOWNLOADING = parseInt("0xFE1001F5");
CMPEventsCode.PLAYER_AL_SOME_ASSETS_COULD_NOT_BE_DELETED = parseInt("0xFE1001F6");
CMPEventsCode.PLAYER_AL_RESUME_FAILED = parseInt("0xFE1001F7");
CMPEventsCode.PLAYER_AL_ASSET_NOT_IN_DOWNLOAD_QUEUE = parseInt("0xFE1001F8");
CMPEventsCode.PLAYER_AL_ASSET_NOT_FOUND = parseInt("0xFE1001F9");
CMPEventsCode.PLAYER_AL_INVALID_STRING_FORMAT = parseInt("0xFE1001FA");
CMPEventsCode.PLAYER_AL_ANOTHER_OS_USER_USING_PCSHOW = parseInt("0xFE1001FB");
CMPEventsCode.PLAYER_AL_NOT_INITIALIZED = parseInt("0xFE1001FC");
CMPEventsCode.PLAYER_AL_NEEDS_RESTART = parseInt("0xFE1001FF");
CMPEventsCode.PLAYER_AL_ALLOCATED_BUFFER_TOO_SMALL = parseInt("0xFE100200");
CMPEventsCode.PLAYER_AL_RESOURCE_ALLOCATION_FAILED = parseInt("0xFE100201");
CMPEventsCode.PLAYER_AL_UPNP_CONFLICT = parseInt("0xFE100202");
CMPEventsCode.PLAYER_AL_PRIORITY_OUT_OF_RANGE = parseInt("0xFE100203");
CMPEventsCode.PLAYER_AL_IVALID_HANDLE = parseInt("0xFE100204");
CMPEventsCode.PLAYER_COULD_NOT_CREATE_RENDERER = parseInt("0xFD290065");
CMPEventsCode.PLAYER_COULD_NOT_OPEN_URI = parseInt("0xFD29025A");
CMPEventsCode.PLAYER_DRM_CRED_NW_CONNECTION_STATUS_REQUIRED = parseInt("0xFDEF0001");
CMPEventsCode.PLAYER_DRM_CRED_WRONG_USERNAME_OR_PASSWORD = parseInt("0xFDE00002");
CMPEventsCode.PLAYER_DRM_CRED_DEVICE_PROBLEM = parseInt("0xFDE00003");
CMPEventsCode.PLAYER_DRM_CRED_NUM_OF_DEVICES_EXCEEDED = parseInt("0xFDE00004");
CMPEventsCode.PLAYER_DRM_CRED_INTERNAL_ERROR = parseInt("0xFDE00005");
CMPEventsCode.PLAYER_DRM_CRED_INTERNAL_COMMUNICATION_ERROR = parseInt("0xFDE00006");
CMPEventsCode.PLAYER_DRM_CRED_STATUS_3RD_PARTY_SERVER_ERROR = parseInt("0xFDE00007");
CMPEventsCode.PLAYER_DRM_CRED_NETWORK_CONNECTION_REQUIRED = parseInt("0xbde00017");
CMPEventsCode.PLAYER_DRM_CRED_SW_VERSION_UPGRADE_OPTIONAL = parseInt("0xFDEF000A");
CMPEventsCode.PLAYER_DRM_CRED_SW_VERSION_UPGRADE_MANDATORY = parseInt("0xFDEF000B");
CMPEventsCode.PLAYER_DRM_CRED_CONNECTED_TO_SERVER_STATUS_FAILED = parseInt("0xFDE0000D");
CMPEventsCode.PLAYER_DRM_CRED_DRM_SERVER_ERROR = parseInt("0xFDE0000E");
CMPEventsCode.PLAYER_DRM_CRED_SESSION_ALREADY_OPEN = parseInt("0xFDE0000F");
CMPEventsCode.PLAYER_DRM_CRED_SESSION_NOT_OPEN = parseInt("0xFDE00010");
CMPEventsCode.PLAYER_DRM_CRED_SESSION_OPEN_REJECTED = parseInt("0xFDE00012");
CMPEventsCode.PLAYER_DRM_CRED_SESSION_CONNECTION_PROBLEM = parseInt("0xFDE00013");
CMPEventsCode.PLAYER_DRM_CRED_SESSION_EXPIRED = parseInt("0xFDE00014");
CMPEventsCode.PLAYER_DRM_CRED_DEVICE_SUSPENDED = parseInt("0xFDE00016");
CMPEventsCode.PLAYER_CANNOT_ACCESS_CONTENT = parseInt("0xFC4201F3");
CMPEventsCode.PLAYER_GST_COULD_NOT_CREATE_RENDERER = parseInt("0xFEF70000");
CMPEventsCode.PLAYER_GST_COULD_NOT_OPEN_URI = parseInt("0xFEF70001");
CMPEventsCode.PLAYER_COPY_PROTECTION_ERROR = parseInt("0xFEF7000B");
CMPEventsCode.PLAYER_COPY_PROTECTION_HDCP_ERROR = parseInt("0xFEF7000C");
CMPEventsCode.PLAYER_COPY_PROTECTION_CGMSA_ERROR = parseInt("0xFEF7000D");
CMPEventsCode.PLAYER_COPY_PROTECTION_NOT_SUPPORTED = parseInt("0xFEF7000E");
CMPEventsCode.PLAYER_SECURITY_ALERT = parseInt("0xFEF70010");
CMPEventsCode.PLAYER_RESOURCE_DOWNLOAD_JOB_FAILED = parseInt("0x7D8C04B2");
CMPEventsCode.PLAYER_RESOURCE_DOWNLOAD_JOB_FAILED_FATAL_ERROR = parseInt("0x7D8C04B5");
CMPEventsCode.PLAYER_RESOURCE_DOWNLOAD_JOB_TIMED_OUT = parseInt("0x7D8C04B6");
CMPEventsCode.PLAYER_RESOURCE_DOWNLOAD_CONNECTION_PROBLEM = parseInt("0x7D8C04B9");
CMPEventsCode.PLAYER_RESOURCE_DOWNLOAD_JOB_FAILED_FURL_MALFORMAT = parseInt("0x7D8C04BA");
CMPEventsCode.PLAYER_RESOURCE_DOWNLOAD_FAILED_HTTP = parseInt("0x7D8C04BD");
CMPEventsCode.PLAYER_GENERAL_ERROR = parseInt("0x7D8CFFFF");
CMPEventsCode.PLAYER_TSP_UNKNOWN_ERR = parseInt("0xFC210064");
CMPEventsCode.PLAYER_TSP_CONFIG_ERR = parseInt("0xFC210066");
CMPEventsCode.PLAYER_TSP_FORMAT_NOT_SUPPORTED = parseInt("0xFC210068");
CMPEventsCode.PLAYER_TSP_USER_NOT_ENTITLED = parseInt("0xFC20006D");
CMPEventsCode.PLAYER_TSP_ENTITLEMENT_EXPIRED = parseInt("0xFC20006E");
CMPEventsCode.PLAYER_TSP_NO_SUITABLE_AUDIO_CODEC = parseInt("0xFC210071");
CMPEventsCode.PLAYER_TSP_VGDRM_AGENT_INTERNAL_ERROR = parseInt("0xFC200072");
CMPEventsCode.PLAYER_TSP_VGDRM_SESSION_FAIL_REASON_JOIN_CONNECTION_PROBLEM = parseInt("0xFC200073");
CMPEventsCode.PLAYER_TSP_LM_DRMSERVER_CONNECTION_PROBLEM = parseInt("0xFC200074");
CMPEventsCode.PLAYER_TSP_LM_WRONG_CLIENT_VERSION = parseInt("0xFC200075");
CMPEventsCode.PLAYER_TSP_LM_LICENSE_TIMED_OUT = parseInt("0xFC200076");
CMPEventsCode.PLAYER_TSP_VIDEO_STARVATION_WARN = parseInt("0xBC210078");
CMPEventsCode.PLAYER_TSP_VIDEO_STARVATION = parseInt("0x3C210078");
CMPEventsCode.PLAYER_VIEWING_USER_NOT_ENTITLED = parseInt("0xFEE00004");
CMPEventsCode.PLAYER_VIEWING_ENTITLEMENT_EXPIRED = parseInt("0xFEE00005");
CMPEventsCode.PLAYER_VIEWING_DRM_SERVER_CONNECTION_PROBLEM = parseInt("0xFEE00006");
CMPEventsCode.PLAYER_VIEWING_WRONG_CLIENT_VERSION = parseInt("0xFEE00007");
CMPEventsCode.PLAYER_VIEWING_USER_NOT_ACTIVATED = parseInt("0xFEE00008");
CMPEventsCode.PLAYER_VIEWING_INTERNAL_ERROR = parseInt("0xFEE00009");
CMPEventsCode.PLAYER_VIEWING_DRM_LICENSE_TIMED_OUT = parseInt("0xFEE0000A");
CMPEventsCode.PLAYER_XFERM_PANIC = parseInt("0xFD800001");
CMPEventsCode.PLAYER_XFERM_DOWNLOAD_ERR = parseInt("0xFD800068");
CMPEventsCode.PLAYER_XFERM_SESSION_ERR = parseInt("0xFD800069");
CMPEventsCode.PLAYER_XFERM_OBJECT_NOT_FOUND = parseInt("0xFD80006A");
CMPEventsCode.PLAYER_XFERM_CONTENT_NOT_FOUND_ERROR = parseInt("0xFD80006B");
CMPEventsCode.PLAYER_XFERM_LOCALIZER_GENERAL_ERROR = parseInt("0xFD800074");
CMPEventsCode.PLAYER_XFERM_EMPTY_DRM_LICENSE = parseInt("0xFD800075");
CMPEventsCode.PLAYER_XFERM_EMPTY_SA_LICENSE = parseInt("0xFD800076");
CMPEventsCode.PLAYER_XFERM_EMPTY_ASSET_ID = parseInt("0xFD800077");
CMPEventsCode.PLAYER_XFERM_EMPTY_FECM = parseInt("0xFD800078");
CMPEventsCode.PLAYER_XFERM_LOCALIZATION_FAILED = parseInt("0xFD800079");
CMPEventsCode.PLAYER_XFERM_LOGIN_CONNECTION_PROBLEM = parseInt("0xFD80007A");
CMPEventsCode.PLAYER_XFERM_USER_NOT_ENTITLED = parseInt("0xFD80007B");
CMPEventsCode.PLAYER_XFERM_ENTITLEMENT_EXPIRED = parseInt("0xFD80007C");
CMPEventsCode.PLAYER_XFERM_DRMSERVER_CONNECTION_PROBLEM = parseInt("0xFD80007D");
CMPEventsCode.PLAYER_XFERM_LOCALIZER_WRONG_CLIENT_VERSION = parseInt("0xFD80007E");
CMPEventsCode.PLAYER_XFERM_USER_NOT_ACTIVATED = parseInt("0xFD80007F");
CMPEventsCode.PLAYER_XFERM_DRM_CLOSED_CONNECTION = parseInt("0xFD800080");
CMPEventsCode.PLAYER_XFERM_DRM_AGENT_INTERNAL_ERROR = parseInt("0xFD800081");
CMPEventsCode.PLAYER_XFERM_LOCALIZER_CONFIG_ERROR = parseInt("0xFD800082");
CMPEventsCode.PLAYER_XFERM_DOWNLOAD_CONNECTION_ERROR = parseInt("0xFD800083");
CMPEventsCode.PLAYER_XFERM_DOWNLOAD_URL_FORMAT_ERROR = parseInt("0xFD8C0084");
CMPEventsCode.PLAYER_DOWNLOAD_PROTOCOL_NOT_SUPPORTED_ERROR = parseInt("0xFD800086");
CMPEventsCode.PLAYER_DOWNLOAD_RETRY = parseInt("0x7D800087");
CMPEventsCode.PLAYER_TRUNCATE_FILE_FAILURE = parseInt("0xFD800089");
CMPEventsCode.PLAYER_WRITE_PROTECTION = parseInt("0xFD80008A");
CMPEventsCode.PLAYER_DISK_FULL = parseInt("0xFD80008B");
CMPEventsCode.PLAYER_XFERM_ABR_HAS_DATA = parseInt("0x7D80008C");
CMPEventsCode.PLAYER_TRANSFER_SUSPENDED = parseInt("0x7D80008D");
CMPEventsCode.PLAYER_XFERM_DOWNLOAD_PARSE_ASX_ERR = parseInt("0xFD8C008F");
CMPEventsCode.PLAYER_XFERM_DRM_SESSION_ERROR = parseInt("0xFD800091");
CMPEventsCode.PLAYER_XFERM_DRM_3RD_PARTY_SERVER_ERROR = parseInt("0xFD800092");
CMPEventsCode.PLAYER_XFERM_DRM_CONCURRENCY_ERROR = parseInt("0xFD800093");
CMPEventsCode.PLAYER_DRM_DEVICE_JAIL_BROKEN = parseInt("0xFD800095");
CMPEventsCode.PLAYER_DRM_LICENSE_TIMED_OUT = parseInt("0xFD800096");
CMPEventsCode.PLAYER_XFERM_CONCURRENCY_TECHNICAL_FAULT = parseInt("0xFD800097");
CMPEventsCode.PLAYER_XFERM_CONCURRENCY_ALERT_RAISED = parseInt("0xBD800098");
CMPEventsCode.PLAYER_XFERM_CONCURRENCY_ALERT_CLEARED = parseInt("0x3D800098");
CMPEventsCode.PLAYER_XFERM_ASSET_ALREADY_EXISTS = parseInt("0xFD800099");
CMPEventsCode.PLAYER_XFERM_DOWNLOAD_PROXY_AUTHENTICATION_ERROR = parseInt("0xFD80009A");
CMPEventsCode.PLAYER_XFERM_DOWNLOAD_SERVER_AUTHENTICATION_ERROR = parseInt("0xFD80009B");
CMPEventsCode.PLAYER_CDN_URL_TOKEN_ERROR = parseInt("0xFD80009C");
CMPEventsCode.PLAYER_XFERM_RESOURCE_DOWNLOAD_FAILED = parseInt("0x7D8004B2");
CMPEventsCode.PLAYER_XFERM_RESOURCE_DOWNLOAD_FATAL_ERROR = parseInt("0x7D8004B5");
CMPEventsCode.PLAYER_XFERM_RESOURCE_DOWNLOAD_TIMED_OUT = parseInt("0x7D8004B6");
CMPEventsCode.PLAYER_XFERM_RESOURCE_DOWNLOAD_CONNECTION_PROBLEM = parseInt("0x7D8004B9");
CMPEventsCode.PLAYER_XFERM_RESOURCE_DOWNLOAD_URL_MALFORMAT = parseInt("0x7D8004BA");
CMPEventsCode.PLAYER_XFERM_RESOURCE_DOWNLOAD_FAILED_HTTP = parseInt("0x7D8004BD");
CMPEventsCode.PLAYER_XFERM_RESOURCE_DOWNLOAD_GENERAL_ERROR = parseInt("0x7D80FFFF");
CMPEventsCode.PLAYER_AL_OPERATION_TIMEOUT = parseInt("0xFE100205");
CMPEventsCode.PLAYER_DRM_CRED_SGW_SERVICE_NOT_AVAILABLE = parseInt("0xFDE0001A");
CMPEventsCode.PLAYER_DRM_CRED_SGW_CONNECTION_TIMED_OUT = parseInt("0xFDE0001B");
CMPEventsCode.PLAYER_DRM_CRED_SGW_HTTP_ERROR = parseInt("0xFDE0001C");
CMPEventsCode.PLAYER_DRM_CRED_SGW_FAILURE = parseInt("0xFDE0001D");
CMPEventsCode.PLAYER_COULDNT_CONNECT_TO_MEDIA_SERVER = parseInt("0xFEF70004");
CMPEventsCode.PLAYER_INTEGRITY_DLLS_PROBLEMS = parseInt("0xFEF7000F");
CMPEventsCode.PLAYER_XFERM_DOWNLOAD_TIMEOUT_ERROR = parseInt("0xFD80009D");
CMPEventsCode.PLAYER_DRM_LICENSE_ACQUISITION_TIMED_OUT = parseInt("0xFD80009E");
CMPEventsCode.PLAYER_CDN_SERVICE_NOT_AVAILABLE = parseInt("0xFD80009F");
CMPEventsCode.PLAYER_CDN_CONNECTION_TIMED_OUT = parseInt("0xFD8000A0");
CMPEventsCode.PLAYER_CDN_HTTP_ERROR = parseInt("0xFD8000A1");
CMPEventsCode.PLAYER_DRM_VIEWING_IS_NOT_ALLOWED = parseInt("0xFD8000A2");
CMPEventsCode.PLAYER_CDN_FAILURE = parseInt("0xFD8000A3");
CMPEventsCode.PLAYER_DRMS_SERVICE_NOT_AVAILABLE = parseInt("0xFD8000A4");
CMPEventsCode.PLAYER_DRMS_CONNECTION_TIMED_OUT = parseInt("0xFD8000A5");
CMPEventsCode.PLAYER_DRMS_HTTP_ERROR = parseInt("0xFD8000A6");
CMPEventsCode.PLAYER_DRMS_FAILURE = parseInt("0xFD8000A7");
CMPEventsCode.PLAYER_DRMS_EDGE_SERVICE_NOT_AVAILABLE = parseInt("0xFD8000A8");
CMPEventsCode.PLAYER_DRMS_EDGE_CONNECTION_TIMED_OUT = parseInt("0xFD8000A9");
CMPEventsCode.PLAYER_DRMS_EDGE_HTTP_ERROR = parseInt("0xFD8000AA");
CMPEventsCode.PLAYER_DRMS_EDGE_FAILURE = parseInt("0xFD8000AB");
CMPEventsCode.PLAYER_DCCS_SERVICE_NOT_AVAILABLE = parseInt("0xFD8000AC");
CMPEventsCode.PLAYER_DCCS_CONNECTION_TIMED_OUT = parseInt("0xFD8000AD");
CMPEventsCode.PLAYER_DCCS_HTTP_ERROR = parseInt("0xFD8000AE");
CMPEventsCode.PLAYER_DCCS_FAILURE = parseInt("0xFD8000AF");
var CMP = (function() {
var a = null;
function b() {
var d = "";
var h = {};
var e = undefined;
var l = this;
this.init = function(m, n) {
e = undefined;
d = m;
f();
if (e) {
e.setPlayerType(n)
}
};
function f() {
if (d != "" && e == undefined) {
e = g(d)
}
}
function g(m) {
if (navigator.appName.indexOf("Microsoft Internet") == -1) {
if (document.embeds && document.embeds[m]) {
return document.embeds[m]
} else {
return document.getElementById(m)
}
} else {
if (navigator.appName.indexOf("Microsoft Internet") != -1) {
return document.getElementById(m)
}
}
}
function c(m, q, o) {
var t = h[m];
var s = false;
if (t && t.length > 0) {
for (var n = 0; n < t.length; n++) {
var r = t[n];
if (r.scope == o && r.handler == q) {
s = true;
break
}
}
}
return s
}
this.addEventListener = function(m, o, n) {
if (!h[m]) {
h[m] = new Array()
}
if (!c(m, o, n)) {
h[m].push({
handler: o,
scope: n
})
}
};
this.dispatchEvent = function(n, m) {
var r = h[n];
if (r && r.length > 0) {
for (var o = 0; o < r.length; o++) {
var q = r[o];
(q.scope) ? q.handler(q.scope, m) : q.handler(m)
}
}
};
this.removeEventListener = function(m, q, o) {
var s = h[m];
if (s && s.length > 0) {
for (var n = 0; n < s.length; n++) {
var r = s[n];
if (r.scope == o && r.handler == q) {
s.splice(n, 1);
break
}
}
}
};
this.activate = function(m) {
f();
if (e) {
e.activatePlayer(m)
}
};
this.deactivate = function() {
f();
if (e) {
e.deactivatePlayer()
}
};
this.playMedia = function(m) {
f();
if (e) {
e.playMedia(m)
}
};
this.exitFullScreen = function() {
f();
if (e) {
e.exitFullScreen()
}
};
this.setControlBar = function(m, n) {
f();
if (e) {
e.setControlBar(m, n)
}
};
this.setControlBarAnimation = function(n, o, m) {
f();
if (e) {
e.setControlBarAnimation(n, o, m)
}
};
this.getMediaPosition = function() {
return (e) ? e.getMediaPosition() : 0
};
this.getMediaDuration = function() {
return (e) ? e.getMediaDuration() : 0
};
this.addProtectedPlayer = function(o) {
var r = true;
var t = "context-browser&debugPanel=false";
var n = o + "FCinemaMediaPlayer.swf";
var m = GetNDSPlayerHtml(d + "_protected", r, n, t);
f();
if (e) {
var q = document.getElementById(d + "_protected_player");
q.innerHTML = m;
try {
InitializePcShow(d + "_protected", l.tempProtectedPlayerPluginCreationFailureHandler, l.tempProtectedPlayerEventHandler, undefined, undefined, undefined, undefined, e)
} catch (s) {}
}
};
this.tempProtectedPlayerEventHandler = function(m, o) {
var n = o[1];
switch (m) {
case "Status":
break
}
};
this.tempProtectedPlayerPluginCreationFailureHandler = function(m) {
if (m == "WmpMissing") {} else {}
};
this.shutdownPlayer = function() {
f();
if (e) {
e.shutdownPlayer()
}
}
}
return new function() {
this.getInstance = function() {
if (a == null) {
a = new b();
a.constructor = null
}
return a
}
}
})();
function CMPEventHandler(a) {
CMP.getInstance().dispatchEvent(a.type, a)
}
function injectProtectedPlayer(a) {
CMP.getInstance().addProtectedPlayer(a)
}
function VGConnectFlashInitiated(a) {}
function detectInternetExplorer() {
return (IE = "\v" == "v")
}
function getBrowserInformation() {
var a = {};
a.osBitness = (navigator.userAgent.indexOf("x64") != -1) ? "64" : "32";
a.browserType = getBrowserData(true);
a.browserVersion = getBrowserData(false);
return a
}
function getBrowserData(b) {
var c = navigator.userAgent;
var a;
var d;
var e = "" + parseFloat(navigator.appVersion);
if ((a = c.indexOf("Opera")) != -1) {
d = "Opera";
e = c.substring(a + 6);
if ((a = c.indexOf("Version")) != -1) {
e = c.substring(a + 8)
}
} else {
if ((a = c.indexOf("MSIE")) != -1) {
d = "Microsoft Internet Explorer";
e = c.substring(a + 5)
} else {
if ((a = c.indexOf("Chrome")) != -1) {
d = "Chrome";
e = c.substring(a + 7)
} else {
if ((a = c.indexOf("Safari")) != -1) {
d = "Safari";
e = c.substring(a + 7);
if ((a = c.indexOf("Version")) != -1) {
e = c.substring(a + 8)
}
} else {
if ((a = c.indexOf("Firefox")) != -1) {
d = "Firefox";
e = c.substring(a + 8)
}
}
}
}
}
if ((ix = e.indexOf(";")) != -1) {
e = e.substring(0, ix)
}
if ((ix = e.indexOf(" ")) != -1) {
e = e.substring(0, ix)
}
return (b) ? d : e
}
function getErrorDetails(c) {
var a = {};
if (typeof(this._PcShowErrors[c]) == "undefined") {
return null
}
var b = this._PcShowErrors[c];
a.shortName = getValue("shortName", b);
return a
}
var displayPCShowEmbeddedFlashLog = false;
function FlashUseLocalConnection() {
return (IsIE() == true)
}
function VgTunnelToHtmlSwf(a) {
if (flashUIObjectPtr == null || flashUIObjectPtr == undefined) {
return
}
var b = [];
if (arguments.length > 1) {
for (var c = 1; c < arguments.length; c++) {
b[c - 1] = arguments[c]
}
}
try {
flashUIObjectPtr[a](b)
} catch (d) {
LogFunction("VgTunnelToHtmlSwf: " + d)
}
}
function VgTunnelToFullscreenSwf(b) {
if (pcshowPlugin == null) {
return
}
var c = arguments[1];
try {
var a = GetActionScriptArray(c);
DoCallFlashMethod(b, [a], "void", false)
} catch (d) {
LogFunction("VgTunnelToFullscreenSwf: " + d)
}
}
function SendEventToFlash(a) {
if (flashUIObjectPtr == null || flashUIObjectPtr == undefined || flashUIObjectPtr.onPCShowEvent == null) {
return
}
var c = arguments[1];
var b = ["", "", "", "", "", ""];
for (var d = 0; d < c.length; d++) {
b[d] = c[d]
}
try {
flashUIObjectPtr.onPCShowEvent(b)
} catch (f) {
LogFunction("SendEventToFlash: " + f)
}
}
function GetActionScriptArray(b) {
var d;
var a = "";
for (var c = 0; c < b.length; c++) {
d = '<property id="' + c + '">' + XmlWrapArg(b[c]) + "</property>";
a += d
}
return a
}
function XmlWrapArg(a) {
if (typeof(a) == "boolean") {
return a ? "<true/>" : "<false/>"
}
var b = "<" + typeof(a) + ">" + a + "</" + typeof(a) + ">";
if (typeof(a) == "string" && a.indexOf("<property id") == 0) {
b = "<array>" + a + "</array>"
}
return b
}
function DoCallFlashMethodAndLog(c, b, a) {
DoCallFlashMethod(c, b, a, true)
}
function DoCallFlashMethod(b, n, m, f) {
var d = "";
var c;
var o = ' returntype="xml"';
c = '<invoke name="' + b + '"' + o + "><arguments>";
for (var g = 0; g < n.length; g++) {
c += XmlWrapArg(n[g])
}
c += "</arguments></invoke>";
if (pcshowPlugin == null) {
return d
}
if (FlashUseLocalConnection()) {
return d
}
var h = "";
try {
h = pcshowPlugin.CallFlashMethod(c);
if (h == null || h == undefined) {
h = ""
}
if (BrowserDetect.OS == "Windows" && h.indexOf("<") != 0) {
throw ("non-xml response: " + h)
}
} catch (l) {
LogFunction("pcshowPlugin.CallFlashMethod(" + c + ") threw " + l);
return d
}
var q = GetXMLDOMFromXMLText(h);
if (m != "void") {
var a = "";
if (q.firstChild.nodeName.toLowerCase() == "string") {
a = "'"
}
d = a + q.firstChild.childNodes[0].nodeValue + a
}
if (f) {
LogFunction("CallFlashMethod(" + c + ")=[" + h + "] returning:[" + d + "]")
}
return d
}
function ABRVodStreamPlayURL(d, e, b, c) {
var a = "";
a = amPlugin.ABRVodStreamPlayURL(d, e, b, c);
return a
}
function CallMethodFromEmbeddedFlash() {
var a = GetActionScriptArray(arguments);
var b = DoCallFlashMethod("VGConnectTestAPI", [a], "string", false);
return b
}
function GetXMLDOMFromXMLText(a) {
if (window.DOMParser) {
parser = new DOMParser();
xmlDoc = parser.parseFromString(a, "text/xml")
} else {
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.loadXML(a)
}
return xmlDoc
}
function addArgumentToLine(g, c, b) {
if (g.nodeName.toLowerCase() == "property" || g.nodeName.toLowerCase() == "array") {
var f = g.childNodes;
for (var a = 0; a < f.length; a++) {
var e = addArgumentToLine(f[a], c, b);
if (e != c) {
b = ", "
}
c = e
}
return c
}
var d = "";
c += b;
var h = "";
if (g.hasChildNodes()) {
h = g.childNodes[0].nodeValue
}
if (g.nodeName.toLowerCase() == "false" || g.nodeName.toLowerCase() == "true") {
h = g.nodeName.toLowerCase()
}
if (g.nodeName.toLowerCase() == "string") {
d = "'"
}
c += d + h + d;
return c
}
function InvokeExternalXml(a) {
shouldLog = displayPCShowEmbeddedFlashLog;
if (a.indexOf("GetMediaDuration") > 0 || a.indexOf("GetPlaybackPosition") > 0) {
shouldLog = false
}
if (shouldLog) {
LogFunction(" ---> plugin called InvokeExternalXml(" + a + ")")
}
var b = GetXMLDOMFromXMLText("<root>" + a + "</root>");
var c = "";
var d = b.getElementsByTagName("invoke");
for (i = 0; i < d.length; i++) {
var f = d[i].getAttribute("name");
c = f + "(";
var g = "";
var h = d[i].getElementsByTagName("arguments");
for (j = 0; j < h.length; j++) {
var l = h[j].childNodes;
for (k = 0; k < l.length; k++) {
c = addArgumentToLine(l[k], c, g);
g = ", "
}
}
c += ")"
}
var m;
var n = "";
try {
m = eval(c);
n = XmlWrapArg(m);
if (shouldLog) {
LogFunction(" <--- plugin InvokeExternalXml eval(" + c + ") returned " + n)
}
} catch (e) {
LogFunction(" <--- plugin InvokeExternalXml eval(" + c + ") THREW " + e)
}
return n
}
function shouldUseJSLayer() {
return (BrowserDetect.browser == "Chrome" || BrowserDetect.browser == "Firefox" || BrowserDetect.browser == "Safari")
}; |