STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/43689596?noj=FRM43689596-22DC" width="1" height="1"></div>

leanbacklite_v3.swf

This is the info page for
Flash #162670

(Click the ID number above for more basic data on this flash file.)


Text
TM

ActionScript [AS1/AS2]

Frame 1
stop(); var progressBar; var progressBarTile; var inShim = (_root != this); var oldV1Models = ["46SL417"]; var oldV1 = false; var model = _root.model.toUpperCase(); var i = 0; while (i < oldV1Models.length) { if (model == oldV1Models[i]) { oldV1 = true; } i++; } align = function () { if (inShim) { return(undefined); } if (progressBar) { progressBar._x = (Stage.width / 2) - (progressBar._width / 2); progressBar._y = (Stage.height / 2) + 60; } if (logo) { logo._x = (Stage.width - logo._width) / 2; logo._y = (Stage.height - logo._height) / 2; } }; initProgress = function () { progressBar = _root.createEmptyMovieClip("mcProgress", _root.getNextHighestDepth()); progressBar.lineStyle(1, 14079702, 100); progressBar.beginFill(14079702, 100); progressBar.moveTo(0, 0); progressBar.lineTo(450, 0); progressBar.lineTo(450, 3); progressBar.lineTo(0, 3); progressBar.lineTo(0, 0); progressBar.endFill(); progressBarTile = progressBar.createEmptyMovieClip("mcProgressTile", 1); progressBarTile.lineStyle(0, 15613502, 100); progressBarTile.beginFill(15613502, 100); progressBarTile.moveTo(0, 0); progressBarTile.lineTo(1, 0); progressBarTile.lineTo(1, 1); progressBarTile.lineTo(0, 1); progressBarTile.lineTo(0, 0); progressBarTile.endFill(); progressBarTile._x = 1; progressBarTile._y = 1; align(); }; setProgress = function (value) { value = Math.max(10, value); if ((!progressBarTile) && (!inShim)) { initProgress(); align(); } progressBarTile._width = ((progressBar._width - 4) * value) / 100; }; onEnterFrame = function () { var _local2 = Math.round((getBytesLoaded() / getBytesTotal()) * 100); setProgress(_local2 / 2); if (getBytesLoaded() == getBytesTotal()) { gotoAndStop (2); if (oldV1) { Stage.align = "TL"; Stage.scaleMode = "noScale"; } com.google.youtube.tv.LBLv3.main(this); onEnterFrame = null; } }; hideProgress = function () { logo._visible = false; logo.removeMovieClip(); progressBar.removeMovieClip(); }; if (!oldV1) { Stage.align = "TL"; Stage.scaleMode = "noScale"; } if (inShim) { logo._visible = false; logo.removeMovieClip(); if (Number(_parent.loader) >= 5) { logo = _parent.logo; } else if (Number(_parent.loader) >= 4) { } else if (!oldV1) { logo = attachMovie("logo_old", "logo_old", getNextHighestDepth(), {_x:511.5, _y:259}); } if (_parent.mcProgress) { progressBar = _parent.mcProgress; progressBarTile = progressBar.mcProgressTile; } } align();
Frame 2
com.google.youtube.tv.LBLv3.main(this);
Symbol 33 MovieClip [preloader] Frame 22
stop();
Symbol 20480 MovieClip [__Packages.com.google.chianti.event.EventBroadcaster] Frame 0
class com.google.chianti.event.EventBroadcaster { static var self; var _eb_enabled, _eb_listeners, _eb_all_listeners, _eb_name; function EventBroadcaster () { } static function initialize(obj, opt_ename) { if (self == undefined) { self = new com.google.chianti.event.EventBroadcaster(); } for (var i in methods) { obj[methods[i]] = self[methods[i]]; _global.ASSetPropFlags(obj, methods, 1); } obj._eb_listeners = new Object(); obj._eb_all_listeners = new Array(); obj._eb_enabled = true; obj._eb_name = opt_ename; _global.ASSetPropFlags(obj, ["_eb_listeners", "_eb_all_listeners", "_eb_enabled", "_eb_name"], 1); } static function bubbleEvent(event, target) { event.bubbles = true; var _local4 = target._parent; while (_local4) { if (_local4.broadcast != undefined) { event.currentTarget = _local4; _local4.broadcast(event); break; } _local4 = _local4._parent; } } function disableBroadcast() { _eb_enabled = false; } function enableBroadcast() { _eb_enabled = true; } function broadcast(event) { if (_eb_enabled) { if (event.target == undefined) { event.target = this; } if (_eb_listeners[event.type] == undefined) { _eb_listeners[event.type] = _eb_all_listeners.slice(); } var _local3 = _eb_listeners[event.type].slice(); var _local4 = _local3.length; if (_local4 > 0) { var _local5 = 0; for ( ; _local5 < _local4 ; _local5++) { _local3[_local5](event); } } if (event.bubbles) { bubbleEvent(event, this); } } } function registerEvent(type, obj) { if (typeof(obj) != "function") { if (obj[_eb_name] == undefined) { return(undefined); } obj = com.google.chianti.event.EventDelegate.create(obj, obj[_eb_name]); } if (type == ALL) { _eb_all_listeners.push(obj); for (var i in _eb_listeners) { _eb_listeners[i].push(obj); } } else { if (_eb_listeners[type] == undefined) { _eb_listeners[type] = _eb_all_listeners.slice(); } _eb_listeners[type].push(obj); } } function registerEvents() { var _local2 = arguments.pop(); var _local3 = arguments.length; var _local4 = 0; for ( ; _local4 < _local3 ; _local4++) { registerEvent(arguments[_local4], _local2); } } function unregisterEvent(type, obj) { if (type == ALL) { for (var i in _eb_listeners) { unregisterEvent(i, obj); } var _local4 = _eb_all_listeners; } else { var _local4 = _eb_listeners[type]; } var _local5 = _local4.length; var _local6 = 0; for ( ; _local6 < _local5 ; _local6++) { if (_local4[_local6] == obj) { _local4.splice(_local6, 1); break; } } } function unregisterEvents() { var _local2 = arguments.pop(); var _local3 = arguments.length; var _local4 = 0; for ( ; _local4 < _local3 ; _local4++) { unregisterEvent(arguments[_local4], _local2); } } function unregisterAll(opt_type) { if (opt_type == undefined) { delete _eb_listeners; _eb_listeners = new Object(); } else { delete _eb_listeners[opt_type]; } } function setEventName(name) { _eb_name = name; } function getEventName() { return(_eb_name); } static var ALL = "ALL"; static var methods = ["broadcast", "registerEvent", "unregisterEvent", "registerEvents", "unregisterEvents", "unregisterAll", "setEventName", "getEventName", "disableBroadcast", "enableBroadcast"]; }
Symbol 20481 MovieClip [__Packages.com.google.youtube.tv.ui.View] Frame 0
class com.google.youtube.tv.ui.View extends com.google.chianti.event.EventBroadcaster { var parent, description, clip, unregisterAll, data, dataGeneration; function View (parent, description) { super(); com.google.chianti.event.EventBroadcaster.initialize(this); this.parent = parent; this.description = description; createClip(); } static function disableFocusRect(target) { target._focusrect = false; target.focusEnabled = false; target.tabEnabled = false; } function createClip() { var _local2 = parent.getNextHighestDepth(); var _local3 = (description ? (description) : "clip") + _local2; clip = parent.createEmptyMovieClip(_local3, _local2); disableFocusRect(clip); } function setVisible(visible) { clip._visible = visible; } function isVisible() { return(clip._visible); } function setAlpha(alpha) { clip._alpha = alpha; } function setPos(x, y) { clip._x = x; clip._y = y; } function setScale(xScale, yScale) { clip._xscale = xScale; clip._yscale = yScale; } function getPos() { return(new flash.geom.Point(clip._x, clip._y)); } function getWidth() { return(clip._width); } function setWidth(value) { } function getHeight() { return(clip._height); } function setHeight(value) { } function getRect() { return(new flash.geom.Rectangle(clip._x, clip._y, clip._width, clip._height)); } function remove() { clip.removeMovieClip(); clip = null; unregisterAll(); } function isRemoved() { return(!clip); } function getName() { return(clip._name); } function setName(name) { clip._name = name; } function bringToFront() { var _local2 = clip._parent.createEmptyMovieClip("___tmp", clip._parent.getNextHighestDepth()); clip.swapDepths(_local2); _local2.removeMovieClip(); } function getClassName() { return(VIEW); } function cleanBeforeRecycle(keepImage) { data = null; dataGeneration = -1; } function getData() { return(data); } function setData(data) { this.data = data; dataGeneration = data.generation; } function represents(node) { return((data == node) && (dataGeneration == node.generation)); } function setColor(color) { var _local3 = new flash.geom.ColorTransform(); _local3.rgb = color; clip.transform.colorTransform = _local3; } function clearColor() { clip.transform.colorTransform = new flash.geom.ColorTransform(); } static var VIEW = "com.google.youtube.tv.ui.View"; }
Symbol 20482 MovieClip [__Packages.com.google.youtube.tv.components.BaseComponent] Frame 0
class com.google.youtube.tv.components.BaseComponent extends com.google.youtube.tv.ui.View { var enabled; function BaseComponent (parent, description) { super(parent, description); enabled = false; } function enable(state) { if (state || (state == undefined)) { enabled = true; activate(); } else { enabled = false; deactivate(); } } function activate() { } function deactivate() { } function pop() { var _local2 = com.google.youtube.tv.controller.Switcher.getSwitcher(); if ((_local2.getTos() == this) || (_local2.getDialog() == this)) { _local2.pop(); } } function handleNavigationKey(keyCode) { if (isExitKeyCode(keyCode)) { pop(); return(true); } return(false); } function isExitKeyCode(keyCode) { return((keyCode == Key.ESCAPE) || (keyCode == com.google.youtube.tv.controller.ExtendedKeys.BACK)); } function handleKey(keyCode) { return(false); } function handleMouseMove() { return(false); } function handleWheel(delta) { handleKey(((delta > 0) ? (-Key.DOWN) : (-Key.UP))); return(true); } function getPlaybackRestriction() { return(STOP_PLAYBACK); } function isNumpadHandled() { return(false); } function needsBackground() { return(getPlaybackRestriction() == STOP_PLAYBACK); } static var PAUSE_PLAYBACK = "PAUSE_PLAYBACK"; static var STOP_PLAYBACK = "STOP_PLAYBACK"; }
Symbol 20483 MovieClip [__Packages.com.google.youtube.tv.app.Config] Frame 0
class com.google.youtube.tv.app.Config { static var allFeatures; function Config () { } static function adjustThumbQuality(url, opt_quality) { if (!url) { return(url); } var _local4 = url.lastIndexOf("/") + 1; var _local5 = url.indexOf(".", _local4); var _local6 = url.substring(_local4, _local5); if (_local6.indexOf("default") >= 0) { _local6 = opt_quality || (THUMBS_QUALITY); } else if ((_local6 == "1") || (_local6 == "mq1")) { _local6 = opt_quality || (CHANNEL_THUMBS_QUALITY); } else { return(url); } return((url.substring(0, _local4) + _local6) + url.substr(_local5)); } static function hasAllFeatures() { if (allFeatures == undefined) { allFeatures = com.google.youtube.tv.services.StorageService.get().getValue(com.google.youtube.tv.services.StorageService.ALL_FEATURES); } return(allFeatures); } static var DEV_KEY = "AI39si5y9eNv31r6Mf0C4U8otzFMiv2qJm9E1C6k2TYAyrWgEreI2Mm5RxVejdUXQyVfB1" + "WQcV7BSWuh5GZIekDa1HT6EQ6aUg"; static var GDATA_NUM_RESULTS_PER_PAGE = 5; static var GDATA_NUM_PLAYLISTS_PER_PAGE = 25; static var GDATA_MAX_NUM_PER_REQUEST = 50; static var GDATA_STANDARD_FEED_SIZE = 100; static var MAX_NUM_VIDEOS_PER_FEED = 1000; static var INITIAL_NUM_CHANNELS_PER_CATEGORY = 3; static var UI_TIMEOUT = 5000; static var DESIGNED_WIDTH = 1280; static var DESIGNED_HEIGHT = 720; static var SCALE_X = Stage.width / DESIGNED_WIDTH; static var SCALE_Y = Stage.height / DESIGNED_HEIGHT; static var SCALE = Math.min(SCALE_X, SCALE_Y); static var THUMBS_QUALITY = "mqdefault"; static var CHANNEL_QUALITY_LOW = "1"; static var CHANNEL_QUALITY_MEDIUM = "mq1"; static var CHANNEL_THUMBS_QUALITY = CHANNEL_QUALITY_MEDIUM; static var CHANNEL_BLACKLIST = {UCczhp4wznQWonO7Pb8HQ2MQ:true, UCl8dMTqDrJQ0c8y23UBu4kQ:true}; }
Symbol 20484 MovieClip [__Packages.com.google.youtube.tv.components.TransportComponent] Frame 0
class com.google.youtube.tv.components.TransportComponent extends com.google.youtube.tv.components.BaseComponent { var videoComponent, currentPlaylist, backgroundClickDelegate, adsService, header, clip, buttons, homeButton, searchButton, prevButton, rewindButton, playPauseButton, forwardButton, nextButton, ccButton, flagButton, width, progressBar, navButtonDown, navButtonUp, timeTextCurrent, timeTextDuration, hideControlsTimeout, enabled, isVisible, setVisible, adActive, pop, subtitleController, timeoutHandler, dialog; function TransportComponent (parent, videoComponent, currentPlaylist) { super(parent, "transport"); this.videoComponent = videoComponent; this.currentPlaylist = currentPlaylist; } function build() { currentPlaylist.vmap(com.google.chianti.event.EventDelegate.create(this, onLocationChanged)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_PROGRESS, com.google.chianti.event.EventDelegate.create(this, onVideoPlayerProgress)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_STATE_CHANGE, com.google.chianti.event.EventDelegate.create(this, onVideoPlayerStateChange)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_REMOTE_PLAYER_CONTROL, com.google.chianti.event.EventDelegate.create(this, onRemotePlayerControl)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.SUBTITLES_EVENT, com.google.chianti.event.EventDelegate.create(this, onSubtitlesEvent)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.TOGGLE_PAUSE, com.google.chianti.event.EventDelegate.create(this, onTogglePauseEvent)); backgroundClickDelegate = com.google.chianti.event.EventDelegate.create(this, onBackgroundClick); adsService = com.google.youtube.tv.ads.AdsService.getInstance(); adsService.adState.filter(function (value) { return((value == com.google.youtube.tv.ads.AdsService.AD_STATE_PLAY) || ((value == com.google.youtube.tv.ads.AdsService.AD_STATE_COMPLETE) || (value == com.google.youtube.tv.ads.AdsService.AD_STATE_ERROR))); }).emap(com.google.chianti.event.EventDelegate.create(this, onAdState)); adsService.adProgress.filter(com.google.chianti.event.EventDelegate.create(this, progressFilter)).emap(com.google.chianti.event.EventDelegate.create(this, updateAdTime)); adsService.adProgress.filter(com.google.chianti.event.EventDelegate.create(this, showControlsWhenCanSkipFilter)).emap(com.google.chianti.event.EventDelegate.create(this, showControls)); header = new com.google.youtube.tv.view.TransportHeaderView(clip); buttons = []; homeButton = createButton(HOME, "playerHomeIcon"); searchButton = createButton(SEARCH, "searchIcon"); prevButton = createButton(PREV, "playerPrevIcon"); rewindButton = createButton(REWIND, "playerRewindIcon"); playPauseButton = createButton(PLAY_PAUSE, "playerPlayIcon"); forwardButton = createButton(FORWARD, "playerForwardIcon"); nextButton = createButton(NEXT, "playerNextIcon"); if (!com.google.youtube.tv.platform.Box.isFeatureBlocked(com.google.youtube.tv.platform.Box.FEATURE_CAPTIONS)) { ccButton = createButton(SUBTITLES, "playerCcIcon"); } flagButton = createButton(FLAG, "playerFlagIcon"); width = (buttons.length * (BUTTON_WIDTH + BUTTON_MARGIN)) + BUTTON_MARGIN; var _local2 = (Stage.width / 2) - (width / 2); var _local3 = _local2 + BUTTON_MARGIN; var _local4 = 0; for ( ; _local4 < buttons.length ; _local4++) { com.google.youtube.tv.view.ui.TransportButton(buttons[_local4]).setPos(_local3, ((Y + PROGRESS_BAR_MARGIN) + PROGRESS_BAR_HEIGHT) + BUTTON_MARGIN); _local3 = _local3 + (BUTTON_WIDTH + BUTTON_MARGIN); } com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, _local2, Y, width, HEIGHT, 1, com.google.youtube.tv.ui.Colors.WHITE, 10, {start:com.google.youtube.tv.ui.Colors.BLACK, end:com.google.youtube.tv.ui.Colors.BLACK, alphas:[50, 80], angle:90}); progressBar = new com.google.youtube.tv.ui.ProgressBar(clip, _local2 + PROGRESS_BAR_MARGIN, Y + PROGRESS_BAR_MARGIN, width - (2 * PROGRESS_BAR_MARGIN), PROGRESS_BAR_HEIGHT, com.google.youtube.tv.ui.Colors.PROGRESS_RED); navButtonDown = new com.google.youtube.tv.view.ui.PageNavigationButton(clip, com.google.youtube.tv.view.ui.PageNavigationButton.DOWN, com.google.youtube.tv.view.ui.PageNavigationButton.LABEL_RIGHT, com.google.youtube.tv.ui.Colors.WHITE); navButtonDown.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.INFO_PANEL)); navButtonDown.setPos((Stage.width / 2) + (NAV_BUTTON_GAP / 2), (Stage.height - navButtonDown.getHeight()) - MARGIN_V); navButtonDown.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onNavigationButtonClick)); navButtonUp = new com.google.youtube.tv.view.ui.PageNavigationButton(clip, com.google.youtube.tv.view.ui.PageNavigationButton.UP, com.google.youtube.tv.view.ui.PageNavigationButton.LABEL_LEFT, com.google.youtube.tv.ui.Colors.WHITE); navButtonUp.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.BACK_BTN)); navButtonUp.setPos(((Stage.width / 2) - (NAV_BUTTON_GAP / 2)) - com.google.youtube.tv.view.ui.PageNavigationButton.SIZE, (Stage.height - navButtonDown.getHeight()) - MARGIN_V); navButtonUp.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onNavigationButtonClick)); timeTextCurrent = new com.google.youtube.tv.ui.Text(clip, null, com.google.youtube.tv.ui.Font.getFontSizeForHeight(TIME_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.BADGE_TEXT); timeTextCurrent.setPos(_local2 + TIME_MARGIN_H, ((Y + PROGRESS_BAR_MARGIN) + PROGRESS_BAR_HEIGHT) + TIME_MARGIN_V); timeTextDuration = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(((_local2 + width) - TIME_MAX_WIDTH) - TIME_MARGIN_H, ((Y + PROGRESS_BAR_MARGIN) + PROGRESS_BAR_HEIGHT) + TIME_MARGIN_V, TIME_MAX_WIDTH, com.google.youtube.tv.ui.Font.getComponentHeight(TIME_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(TIME_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); timeTextDuration.setAlign("right"); timeTextDuration.setWidth(TIME_MAX_WIDTH); hideControlsTimeout = com.google.youtube.util.Scheduler.setTimeout(com.google.youtube.tv.app.Config.UI_TIMEOUT, com.google.chianti.event.EventDelegate.create(this, hideControls)); } function createButton(command, iconId) { var _local4 = new com.google.youtube.tv.view.ui.TransportButton(clip, BUTTON_WIDTH, BUTTON_HEIGHT, command, iconId); _local4.setUsingKeys(false); _local4.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onButtonMouseClick)); _local4.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.USER_ACTIVITY, com.google.chianti.event.EventDelegate.create(this, onButtonUserActivity)); buttons.push(_local4); return(_local4); } function progressFilter() { return(enabled); } function activate() { if (!initialized) { build(); initialized = true; } resetState(); if (visible) { showControls(); } else { hideControls(); } if (com.google.youtube.tv.platform.Box.hasMouse()) { videoComponent.registerEvent(com.google.youtube.tv.components.VideoComponent.MOUSE_CLICK, backgroundClickDelegate); } } function deactivate() { hideDialog(); if (isVisible()) { hideControls(); visible = true; } if (com.google.youtube.tv.platform.Box.hasMouse()) { videoComponent.unregisterEvent(com.google.youtube.tv.components.VideoComponent.MOUSE_CLICK, backgroundClickDelegate); } } function showControls() { visible = true; setVisible(true); updateTime(); updateButtons(); hideControlsTimeout.restart(); } function hideControls() { visible = false; setVisible(false); hideControlsTimeout.stop(); } function getPlaybackRestriction() { return(undefined); } function getActiveButton() { var _local2 = 0; for ( ; _local2 < buttons.length ; _local2++) { var _local3 = buttons[_local2]; if (_local3.getIsActive()) { return(_local3); } } return(null); } function setActiveButton(button) { var _local3 = 0; for ( ; _local3 < buttons.length ; _local3++) { var _local4 = buttons[_local3]; _local4.setIsActive(_local4 == button); } if (button) { hideControlsTimeout.restart(); } } function getButtonByCommand(command) { var _local3 = 0; for ( ; _local3 < buttons.length ; _local3++) { var _local4 = buttons[_local3]; if (_local4.getCommand() == command) { return(_local4); } } return(null); } function updateButtons() { prevButton.setEnabled(!adActive); rewindButton.setEnabled(!adActive); forwardButton.setEnabled(!adActive); nextButton.setEnabled((!adActive) || (canSkipAd)); if (ccButton) { ccButton.setEnabled(subtitlesEnabled && (!adActive)); } flagButton.setEnabled(!adActive); } function moveSelection(toTheRight) { var _local5 = 0; for ( ; _local5 < buttons.length ; _local5++) { var _local6 = buttons[_local5]; if (_local6.getIsActive()) { var _local3 = _local6; break; } } if (!_local3) { return(undefined); } if (toTheRight) { _local5++; for ( ; _local5 < buttons.length ; _local5++) { var _local7 = buttons[_local5]; if (_local7.isEnabled()) { var _local3 = _local7; break; } } } else { _local5--; for ( ; _local5 >= 0 ; _local5--) { var _local8 = buttons[_local5]; if (_local8.isEnabled()) { var _local3 = _local8; break; } } } setActiveButton(_local3); } function onButtonMouseClick(event) { var _local3 = event.target; if (isVisible() && (_local3.isEnabled())) { executeCommand(_local3.getCommand()); } } function onButtonUserActivity(event) { var _local3 = event.target; if (isVisible() && (_local3.isEnabled())) { setActiveButton(_local3); } } function executeCommand(command) { var _local3 = getButtonByCommand(command); if (_local3) { setActiveButton(_local3); } switch (command) { case PREV : hideDialog(); if (videoComponent.getCurrentTime() > 5) { videoComponent.rewind(); } else { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_PREV_VIDEO, {showtray:false, videoId:videoComponent.getCurrentVideo().getVideoId()})); } break; case REWIND : videoComponent.seekBack(); updatePlayPauseIcon(); break; case PLAY_PAUSE : if (videoComponent.isPlaying()) { videoComponent.pause(); } else { videoComponent.unpause(); } updatePlayPauseIcon(); break; case FORWARD : videoComponent.seekForward(); updatePlayPauseIcon(); break; case NEXT : hideDialog(); if (adsService.isAdActive() && (adsService.adInfo.getValue()[com.google.youtube.tv.ads.AdsService.AD_SKIPPABLE])) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_AD_SKIP)); break; } com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_NEXT_VIDEO, {showtray:false, videoId:videoComponent.getCurrentVideo().getVideoId()})); break; case FLAG : com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_FLAG_VIDEO, {videoId:videoComponent.getCurrentVideo().getVideoId()})); break; case SUBTITLES : onSubtitleButtonClick(); break; case SEARCH : pop(); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SEARCH)); break; case HOME : pop(); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SHOW_GUIDE, {home:true})); } } function handleNavigationKey(keyCode) { if (subtitleController.handleKey()) { hideControls(); return(true); } super.handleNavigationKey(keyCode); } function handleKey(keyCode) { if (subtitleController.handleKey()) { hideControls(); return(true); } switch (keyCode) { case Key.UP : if (isVisible()) { pop(); return(true); } break; case Key.LEFT : if (!isVisible()) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SHOW_TRAY)); } else { moveSelection(false); } return(true); case com.google.youtube.tv.controller.ExtendedKeys.PREVIOUS : executeCommand(PREV); return(true); case Key.DOWN : if (isVisible()) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SHOW_INFO)); return(true); } break; case Key.RIGHT : if (!isVisible()) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SHOW_TRAY)); } else { moveSelection(true); } return(true); case com.google.youtube.tv.controller.ExtendedKeys.NEXT : executeCommand(NEXT); return(true); case com.google.youtube.tv.controller.ExtendedKeys.BACK : case Key.ESCAPE : hideControls(); return(true); case Key.ENTER : case Key.SPACE : if (!isVisible()) { resetState(); } else if (getActiveButton()) { executeCommand(getActiveButton().getCommand()); if (!enabled) { return(true); } } break; case com.google.youtube.tv.controller.ExtendedKeys.PLAY : if (!videoComponent.isPlaying()) { executeCommand(PLAY_PAUSE); resetState(); } break; case com.google.youtube.tv.controller.ExtendedKeys.PAUSE : if (videoComponent.isPlaying() || (com.google.youtube.tv.platform.Box.getVendor() != com.google.youtube.tv.platform.Box.VENDOR_LG)) { executeCommand(PLAY_PAUSE); resetState(); } break; case com.google.youtube.tv.controller.ExtendedKeys.FAST_FORWARD : case com.google.youtube.tv.controller.ExtendedKeys.SKIP_FORWARD : executeCommand(FORWARD); break; case com.google.youtube.tv.controller.ExtendedKeys.REWIND : case com.google.youtube.tv.controller.ExtendedKeys.SKIP_BACKWARD : executeCommand(REWIND); break; case com.google.youtube.tv.controller.ExtendedKeys.STOP : case com.google.youtube.tv.controller.ExtendedKeys.S : videoComponent.pause(); resetState(); break; default : return(false); } showControls(); return(true); } function updatePlayPauseIcon() { playPauseButton.setIconId((videoComponent.isPlaying() ? "playerPauseIcon" : "playerPlayIcon")); } function updateSubtitles(enabled, selected) { subtitlesEnabled = enabled; updateButtons(); ccButton.setSelected(selected); } function resetState() { updatePlayPauseIcon(); updateButtons(); setActiveButton(playPauseButton); } function onBackgroundClick() { if (isVisible()) { hideControls(); } else { handleKey(Key.ENTER); } } function onNavigationButtonClick(event) { switch (event.target) { case navButtonDown : handleKey(Key.DOWN); break; case navButtonUp : handleKey(Key.UP); } } function onVideoPlayerStateChange(event) { updatePlayPauseIcon(); } function onRemotePlayerControl(event) { if (event.playerAction != "SEEKTO") { executeCommand(event.playerAction); } else { videoComponent.seekTo(event.seekToTime); } } function onVideoPlayerProgress(event) { percentLoaded = event.loaded; if ((!_global.isNaN(event.duration)) && (event.duration > 0)) { duration = event.duration; } else { duration = 0; } currentTime = event.currentTime; if (isVisible()) { updateTime(); } } function onSubtitleButtonClick() { if (!subtitlesEnabled) { return(undefined); } if (subtitleController.buttonToggle()) { updateSubtitles(ccButton.isSelected(), !ccButton.isSelected()); } else { hideControls(); } } function onSubtitlesEvent(event) { if (event.action == "onSubtitlesDataLoaded") { updateSubtitles(event.available, event.available); } } function onTogglePauseEvent(event) { handleKey(com.google.youtube.tv.controller.ExtendedKeys.PAUSE); } function onAdState() { adActive = adsService.isAdActive(); progressBar.setProgressColor((adActive ? (com.google.youtube.tv.ui.Colors.AD_COLOR) : (com.google.youtube.tv.ui.Colors.PROGRESS_RED))); updateTime(); updateAdTime(adsService.adProgress.getValue()); updateButtons(); } function updateAdTime(progress) { updateProgressBar(progress[com.google.youtube.tv.ads.AdsService.AD_DURATION], progress[com.google.youtube.tv.ads.AdsService.AD_CURRENT_TIME], progress[com.google.youtube.tv.ads.AdsService.AD_PERCENT_LOADED]); updateTextForTiming(progress[com.google.youtube.tv.ads.AdsService.AD_DURATION], progress[com.google.youtube.tv.ads.AdsService.AD_CURRENT_TIME]); } function showControlsWhenCanSkipFilter(progress) { var _local3 = (!canSkipAd) && (adsService.canSkipAd()); canSkipAd = adsService.canSkipAd(); return(_local3); } function updateTime() { if (adActive) { return(undefined); } updateProgressBar(duration, currentTime, percentLoaded); updateTextForTiming(duration, currentTime); } function updateProgressBar(duration, currentTime, percentLoaded) { progressBar.setBuffer(percentLoaded); if (duration) { progressBar.setProgress(100 * (currentTime / duration)); } else { progressBar.setProgress(0); } } function updateTextForTiming(duration, currentTime) { if (duration) { timeTextCurrent.setText(com.google.youtube.util.StringUtil.secondsToTimeString(Math.floor(currentTime))); timeTextDuration.setText(com.google.youtube.util.StringUtil.secondsToTimeString(Math.floor(duration))); } else { timeTextCurrent.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.LOADING)); timeTextDuration.setText(""); } } function showErrorDialog(timeoutHandler, description) { var _local4 = currentPlaylist.getIndex() == (currentPlaylist.getNode().getChildrenCount() - 1); var _local5 = description || (com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.ERROR_VIDEO_PLAYBACK)); _local5 = _local5 + newline; _local5 = _local5 + (_local4 ? (com.google.youtube.tv.services.MessagesService.get().getMsg(com.google.youtube.tv.services.MessagesService.ERROR_MESSAGE_TIMEOUT, {DIALOG_TIMEOUT:"DIALOG_TIMEOUT"})) : (com.google.youtube.tv.services.MessagesService.get().getMsg(com.google.youtube.tv.services.MessagesService.ERROR_AUTOPLAY_MESSAGE, {DIALOG_TIMEOUT:"DIALOG_TIMEOUT"}))); showDialog(_local5, timeoutHandler); } function showDialog(message, opt_timeoutHandler) { hideDialog(); timeoutHandler = opt_timeoutHandler; dialog = new com.google.youtube.tv.view.ui.DialogOld(clip, message, 0, "", "", "left", com.google.youtube.tv.app.Config.UI_TIMEOUT / 1000, false, null, false, true); dialog.setPos(null, 200 * com.google.youtube.tv.app.Config.SCALE); if (timeoutHandler) { dialog.registerEvent(com.google.youtube.tv.view.ui.DialogOld.DIALOG_TIMEOUT, timeoutHandler); } if (enabled) { showControls(); } } function hideDialog() { if (dialog) { if (timeoutHandler) { dialog.unregisterEvent(com.google.youtube.tv.view.ui.DialogOld.DIALOG_TIMEOUT, timeoutHandler); timeoutHandler = null; } dialog.destroy(); dialog = null; } } function onLocationChanged() { updateSubtitles(true, false); resetState(); header.setVideoNode(com.google.youtube.tv.tree.VideoNode(currentPlaylist.getValue())); if (enabled) { showControls(); } } function toString() { return("TransportComponent"); } static var HOME = "HOME"; static var SEARCH = "SEARCH"; static var PREV = "PREV"; static var REWIND = "REWIND"; static var PLAY_PAUSE = "PLAY_PAUSE"; static var FORWARD = "FORWARD"; static var NEXT = "NEXT"; static var SUBTITLES = "SUBTITLES"; static var FLAG = "FLAG"; static var MARGIN_V = 44 * com.google.youtube.tv.app.Config.SCALE; static var Y = 505 * com.google.youtube.tv.app.Config.SCALE_Y; static var HEIGHT = 101 * com.google.youtube.tv.app.Config.SCALE; static var PROGRESS_BAR_MARGIN = 1; static var PROGRESS_BAR_HEIGHT = 12 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_HEIGHT = 73 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_WIDTH = 68 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_MARGIN = (((HEIGHT - PROGRESS_BAR_HEIGHT) - PROGRESS_BAR_MARGIN) - BUTTON_HEIGHT) / 2; static var TIME_LINE_HEIGHT = 10; static var TIME_MARGIN_V = 4 * com.google.youtube.tv.app.Config.SCALE; static var TIME_MARGIN_H = 7 * com.google.youtube.tv.app.Config.SCALE; static var TIME_MAX_WIDTH = 100 * com.google.youtube.tv.app.Config.SCALE; static var NAV_BUTTON_GAP = 20 * com.google.youtube.tv.app.Config.SCALE; var percentLoaded = 0; var duration = 0; var currentTime = 0; var canSkipAd = false; var initialized = false; var visible = true; var subtitlesEnabled = true; }
Symbol 20485 MovieClip [__Packages.ArrayParam] Frame 0
class ArrayParam { function ArrayParam () { } //ASSetPropFlags(_local1, null, 1); }
Symbol 20486 MovieClip [__Packages.com.google.youtube.tv.components.DialogBase] Frame 0
class com.google.youtube.tv.components.DialogBase extends com.google.youtube.tv.components.BaseComponent { var enabled, broadcast, backButton, clip, background, pop; function DialogBase (parent) { super(parent, "dialogBase"); } function enable(value) { if (enabled == value) { return(undefined); } build(); super.enable(value); if (!enabled) { broadcast({type:CLOSE}); } } function build() { if (initialized) { return(undefined); } initialized = true; backButton = new com.google.youtube.tv.components.MenuControlButton(clip, BACK_WIDTH, BACK_HEIGHT, "backIcon"); backButton.setPos(BACK_X, BACK_Y); backButton.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.BACK_BTN)); background = new com.google.youtube.tv.ui.Rect(clip, new flash.geom.Rectangle(0, MARGIN_V, Stage.width, Stage.height - (2 * MARGIN_V)), com.google.youtube.tv.ui.Colors.BLACK); } function show() { com.google.youtube.tv.controller.Switcher.getSwitcher().switchTo(this); } function getPlaybackRestriction() { return(com.google.youtube.tv.components.BaseComponent.PAUSE_PLAYBACK); } function needsBackground() { return(true); } function handleNavigationKey(keyCode) { if ((keyCode == Key.ESCAPE) || (keyCode == com.google.youtube.tv.controller.ExtendedKeys.BACK)) { pop(); return(true); } return(false); } function clear() { } function remove() { if (!background) { return(undefined); } background.remove(); background = null; backButton.remove(); backButton = null; super.remove(); } function toString() { return("DialogBase"); } static var CLOSE = "CLOSE"; static var MARGIN_V = 120 * com.google.youtube.tv.app.Config.SCALE; static var BACK_X = 65 * com.google.youtube.tv.app.Config.SCALE; static var BACK_Y = 44 * com.google.youtube.tv.app.Config.SCALE; static var BACK_WIDTH = 236 * com.google.youtube.tv.app.Config.SCALE; static var BACK_HEIGHT = 44 * com.google.youtube.tv.app.Config.SCALE; static var CONTENT_X = 225 * com.google.youtube.tv.app.Config.SCALE; static var CONTENT_Y = 180 * com.google.youtube.tv.app.Config.SCALE; static var CONTENT_WIDTH = Stage.width - (2 * CONTENT_X); static var CONTENT_MAX_HEIGHT = (Stage.height - CONTENT_Y) - MARGIN_V; var initialized = false; }
Symbol 20487 MovieClip [__Packages.com.google.youtube.tv.view.ui.UIComponentBase] Frame 0
class com.google.youtube.tv.view.ui.UIComponentBase extends com.google.youtube.tv.ui.View { var width, height, componentBackground, clip, mouseWheelDelegate, delayedActivationId, setVisible, broadcast; function UIComponentBase (container, componentWidth, componentHeight) { super(container, "uicb"); width = componentWidth || (width); height = componentHeight || (height); componentBackground = clip.createEmptyMovieClip("componentBackground", clip.getNextHighestDepth()); com.google.youtube.tv.ui.View.disableFocusRect(componentBackground); mouseWheelDelegate = com.google.chianti.event.EventDelegate.create(this, onMouseWheel); } function setIsActive(value) { if (isActive == value) { return(undefined); } isActive = value; if (usingKeys) { delayedActivation(isActive); } } function delayedActivation(isActive) { if (isActive) { var _local3 = function (id, context) { Key.addListener(context); _global.clearTimeout(id); }; delayedActivationId = _global.setTimeout(_local3, 100, delayedActivationId, this); } else { _global.clearTimeout(delayedActivationId); Key.removeListener(this); } } function getIsActive() { return(isActive); } function setUsingKeys(value) { if (usingKeys == value) { return(undefined); } usingKeys = value; if (isActive) { delayedActivation(usingKeys); } } function setSize(width, height) { this.width = width; this.height = height; } function show() { setVisible(true); } function hide() { setVisible(false); } function getRect() { return(new flash.geom.Rectangle(clip._x, clip._y, width || (clip._width), height || (clip._height))); } function getWidth() { return(width || (clip._width)); } function getHeight() { return(height || (clip._height)); } function remove() { setIsActive(false); super.remove(); } function build() { } function drawRectangle(canvas, x, y, width, height, borderThickness, borderColor, borderAlpha, fillColor, fillAlpha, radius) { com.google.youtube.tv.util.DrawUtil.drawRectangle(canvas, x, y, width, height, borderThickness, borderColor, borderAlpha, fillColor, fillAlpha, radius); } function onKeyDown() { } function onKeyUp() { } function onMouseWheel(e) { switch (mouseWheelMode) { default : mouseWheelMode === MOUSE_WHEEL_MODE_ALWAYS; case MOUSE_WHEEL_MODE_ALWAYS : case !(mouseWheelMode === MOUSE_WHEEL_MODE_WHEN_ACTIVE)MOUSE_WHEEL_MODE_WHEN_ACTIVE : } if (isActive) { if (e.delta > 0) { onKeyUp(Key.DOWN); } else if (e.delta < 0) { onKeyUp(Key.UP); } } } function enableMouseWheel(mode) { mouseWheelMode = mode; if (mode) { com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.MOUSE_WHEEL, mouseWheelDelegate); } else { com.google.youtube.tv.wiring.EventBus.unregisterForEvent(com.google.youtube.tv.wiring.AppEvent.MOUSE_WHEEL, mouseWheelDelegate); } } function dispatchOutbound(type) { if (!type) { if (Key.getCode() == Key.LEFT) { type = OUTBOUND_LEFT; } else if (Key.getCode() == Key.RIGHT) { type = OUTBOUND_RIGHT; } else if (Key.getCode() == Key.UP) { type = OUTBOUND_TOP; } else if (Key.getCode() == Key.DOWN) { type = OUTBOUND_BOTTOM; } } if (type) { broadcast({type:type}); } } function dispatchUserActivity() { broadcast({type:USER_ACTIVITY}); } static var CHANGE = "CHANGE"; static var OUTBOUND_BOTTOM = "OUTBOUND_BOTTOM"; static var OUTBOUND_LEFT = "OUTBOUND_LEFT"; static var OUTBOUND_RIGHT = "OUTBOUND_RIGHT"; static var OUTBOUND_TOP = "OUTBOUND_TOP"; static var USER_ACTIVITY = "USER_ACTIVITY"; static var MOUSE_WHEEL_MODE_DISABLED = 0; static var MOUSE_WHEEL_MODE_WHEN_ACTIVE = 1; static var MOUSE_WHEEL_MODE_ALWAYS = 2; var enclosedNavigation = true; var usingKeys = true; var isActive = false; var mouseWheelMode = MOUSE_WHEEL_MODE_DISABLED; }
Symbol 20488 MovieClip [__Packages.com.google.youtube.tv.view.ui.PairingUpsell] Frame 0
class com.google.youtube.tv.view.ui.PairingUpsell extends com.google.youtube.tv.view.ui.UIComponentBase { var symbol, clip, width, text, button, getHeight, isActive, dispatchOutbound; function PairingUpsell (container, componentWidth) { super(container, componentWidth); build(); } function build() { symbol = new com.google.youtube.tv.ui.Symbol(clip, "searchPairingIcon", true); symbol.setPos((width - MARGIN) - symbol.getWidth(), MARGIN); text = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(MARGIN, MARGIN, (width - (3 * MARGIN)) - symbol.getWidth(), MARGIN)); text.setMultiline(true); text.setAutoSize(true); text.setHtmlText(((((((("<font size='" + com.google.youtube.tv.ui.Font.getFontSizeForHeight(TITLE_LINE_HEIGHT * com.google.youtube.tv.app.Config.SCALE)) + "'>") + com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.PAIRING_UPSELL_TITLE)) + "</font><br><br><font size='") + com.google.youtube.tv.ui.Font.getFontSizeForHeight(LINE_HEIGHT * com.google.youtube.tv.app.Config.SCALE)) + "'>") + com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.PAIRING_UPSELL_MESSAGE)) + "</font>"); button = new com.google.youtube.tv.view.ui.Button(clip, BUTTON_WIDTH, BUTTON_HEIGHT); button.setPos(MARGIN, (text.getPos().y + text.getHeight()) + (MARGIN / 2)); button.initText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.PAIRING_TRY), LINE_HEIGHT); if (button.getTextView().isTruncated()) { button.setSize(text.getWidth(), BUTTON_HEIGHT); } button.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onButtonClick)); com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, width, getHeight() + (2 * MARGIN), 0, 0, 0, com.google.youtube.tv.ui.Colors.BLACK, 50); } function setIsActive(value) { if (isActive == value) { return(undefined); } super.setIsActive(value); button.setIsActive(value); } function onKeyUp() { dispatchOutbound(); } function onButtonClick() { com.google.youtube.tv.services.StatsLoggerService.getInstance().recordPairFromUpsell(); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_PAIR)); } function toString() { return("PairingUpsell"); } static var MARGIN = 40 * com.google.youtube.tv.app.Config.SCALE; static var TITLE_LINE_HEIGHT = 29; static var LINE_HEIGHT = 16; static var BUTTON_WIDTH = 220 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_HEIGHT = 60 * com.google.youtube.tv.app.Config.SCALE; static var SYMBOL_WIDTH = 274 * com.google.youtube.tv.app.Config.SCALE; }
Symbol 20489 MovieClip [__Packages.com.adobe.crypto.MD5] Frame 0
class com.adobe.crypto.MD5 { function MD5 () { } static function hash(s) { var _local3 = 1732584193 /* 0x67452301 */; var _local4 = -271733879; var _local5 = -1732584194; var _local6 = 271733878 /* 0x10325476 */; var _local11 = createBlocks(s); var _local12 = _local11.length; var _local13 = 0; for ( ; _local13 < _local12 ; _local13 = _local13 + 16) { var _local14 = _local13; for ( ; _local14 < (_local13 + 16) ; _local14++) { if (_local11[_local14] == undefined) { _local11[_local14] = 0; } } var _local7 = _local3; var _local8 = _local4; var _local9 = _local5; var _local10 = _local6; _local3 = ff(_local3, _local4, _local5, _local6, _local11[_local13 + 0], 7, -680876936); _local6 = ff(_local6, _local3, _local4, _local5, _local11[_local13 + 1], 12, -389564586); _local5 = ff(_local5, _local6, _local3, _local4, _local11[_local13 + 2], 17, 606105819); _local4 = ff(_local4, _local5, _local6, _local3, _local11[_local13 + 3], 22, -1044525330); _local3 = ff(_local3, _local4, _local5, _local6, _local11[_local13 + 4], 7, -176418897); _local6 = ff(_local6, _local3, _local4, _local5, _local11[_local13 + 5], 12, 1200080426); _local5 = ff(_local5, _local6, _local3, _local4, _local11[_local13 + 6], 17, -1473231341); _local4 = ff(_local4, _local5, _local6, _local3, _local11[_local13 + 7], 22, -45705983); _local3 = ff(_local3, _local4, _local5, _local6, _local11[_local13 + 8], 7, 1770035416); _local6 = ff(_local6, _local3, _local4, _local5, _local11[_local13 + 9], 12, -1958414417); _local5 = ff(_local5, _local6, _local3, _local4, _local11[_local13 + 10], 17, -42063); _local4 = ff(_local4, _local5, _local6, _local3, _local11[_local13 + 11], 22, -1990404162); _local3 = ff(_local3, _local4, _local5, _local6, _local11[_local13 + 12], 7, 1804603682); _local6 = ff(_local6, _local3, _local4, _local5, _local11[_local13 + 13], 12, -40341101); _local5 = ff(_local5, _local6, _local3, _local4, _local11[_local13 + 14], 17, -1502002290); _local4 = ff(_local4, _local5, _local6, _local3, _local11[_local13 + 15], 22, 1236535329); _local3 = gg(_local3, _local4, _local5, _local6, _local11[_local13 + 1], 5, -165796510); _local6 = gg(_local6, _local3, _local4, _local5, _local11[_local13 + 6], 9, -1069501632); _local5 = gg(_local5, _local6, _local3, _local4, _local11[_local13 + 11], 14, 643717713); _local4 = gg(_local4, _local5, _local6, _local3, _local11[_local13 + 0], 20, -373897302); _local3 = gg(_local3, _local4, _local5, _local6, _local11[_local13 + 5], 5, -701558691); _local6 = gg(_local6, _local3, _local4, _local5, _local11[_local13 + 10], 9, 38016083); _local5 = gg(_local5, _local6, _local3, _local4, _local11[_local13 + 15], 14, -660478335); _local4 = gg(_local4, _local5, _local6, _local3, _local11[_local13 + 4], 20, -405537848); _local3 = gg(_local3, _local4, _local5, _local6, _local11[_local13 + 9], 5, 568446438); _local6 = gg(_local6, _local3, _local4, _local5, _local11[_local13 + 14], 9, -1019803690); _local5 = gg(_local5, _local6, _local3, _local4, _local11[_local13 + 3], 14, -187363961); _local4 = gg(_local4, _local5, _local6, _local3, _local11[_local13 + 8], 20, 1163531501); _local3 = gg(_local3, _local4, _local5, _local6, _local11[_local13 + 13], 5, -1444681467); _local6 = gg(_local6, _local3, _local4, _local5, _local11[_local13 + 2], 9, -51403784); _local5 = gg(_local5, _local6, _local3, _local4, _local11[_local13 + 7], 14, 1735328473); _local4 = gg(_local4, _local5, _local6, _local3, _local11[_local13 + 12], 20, -1926607734); _local3 = hh(_local3, _local4, _local5, _local6, _local11[_local13 + 5], 4, -378558); _local6 = hh(_local6, _local3, _local4, _local5, _local11[_local13 + 8], 11, -2022574463); _local5 = hh(_local5, _local6, _local3, _local4, _local11[_local13 + 11], 16, 1839030562); _local4 = hh(_local4, _local5, _local6, _local3, _local11[_local13 + 14], 23, -35309556); _local3 = hh(_local3, _local4, _local5, _local6, _local11[_local13 + 1], 4, -1530992060); _local6 = hh(_local6, _local3, _local4, _local5, _local11[_local13 + 4], 11, 1272893353); _local5 = hh(_local5, _local6, _local3, _local4, _local11[_local13 + 7], 16, -155497632); _local4 = hh(_local4, _local5, _local6, _local3, _local11[_local13 + 10], 23, -1094730640); _local3 = hh(_local3, _local4, _local5, _local6, _local11[_local13 + 13], 4, 681279174); _local6 = hh(_local6, _local3, _local4, _local5, _local11[_local13 + 0], 11, -358537222); _local5 = hh(_local5, _local6, _local3, _local4, _local11[_local13 + 3], 16, -722521979); _local4 = hh(_local4, _local5, _local6, _local3, _local11[_local13 + 6], 23, 76029189); _local3 = hh(_local3, _local4, _local5, _local6, _local11[_local13 + 9], 4, -640364487); _local6 = hh(_local6, _local3, _local4, _local5, _local11[_local13 + 12], 11, -421815835); _local5 = hh(_local5, _local6, _local3, _local4, _local11[_local13 + 15], 16, 530742520); _local4 = hh(_local4, _local5, _local6, _local3, _local11[_local13 + 2], 23, -995338651); _local3 = ii(_local3, _local4, _local5, _local6, _local11[_local13 + 0], 6, -198630844); _local6 = ii(_local6, _local3, _local4, _local5, _local11[_local13 + 7], 10, 1126891415); _local5 = ii(_local5, _local6, _local3, _local4, _local11[_local13 + 14], 15, -1416354905); _local4 = ii(_local4, _local5, _local6, _local3, _local11[_local13 + 5], 21, -57434055); _local3 = ii(_local3, _local4, _local5, _local6, _local11[_local13 + 12], 6, 1700485571); _local6 = ii(_local6, _local3, _local4, _local5, _local11[_local13 + 3], 10, -1894986606); _local5 = ii(_local5, _local6, _local3, _local4, _local11[_local13 + 10], 15, -1051523); _local4 = ii(_local4, _local5, _local6, _local3, _local11[_local13 + 1], 21, -2054922799); _local3 = ii(_local3, _local4, _local5, _local6, _local11[_local13 + 8], 6, 1873313359); _local6 = ii(_local6, _local3, _local4, _local5, _local11[_local13 + 15], 10, -30611744); _local5 = ii(_local5, _local6, _local3, _local4, _local11[_local13 + 6], 15, -1560198380); _local4 = ii(_local4, _local5, _local6, _local3, _local11[_local13 + 13], 21, 1309151649); _local3 = ii(_local3, _local4, _local5, _local6, _local11[_local13 + 4], 6, -145523070); _local6 = ii(_local6, _local3, _local4, _local5, _local11[_local13 + 11], 10, -1120210379); _local5 = ii(_local5, _local6, _local3, _local4, _local11[_local13 + 2], 15, 718787259); _local4 = ii(_local4, _local5, _local6, _local3, _local11[_local13 + 9], 21, -343485551); _local3 = _local3 + _local7; _local4 = _local4 + _local8; _local5 = _local5 + _local9; _local6 = _local6 + _local10; } return(((com.adobe.utils.IntUtil.toHex(_local3) + com.adobe.utils.IntUtil.toHex(_local4)) + com.adobe.utils.IntUtil.toHex(_local5)) + com.adobe.utils.IntUtil.toHex(_local6)); } static function f(x, y, z) { return((x & y) | ((x ^ -1) & z)); } static function g(x, y, z) { return((x & z) | (y & (z ^ -1))); } static function h(x, y, z) { return((x ^ y) ^ z); } static function i(x, y, z) { return(y ^ (x | (z ^ -1))); } static function transform(func, a, b, c, d, x, s, t) { var _local10 = ((a + Number(func(b, c, d))) + x) + t; return(com.adobe.utils.IntUtil.rol(_local10, s) + b); } static function ff(a, b, c, d, x, s, t) { return(transform(f, a, b, c, d, x, s, t)); } static function gg(a, b, c, d, x, s, t) { return(transform(g, a, b, c, d, x, s, t)); } static function hh(a, b, c, d, x, s, t) { return(transform(h, a, b, c, d, x, s, t)); } static function ii(a, b, c, d, x, s, t) { return(transform(i, a, b, c, d, x, s, t)); } static function createBlocks(s) { var _local3 = new Array(); var _local4 = s.length * 8; var _local5 = 255; var _local6 = 0; for ( ; _local6 < _local4 ; _local6 = _local6 + 8) { _local3[_local6 >> 5] = _local3[_local6 >> 5] | ((s.charCodeAt(_local6 / 8) & _local5) << (_local6 % 32)); } _local3[_local4 >> 5] = _local3[_local4 >> 5] | (128 << (_local4 % 32)); _local3[(((_local4 + 64) >>> 9) << 4) + 14] = _local4; return(_local3); } }
Symbol 20490 MovieClip [__Packages.com.adobe.serialization.json.JSONTokenizer] Frame 0
class com.adobe.serialization.json.JSONTokenizer { var jsonString, loc, ch; function JSONTokenizer (s) { jsonString = s; loc = 0; nextChar(); } function getNextToken() { var _local2 = new com.adobe.serialization.json.JSONToken(); skipIgnored(); switch (ch) { case "{" : _local2.type = com.adobe.serialization.json.JSONTokenType.LEFT_BRACE; _local2.value = "{"; nextChar(); break; case "}" : _local2.type = com.adobe.serialization.json.JSONTokenType.RIGHT_BRACE; _local2.value = "}"; nextChar(); break; case "[" : _local2.type = com.adobe.serialization.json.JSONTokenType.LEFT_BRACKET; _local2.value = "["; nextChar(); break; case "]" : _local2.type = com.adobe.serialization.json.JSONTokenType.RIGHT_BRACKET; _local2.value = "]"; nextChar(); break; case "," : _local2.type = com.adobe.serialization.json.JSONTokenType.COMMA; _local2.value = ","; nextChar(); break; case ":" : _local2.type = com.adobe.serialization.json.JSONTokenType.COLON; _local2.value = ":"; nextChar(); break; case "t" : var _local3 = (("t" + nextChar()) + nextChar()) + nextChar(); if (_local3 == "true") { _local2.type = com.adobe.serialization.json.JSONTokenType.TRUE; _local2.value = true; nextChar(); } else { parseError("Expecting 'true' but found " + _local3); } break; case "f" : var _local4 = ((("f" + nextChar()) + nextChar()) + nextChar()) + nextChar(); if (_local4 == "false") { _local2.type = com.adobe.serialization.json.JSONTokenType.FALSE; _local2.value = false; nextChar(); } else { parseError("Expecting 'false' but found " + _local4); } break; case "n" : var _local5 = (("n" + nextChar()) + nextChar()) + nextChar(); if (_local5 == "null") { _local2.type = com.adobe.serialization.json.JSONTokenType.NULL; _local2.value = null; nextChar(); } else { parseError("Expecting 'null' but found " + _local5); } break; case "\"" : _local2 = readString(); break; default : if (isDigit(ch) || (ch == "-")) { _local2 = readNumber(); } else { if (ch == "") { return(null); } parseError(("Unexpected " + ch) + " encountered"); } } return(_local2); } function readString() { var _local2 = new com.adobe.serialization.json.JSONToken(); _local2.type = com.adobe.serialization.json.JSONTokenType.STRING; var _local3 = ""; nextChar(); while ((ch != "\"") && (ch != "")) { if (ch == "\\") { nextChar(); switch (ch) { case "\"" : _local3 = _local3 + "\""; break; case "/" : _local3 = _local3 + "/"; break; case "\\" : _local3 = _local3 + "\\"; break; case "b" : _local3 = _local3 + "\b"; break; case "f" : _local3 = _local3 + "\f"; break; case "n" : _local3 = _local3 + newline; break; case "r" : _local3 = _local3 + "\r"; break; case "t" : _local3 = _local3 + "\t"; break; case "u" : case "x" : var _local4 = ""; var _local5 = ((ch == "u") ? 4 : 2); var _local6 = 0; for ( ; _local6 < _local5 ; _local6++) { if (!isHexDigit(nextChar())) { parseError(" Excepted a hex digit, but found: " + ch); } _local4 = _local4 + ch; } _local3 = _local3 + String.fromCharCode(_global.parseInt(_local4, 16)); break; default : _local3 = _local3 + ("\\" + ch); } } else { _local3 = _local3 + ch; } nextChar(); } if (ch == "") { parseError("Unterminated string literal"); } nextChar(); _local2.value = _local3; return(_local2); } function readNumber() { var _local2 = new com.adobe.serialization.json.JSONToken(); _local2.type = com.adobe.serialization.json.JSONTokenType.NUMBER; var _local3 = ""; if (ch == "-") { _local3 = _local3 + "-"; nextChar(); } if (!isDigit(ch)) { parseError("Expecting a digit"); } if (ch == "0") { _local3 = _local3 + ch; nextChar(); if (isDigit(ch)) { parseError("A digit cannot immediately follow 0"); } } else { while (isDigit(ch)) { _local3 = _local3 + ch; nextChar(); } } if (ch == ".") { _local3 = _local3 + "."; nextChar(); if (!isDigit(ch)) { parseError("Expecting a digit"); } while (isDigit(ch)) { _local3 = _local3 + ch; nextChar(); } } if ((ch == "e") || (ch == "E")) { _local3 = _local3 + "e"; nextChar(); if ((ch == "+") || (ch == "-")) { _local3 = _local3 + ch; nextChar(); } if (!isDigit(ch)) { parseError("Scientific notation number needs exponent value"); } while (isDigit(ch)) { _local3 = _local3 + ch; nextChar(); } } var _local4 = Number(_local3); if (_global.isFinite(_local4) && (!_global.isNaN(_local4))) { _local2.value = _local4; return(_local2); } parseError(("Number " + _local4) + " is not valid!"); return(null); } function nextChar() { return((ch = jsonString.charAt(loc++))); } function skipIgnored() { skipWhite(); skipComments(); skipWhite(); } function skipComments() { if (ch == "/") { nextChar(); switch (ch) { case "/" : do { nextChar(); } while ((ch != newline) && (ch != "")); nextChar(); break; case "*" : nextChar(); while (true) { if (ch == "*") { nextChar(); if (ch == "/") { nextChar(); break; } } else { nextChar(); } if (ch == "") { parseError("Multi-line comment not closed"); } } break; default : parseError(("Unexpected " + ch) + " encountered (expecting '/' or '*' )"); } } } function skipWhite() { while (isWhiteSpace(ch)) { nextChar(); } } function isWhiteSpace(ch) { return((ch == " ") || ((ch == "\t") || (ch == newline))); } function isDigit(ch) { return((ch >= "0") && (ch <= "9")); } function isHexDigit(ch) { var _local3 = ch.toUpperCase(); return(isDigit(ch) || ((_local3 >= "A") && (_local3 <= "F"))); } function parseError(message) { throw new com.adobe.serialization.json.JSONParseError(message, loc, jsonString); } }
Symbol 20491 MovieClip [__Packages.com.google.youtube.event.ModuleEvent] Frame 0
class com.google.youtube.event.ModuleEvent { function ModuleEvent () { } static var PLAY = "onPlay"; static var PAUSE = "onPause"; static var ENABLE = "onEnable"; static var DISABLE = "onDisable"; static var ENABLE_KEYBOARD = "onEnableKeyboard"; static var DISABLE_KEYBOARD = "onDisableKeyboard"; static var ADD_MARKER = "onAddMarker"; static var DISABLE_MARKER = "onDisableMarker"; static var REMOVE_MARKER = "onRemoveMarker"; static var REMOVE_MARKERS = "onRemoveMarkers"; static var SEEK = "onSeek"; static var HIDE_END_SCREEN = "onHideEndScreen"; static var SHOW_END_SCREEN = "onShowEndScreen"; static var POST_ROLL_PRESENT = "onPostRollPresent"; static var POST_ROLL_ABSENT = "onPostRollAbsent"; static var POST_ROLL_DONE = "onPostRollDone"; static var REQUEST_UNLOAD = "onRequestUnload"; static var LOG = "onLog"; static var AD_ERROR = "onAdModuleError"; static var AD_LOADED = "onAdModuleLoaded"; static var AD_PLAYED = "onAdModulePlayed"; static var AD_PROGRESS = "onAdModuleProgress"; static var AD_COMPLETE = "onAdModuleComplete"; static var SUBTITLES_DATA_LOADED = "onSubtitlesDataLoaded"; static var SUBTITLES_SCREEN_UPDATE = "onSubtitlesScreenUpdate"; }
Symbol 20492 MovieClip [__Packages.com.google.youtube.tv.tree.TreeNode] Frame 0
class com.google.youtube.tv.tree.TreeNode { var title, children, valueStream, cobj, parent, trackingType, featureType, featureBunch; function TreeNode (title) { super(); this.title = title || ""; instanceId = instanceCounter; instanceCounter++; children = []; } function getTitle() { return(title); } function setTitle(value) { title = value; } function getThumbnailUrl() { return(null); } function getValueStream() { if (!valueStream) { createValueSteam(); } return(valueStream); } function createValueSteam() { valueStream = new com.google.youtube.tv.wiring.ValueStream("", null, [], null, this); } function canPropagate() { return(true); } function getChildren() { return(children); } function getChildrenCount() { return((children ? (children.length) : 0)); } function clear(opt_unlinkChildren) { loaded = false; loadStarted = false; needsRefresh = false; if (opt_unlinkChildren) { var _local3 = 0; for ( ; _local3 < children.length ; _local3++) { if (children[_local3].parent == this) { children[_local3].parent = null; } } } children = []; count = 0; } function refresh() { clear(); load(); } function remove() { clear(); } function getNeedsRefresh() { return(needsRefresh); } function setNeedsRefresh(value) { needsRefresh = value; } function getURL() { return(null); } function getValue() { return(getValueStream()); } function load() { } function loadMore() { } function requiresAutoLoad() { return(false); } function getData() { return(cobj); } function addItem(node, preserveParent) { if (!preserveParent) { node.parent = this; node.index = count; } children[count] = node; count = count + 1; generation++; } function addItems(treeNodes, preserveParent) { var _local4 = 0; for ( ; _local4 < treeNodes.length ; _local4++) { addItem(treeNodes[_local4], preserveParent); } } function addItemAt(node, index, preserveParent) { if (!preserveParent) { node.parent = this; } if (index < 0) { index = 0; } else if (index > children.length) { index = children.length; } node.index = index; count = count + 1; children.splice(index, 0, node); var _local5 = index + 1; for ( ; _local5 < children.length ; _local5++) { children[_local5].index++; } generation++; } function removeItem(node) { if ((!node) || (children[node.index] != node)) { return(undefined); } var _local3 = node.index; children.splice(_local3, 1); var _local4 = _local3; for ( ; _local4 < children.length ; _local4++) { children[_local4].index--; } count = count - 1; generation++; } function update(node) { if (node && ((!node.getChildrenCount()) && ((!node.loadStarted) && (node.isLoaded())))) { removeEmptyNode(node); } notify(); } function removeEmptyNode(node) { removeItem(node); } function notify() { getValueStream().update(); if (parent) { parent.update(this); } } function isTerminal() { return(false); } function isLoading() { return(loadStarted); } function isLoaded() { return(loaded); } function setLoaded(value, opt_error) { loaded = value; error = opt_error || false; if (loaded) { loadStarted = false; } } function hasErrors() { return(error); } function isMenuCapturing() { return(menuCapturing); } function setMenuCapturing(value) { menuCapturing = value; } function hasPrefetchedData() { return(false); } function shouldAlwaysRefreshMenu() { return(false); } function getUID() { return("TreeNode" + instanceId); } function getTrackingType() { return(trackingType); } function setTrackingType(value) { trackingType = value; } function getFeatureType() { return(featureType); } function getFeatureBunch() { return(featureBunch); } function setFeatureType(type, bunch) { featureType = type; featureBunch = bunch; } function isAutoAdvancing() { return(autoAdvancing); } function toString() { return((" < TreeNode n_children:" + children.length) + " > "); } static var instanceCounter = 0; static var TRACKING_TYPE_FAVORITES = "FL"; static var TRACKING_TYPE_PAID_CONTENT = "PC"; static var TRACKING_TYPE_PLAYLIST = "PL"; static var TRACKING_TYPE_RELATED = "RV"; static var TRACKING_TYPE_REMOTE_REGULAR = "RQmdx"; static var TRACKING_TYPE_REMOTE_DIAL = "RQdial"; static var TRACKING_TYPE_SEARCH = "SR"; static var TRACKING_TYPE_STANDARD = "SF"; static var TRACKING_TYPE_SUBTIVITY = "SU"; static var TRACKING_TYPE_USER_LIST = "UL"; static var TRACKING_TYPE_UPLOADS = "UU"; var instanceId = 0; static var tagsupply = 0; var count = 0; var loaded = false; var loadStarted = false; var needLoadMore = false; var error = false; var generation = 0; var autoAdvancing = true; var menuCapturing = false; var needsRefresh = false; }
Symbol 20493 MovieClip [__Packages.com.google.youtube.tv.tree.VideoContentTree] Frame 0
class com.google.youtube.tv.tree.VideoContentTree extends com.google.youtube.tv.tree.TreeNode { static var videoTreeRoot; var currentPlaylist, currentIndex, clear, promotedPlaylist, addItem, update; function VideoContentTree () { super(); } function rebuildTree(playlist, index) { if ((currentPlaylist == playlist) && (currentIndex == index)) { return(undefined); } currentPlaylist = playlist; currentIndex = index; clear(); var _local4 = playlist.getChildren()[index]; if (_local4 instanceof com.google.youtube.tv.tree.VideoNode) { if (promotedPlaylist) { promotedPlaylist.load(); addItem(promotedPlaylist, true); } addItem(new com.google.youtube.tv.tree.PlaylistFeedNode(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.RELATED_VIDEOS), ("http://gdata.youtube.com/feeds/api/videos/" + _local4.getVideoId()) + "/related", true, null, true)); if (com.google.youtube.tv.tree.PlaylistFeedNode(playlist).containsOnlyVideoNodes()) { addItem(playlist, true); } var _local5 = playlist.parent.getChildren()[0]; if (_local5 && ((_local5.getType() == com.google.youtube.tv.tree.PlaylistFeedNode.TYPE_UPLOADS) && (_local5 != playlist))) { addItem(_local5); } update(); } } function setPromotedPlaylist(promotedPlaylistNode) { promotedPlaylist = promotedPlaylistNode; } static function getTree() { if (!videoTreeRoot) { videoTreeRoot = new com.google.youtube.tv.tree.VideoContentTree(); } return(videoTreeRoot); } }
Symbol 20494 MovieClip [__Packages.com.google.youtube.tv.data.DataFetcher] Frame 0
class com.google.youtube.tv.data.DataFetcher extends com.google.chianti.event.EventBroadcaster { var loader, url, tag, broadcast; function DataFetcher () { super(); com.google.chianti.event.EventBroadcaster.initialize(this); init(); } function init() { loader = new LoadVars(); loader.onData = com.google.chianti.event.EventDelegate.create(this, onData); } function fetch(newUrl, tag) { url = newUrl; if ((url.indexOf("https://gdata.youtube.com/") == 0) || (url.indexOf("http://gdata.youtube.com/") == 0)) { decorateGDataUrl(); } if (!tag) { count++; tag = "tag" + count; } this.tag = tag; if (loader.load(url) == false) { onData(); } } function getUrl() { return(url); } function onData(src) { if (src) { broadcast({type:LOAD_COMPLETE, src:src, tag:tag}); } else { broadcast({type:LOAD_ERROR}); } } function decorateGDataUrl() { if (com.google.youtube.tv.services.SignInService.isSignedIn()) { url = com.google.youtube.tv.util.StringUtil.addParamsToRequest(com.google.youtube.tv.util.StringUtil.applyProtocol(url, true), ["oauth_token=" + com.google.youtube.tv.services.SignInService.getInstance().accessToken]); } } static var LOAD_COMPLETE = "LOAD_COMPLETE"; static var LOAD_ERROR = "LOAD_ERROR"; static var count = 0; }
Symbol 20495 MovieClip [__Packages.com.google.youtube.tv.data.StrongAuthDataFetcher] Frame 0
class com.google.youtube.tv.data.StrongAuthDataFetcher extends com.google.youtube.tv.data.DataFetcher { var service, url, tag, loader, serviceReadyDelegate; function StrongAuthDataFetcher () { super(); service = com.google.youtube.tv.services.StrongAuthService.getInstance(); } function fetch(newUrl, tag) { url = newUrl; decorateGDataUrl(); this.tag = tag; if (service.isReady) { var _local4 = new LoadVars(); service.addHeaders(_local4, url); _local4.addRequestHeader("X-HTTP-Method-Override", "GET"); _local4.dummy = 1; if (_local4.sendAndLoad(url, loader) == false) { onData(null); } } else if (service.errorCode) { onData(null); } else if (!serviceReadyDelegate) { serviceReadyDelegate = com.google.chianti.event.EventDelegate.create(this, onServiceReady); service.registerEvent(com.google.youtube.tv.services.StrongAuthService.READY, serviceReadyDelegate); service.registerEvent(com.google.youtube.tv.services.StrongAuthService.FAIL, serviceReadyDelegate); } } function onData(src) { service.recordFetchResult(src); super.onData(src); } function onServiceReady() { fetch(url, tag); service.unregisterEvents(com.google.youtube.tv.services.StrongAuthService.READY, com.google.youtube.tv.services.StrongAuthService.FAIL, serviceReadyDelegate); serviceReadyDelegate = null; } function decorateGDataUrl() { super.decorateGDataUrl(); url = com.google.youtube.tv.util.StringUtil.applyProtocol(url, true); } }
Symbol 20496 MovieClip [__Packages.com.google.youtube.tv.services.BrandingOptionsService] Frame 0
class com.google.youtube.tv.services.BrandingOptionsService extends com.google.youtube.tv.data.StrongAuthDataFetcher { var broadcast, tag; function BrandingOptionsService () { super(); } function fetchForChannel(channelToken) { var _local4 = com.google.youtube.tv.util.StringUtil.replacePlaceholders(BRANDING_BASE_URL, {channel:channelToken}); super.fetch(_local4, channelToken); } function onData(src) { if (src) { var _local3 = new XML(src); var _local4 = com.google.youtube.tv.util.Xtract.getValue(_local3, PLAYLIST_EXTRACTOR); var _local5 = com.google.youtube.tv.util.Xtract.getValue(_local3, WATERMARK_EXTRACTOR); var _local6 = com.google.youtube.tv.util.Xtract.getValue(_local3, THUMBNAIL_EXTRACTOR); if (_local4) { var _local8 = com.google.youtube.tv.util.StringUtil.replacePlaceholders(PLAYLIST_BASE_URL, {playlist:_local4}); var _local7 = new com.google.youtube.tv.tree.PlaylistFeedNode(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.VEVO_PROMOTED_VIDEOS), _local8, false, null, false); } broadcast({type:LOAD_COMPLETE, token:tag, watermarkUrl:_local5, playlistNode:_local7, thumbnailUrl:_local6}); } else { broadcast({type:com.google.youtube.tv.data.DataFetcher.LOAD_ERROR}); } } static var LOAD_COMPLETE = "load_complete"; static var BRANDING_BASE_URL = "${gdataUrl}/feeds/api/partners/${channel}/branding/default?v=2"; static var PLAYLIST_EXTRACTOR = "/entry/yt:option[@name=\"watchpage.global.featured_playlist.id\"]"; static var WATERMARK_EXTRACTOR = "/entry/yt:option[@name=\"device_watchpage.watermark.image.url\"]"; static var THUMBNAIL_EXTRACTOR = "/entry/yt:option[@name=\"generictv_watchpage.banner.image.url\"]"; static var PLAYLIST_BASE_URL = "${gdataUrl}/feeds/api/playlists/${playlist}"; }
Symbol 20497 MovieClip [__Packages.com.google.youtube.tv.util.Logger] Frame 0
class com.google.youtube.tv.util.Logger { static var remoteLogInterval, remoteQueue, remoteUrl; function Logger () { } static function log() { if (_global.isNaN(remoteLogInterval) && (_level0.home_host_port)) { remoteLogInterval = _global.setInterval(flushRemoteLogs, REMOTE_LOG_INTERVAL); remoteQueue = [(("Log started " + new Date()) + " SWF ") + _root._url]; remoteUrl = "http://" + _level0.home_host_port; } var _local2 = "info"; if (arguments.length > 4) { var _local3 = String(arguments.shift()); if ((_local3 == "warn") || (_local3 == "error")) { _local2 = _local3; } } var _local4 = ""; while (arguments.length > 3) { _local4 = _local4 + ((_local4 ? ", " : "") + arguments.shift()); } var _local5 = String(arguments.shift()); if (_local5.indexOf(DEFAULT_CLASS_NAME_PREFIX) == 0) { _local5 = _local5.substr(DEFAULT_CLASS_NAME_PREFIX.length); } var _local6 = String(arguments.shift()); var _local7 = Number(arguments.shift()); var _local8 = (((_local4 + " ") + _local5) + "@") + _local7; com.google.youtube.tv.view.DebugView.addTraceLine(_local4); com.google.youtube.util.ExternalInterfaceWrapper.call("console." + _local2.toLowerCase(), _local8); remoteQueue.push(_local8); } static function flushRemoteLogs() { if (remoteQueue.length == 0) { return(undefined); } var _local2 = new LoadVars(); _local2.msg_pack = remoteQueue.join(newline); _local2.sendAndLoad(remoteUrl, _local2, "POST"); remoteQueue = []; } static var DEFAULT_CLASS_NAME_PREFIX = "com.google."; static var REMOTE_LOG_INTERVAL = 2000; }
Symbol 20498 MovieClip [__Packages.com.google.youtube.tv.tree.MenuNode] Frame 0
class com.google.youtube.tv.tree.MenuNode extends com.google.youtube.tv.tree.TreeNode { var terminal, waitForAllChildren, getChildren, title; function MenuNode (title, terminal, waitForAllChildren) { super(title); this.terminal = terminal || false; this.waitForAllChildren = waitForAllChildren || false; } function isTerminal() { return(terminal); } function isLoaded() { var _local2 = getChildren(); if (waitForAllChildren) { var _local3 = 0; for ( ; _local3 < _local2.length ; _local3++) { if (!_local2[_local3].isLoaded()) { return(false); } } } return(_local2[0].isLoaded()); } function toString() { return((" < MenuNode title:" + title) + " > "); } }
Symbol 20499 MovieClip [__Packages.com.google.youtube.tv.tree.ListNode] Frame 0
class com.google.youtube.tv.tree.ListNode extends com.google.youtube.tv.tree.MenuNode { var title, url, onLoadCompleteDelegate, onLoadErrorDelegate, fetcher, loaded, loadStarted, needLoadMore, generation, setLoaded, notify, cobj, getData, children; function ListNode (title, url, loadNow) { super(); this.title = title; this.url = url; onLoadCompleteDelegate = com.google.chianti.event.EventDelegate.create(this, onLoadComplete); onLoadErrorDelegate = com.google.chianti.event.EventDelegate.create(this, onLoadError); if (loadNow) { load(); } } function setDataFetcher() { if (fetcher) { return(undefined); } fetcher = createDataFetcher(); fetcher.registerEvent(com.google.youtube.tv.data.DataFetcher.LOAD_COMPLETE, onLoadCompleteDelegate); fetcher.registerEvent(com.google.youtube.tv.data.DataFetcher.LOAD_ERROR, onLoadErrorDelegate); } function unsetDataFetcher() { fetcher.unregisterAll(); fetcher = null; } function createDataFetcher() { return(new com.google.youtube.tv.data.DataFetcher()); } function load() { if (loaded || (loadStarted)) { return(undefined); } setDataFetcher(); loadStarted = true; fetcher.fetch(getURL()); } function reload() { if ((!loaded) && (loadStarted)) { return(undefined); } setDataFetcher(); fetcher.fetch(getURL()); } function loadMore() { if (loadStarted || (!needLoadMore)) { return(undefined); } setDataFetcher(); loadStarted = true; fetcher.fetch(getURL()); } function clear(opt_unlinkChildren) { if (loadStarted) { unsetDataFetcher(); } super.clear(opt_unlinkChildren); } function onLoadComplete(event) { unsetDataFetcher(); generation++; parse(event.src); getChildren(); setLoaded(true); notify(); } function onLoadError() { unsetDataFetcher(); needLoadMore = false; setLoaded(true, true); notify(); var _local2 = (new com.google.utils.Url(url)).getPath(); if (_local2) { com.google.youtube.tv.services.StatsLoggerService.getInstance().sendFeedError(_local2); } } function parse(src) { cobj = com.google.youtube.tv.util.Xtract.getComplexValues(new XML(src), DEFAULT_XTRACTOR); } function getChildren() { if (getData()) { createChildren(); cobj = null; } return(children); } function createChildren() { } function isTerminal() { return(false); } function getURL() { return(url); } function getTitle() { return(title); } function setTitle(title) { this.title = title; } function isLoaded() { return(loaded); } function requiresAutoLoad() { return(!loaded); } function getThumbnailUrl() { return(getChildren()[0].getThumbnailUrl()); } function toString() { return((" < ListNode title:" + title) + " > "); } static var DEFAULT_XTRACTOR = "/root/video[*](title,thumbnail,encrypted_id,author,duration,added," + "views,dislikes,likes,user_id,description,is_hd)"; }
Symbol 20500 MovieClip [__Packages.com.google.youtube.tv.tree.GDataNode] Frame 0
class com.google.youtube.tv.tree.GDataNode extends com.google.youtube.tv.tree.ListNode { var lastStartIndex, startIndex, offset, sparse, pageSize, initialNeededLoadMore, needLoadMore, prefetchedData, loadStarted, children, loadMore, customFields, xtractor, cobj, count, getData, url, getChildren, instanceId; function GDataNode (title, url, loadNow, data, needLoadMore) { super(title, url, loadNow) lastStartIndex = 0; startIndex = 0; offset = 0; sparse = false; pageSize = com.google.youtube.tv.app.Config.GDATA_NUM_RESULTS_PER_PAGE; initialNeededLoadMore = needLoadMore || false; this.needLoadMore = initialNeededLoadMore; url = appendDefaultParamsToUrl(com.google.youtube.tv.util.StringUtil.replacePlaceholders(url)); if (data) { prefetchedData = data; } } static function getFields() { return(fields); } static function setFields(value) { fields = value; } function setPageSize(value) { pageSize = value; } function loadPage(startIndex) { if (loadStarted || (!needLoadMore)) { return(undefined); } if (startIndex > this.startIndex) { sparse = true; } var _local3 = true; var _local4 = startIndex; for ( ; _local4 < (startIndex + pageSize) ; _local4++) { if (children[_local4] == null) { _local3 = false; break; } } if (_local3) { return(undefined); } this.startIndex = startIndex; loadMore(); } function appendDefaultParamsToUrl(url) { var _local3 = ["v=2.1", "fields=" + (customFields || (getFields()))]; if (com.google.youtube.tv.platform.Box.isSafe()) { _local3.push("safeSearch=strict"); } return(com.google.youtube.tv.util.StringUtil.addParamsToRequest(url, _local3)); } function parse(src) { if (xtractor) { var _local3 = new XML(); _local3.ignoreWhite = true; _local3.parseXML(src); cobj = com.google.youtube.tv.util.Xtract.getComplexValues(_local3, xtractor); } } function addItem(node, preserveParent) { var _local4 = (sparse ? (lastStartIndex + (offset++)) : (count)); setItemAt(node, _local4, preserveParent); } function removeItem(node) { super.removeItem(node); } function setItemAt(node, index, preserveParent) { if (!preserveParent) { node.parent = this; } node.index = index; children[index] = node; if (count == index) { count++; } } function createDataFetcher() { if (com.google.youtube.tv.services.StrongAuthService.getInstance().isReady) { return(new com.google.youtube.tv.data.StrongAuthDataFetcher()); } return(new com.google.youtube.tv.data.DataFetcher()); } function createChildren() { var _local2 = getData(); if (!_local2.length) { needLoadMore = false; } } function getURL() { if (startIndex >= com.google.youtube.tv.app.Config.MAX_NUM_VIDEOS_PER_FEED) { return(""); } var _local2 = url; if (needLoadMore) { var _local3 = ["max-results=" + pageSize, "start-index=" + (startIndex + 1)]; _local2 = com.google.youtube.tv.util.StringUtil.addParamsToRequest(_local2, _local3); lastStartIndex = startIndex; offset = 0; startIndex = startIndex + pageSize; return(_local2); } return(_local2); } function isStandardFeed() { return(url.indexOf("/standardfeeds/") > 0); } function getThumbnailUrl() { return(prefetchedData.thumbnail || (getChildren()[0].getThumbnailUrl())); } function clear(opt_unlinkChildren) { lastStartIndex = 0; startIndex = 0; offset = 0; needLoadMore = initialNeededLoadMore; prefetchedData = null; super.clear(opt_unlinkChildren); } function getUID() { return("GDataNode" + instanceId); } function toString() { return(("<GDataNode " + instanceId) + ">"); } static var FIELDS_DEFAULT = ((((("title,openSearch:*," + "link[@rel='next'](@rel),entry[not(app:control/yt:state)]") + "(id,title,link,author/name,published,yt:statistics,yt:rating,yt:hd,") + "media:group(media:credit,yt:duration,media:thumbnail[@yt:name='") + com.google.youtube.tv.app.Config.THUMBS_QUALITY) + "'](@url),yt:uploaded,") + "yt:uploaderId,media:description,yt:videoid))"; static var FIELDS_MINIMAL = (((((("openSearch:totalResults," + "link[@rel='next'](@rel),entry[not(app:control/yt:state)](published,") + "title,yt:statistics,") + "media:group(media:credit[@role='uploader'](@role,@yt:display),") + "media:thumbnail[@yt:name='") + com.google.youtube.tv.app.Config.THUMBS_QUALITY) + "'](@url),") + "yt:duration,yt:uploaded,yt:uploaderId,yt:videoid))"; static var fields = FIELDS_DEFAULT; }
Symbol 20501 MovieClip [__Packages.com.google.youtube.tv.tree.ContentTree] Frame 0
class com.google.youtube.tv.tree.ContentTree extends com.google.youtube.tv.tree.TreeNode { static var treeRoot; var messages, autoPlayNode, addItem, videosNode, channelsNode, accountNode, settingsNode, pairNode, improveNode, clearCookiesNode, subscriptionsNode, loadScheduler, checkLoadedDelegate, loaded, whatToWatchNode, addItemAt, children, watchLaterNode, watchHistoryNode, userPlaylistsFeedNode, signOutNode, removeItem, signInNode, update; function ContentTree () { super(); } function init() { messages = com.google.youtube.tv.services.MessagesService.get(); if (com.google.youtube.tv.app.Environment.hasVideoId()) { var _local2 = com.google.youtube.tv.util.StringUtil.replacePlaceholders(FEED_VIDEO_INFO_TEMPLATE, {videoId:com.google.youtube.tv.app.Environment.getVideoId(), fields:FEED_VIDEO_INFO_FIELDS}); autoPlayNode = new com.google.youtube.tv.tree.ComplexFeedNode("", [{url:_local2, xtractor:FEED_VIDEO_INFO_XTRACTOR, needLoadMore:false}]); addItem(autoPlayNode); } else if (com.google.youtube.tv.app.Environment.hasVideoPlusRelatedId()) { var _local3 = com.google.youtube.tv.util.StringUtil.replacePlaceholders(FEED_VIDEO_INFO_TEMPLATE, {videoId:com.google.youtube.tv.app.Environment.getVideoPlusRelatedId(), fields:FEED_VIDEO_INFO_FIELDS}); autoPlayNode = new com.google.youtube.tv.tree.ComplexFeedNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.RELATED_VIDEOS), [{url:_local3, xtractor:FEED_VIDEO_INFO_XTRACTOR, needLoadMore:false}, {url:("http://gdata.youtube.com/feeds/api/videos/" + com.google.youtube.tv.app.Environment.getVideoPlusRelatedId()) + "/related", xtractor:null, needLoadMore:true}]); addItem(autoPlayNode); } else if (com.google.youtube.tv.app.Environment.hasPlaylistId()) { autoPlayNode = new com.google.youtube.tv.tree.PlaylistFeedNode("", com.google.youtube.tv.util.StringUtil.addParamsToRequest("http://gdata.youtube.com/feeds/api/playlists/" + com.google.youtube.tv.app.Environment.getPlaylistId(), ["v=2.1", "fields=" + com.google.youtube.tv.tree.GDataNode.getFields()]), true, null, true); addItem(autoPlayNode); } videosNode = new com.google.youtube.tv.tree.VideosNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.VIDEOS), ((("http://" + com.google.youtube.tv.app.Environment.SERVLET_HOST) + "/leanback_ajax?action_featured=1&style=xml&") + "client=lbl&override_hl=1&hl=") + messages.getLocale()); addItem(videosNode); channelsNode = new com.google.youtube.tv.tree.ChannelsNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.BADGE_CHANNELS)); addItem(channelsNode); accountNode = new com.google.youtube.tv.tree.TreeNode(); accountNode.setMenuCapturing(true); addItem(accountNode); settingsNode = new com.google.youtube.tv.tree.TreeNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.SETTINGS)); addItem(settingsNode); pairNode = new com.google.youtube.tv.tree.VerbNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.PAIR_MENU_TITLE), messages.getMsg(com.google.youtube.tv.services.MessagesService.PAIR_MENU_SUBTITLE), com.google.youtube.tv.wiring.AppEvent.ACTION_PAIR); pairNode.iconId = "pairingIcon"; settingsNode.addItem(pairNode); improveNode = new com.google.youtube.tv.tree.VerbNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.IMPROVE_YOUTUBE_TITLE), "", com.google.youtube.tv.wiring.AppEvent.ACTION_IMPROVE_YOUTUBE); settingsNode.addItem(improveNode); clearCookiesNode = new com.google.youtube.tv.tree.VerbNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.CLEAR_COOKIES_TITLE), "", com.google.youtube.tv.wiring.AppEvent.ACTION_CLEAR_COOKIES); clearCookiesNode.iconId = "clearIcon"; if (com.google.youtube.tv.experiments.Experiment.EXP_RICH_CAPTIONS.isActive() && (com.google.youtube.tv.platform.Box.getGeoCountry() == "US")) { } updateUserNodes(); if ((!com.google.youtube.tv.platform.Box.hasAutoPlay()) && (com.google.youtube.tv.app.Environment.hasSearchVar() || ((!com.google.youtube.tv.services.SignInService.isSignedIn()) || ((!subscriptionsNode) || (subscriptionsNode.isLoaded()))))) { setLoaded(true); } else { loadScheduler = com.google.youtube.util.Scheduler.setTimeout(MAX_LOAD_TIME, com.google.chianti.event.EventDelegate.create(this, onLoadTimeout)); checkLoadedDelegate = com.google.chianti.event.EventDelegate.create(this, checkLoaded); if (subscriptionsNode) { subscriptionsNode.getValueStream().addSinkFunction(checkLoadedDelegate); } if (autoPlayNode) { autoPlayNode.getValueStream().addSinkFunction(checkLoadedDelegate); } checkLoaded(); } } function onLoadTimeout() { setLoaded(true); } function checkLoaded() { if (((!subscriptionsNode) || (subscriptionsNode.isLoaded())) && ((!autoPlayNode) || (autoPlayNode.isLoaded()))) { setLoaded(true); } } function setLoaded(value, opt_error) { var _local5 = loaded; super.setLoaded(value, opt_error); if (value && (!_local5)) { loadScheduler.stop(); loadScheduler = null; subscriptionsNode.getValueStream().removeSinkFunction(checkLoadedDelegate); if (autoPlayNode) { autoPlayNode.getValueStream().removeSinkFunction(checkLoadedDelegate); } checkLoadedDelegate = null; com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.CONTENT_LOADED)); } } function signIn() { if (!loaded) { return(undefined); } updateUserNodes(); } function signOut() { if (!loaded) { return(undefined); } updateUserNodes(); } function updateUserNodes() { accountNode.clear(); videosNode.updateUserNodes(); channelsNode.updateUserNodes(); if (com.google.youtube.tv.services.SignInService.isSignedIn()) { accountNode.setTitle(messages.getMsg(com.google.youtube.tv.services.MessagesService.ACCOUNT)); if (!whatToWatchNode) { whatToWatchNode = new com.google.youtube.tv.tree.WhatToWatchNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.WHAT_TO_WATCH), WHAT_TO_WATCH_URL, true, null, true); addItemAt(whatToWatchNode, (autoPlayNode ? 1 : 0)); } if (!subscriptionsNode) { subscriptionsNode = new com.google.youtube.tv.tree.UserSubscriptionsNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.SUBSCRIPTIONS_CHANNEL)); addItemAt(subscriptionsNode, ((children[whatToWatchNode.index] == whatToWatchNode) ? (whatToWatchNode.index + 1) : ((autoPlayNode ? 1 : 0)))); } if (!watchLaterNode) { watchLaterNode = new com.google.youtube.tv.tree.WatchLaterNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.WATCH_LATER)); addItemAt(watchLaterNode, accountNode.index); } watchHistoryNode = new com.google.youtube.tv.tree.WatchHistoryNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.WATCH_HISTORY)); accountNode.addItem(watchHistoryNode); userPlaylistsFeedNode = new com.google.youtube.tv.tree.UserPlaylistsFeedNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.USER_PLAYLISTS_TITLE), FEED_USER_PLAYLISTS_URL, false, null, true); userPlaylistsFeedNode.setPageSize(com.google.youtube.tv.app.Config.GDATA_NUM_PLAYLISTS_PER_PAGE); accountNode.addItem(userPlaylistsFeedNode); var _local2 = new com.google.youtube.tv.tree.PlaylistFeedNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.UPLOADS_CHANNEL), FEED_UPLOADS_URL, false, null, true); accountNode.addItem(_local2); var _local3 = new com.google.youtube.tv.tree.PlaylistFeedNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.FAVORITES_CHANNEL), FEED_FAVORITES_URL, false, null, true); accountNode.addItem(_local3); if (!signOutNode) { signOutNode = new com.google.youtube.tv.tree.SignOutNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.SIGN_OUT_CHANNEL), messages.getMsg(com.google.youtube.tv.services.MessagesService.SIGN_OUT_SUBTITLE), com.google.youtube.tv.wiring.AppEvent.ACTION_SIGN_OUT_INVITATION); } accountNode.addItem(signOutNode); } else { if (whatToWatchNode) { removeItem(whatToWatchNode); whatToWatchNode = null; } if (subscriptionsNode) { removeItem(subscriptionsNode); subscriptionsNode = null; } if (watchLaterNode) { removeItem(watchLaterNode); watchLaterNode = null; } accountNode.clear(); accountNode.setTitle(messages.getMsg(com.google.youtube.tv.services.MessagesService.SIGN_IN_CHANNEL)); signOutNode.remove(); signOutNode = null; if (!signInNode) { signInNode = new com.google.youtube.tv.tree.VerbNode(messages.getMsg(com.google.youtube.tv.services.MessagesService.SIGN_IN_CHANNEL), messages.getMsg(com.google.youtube.tv.services.MessagesService.SIGN_IN_SUBTITLE), com.google.youtube.tv.wiring.AppEvent.ACTION_SIGN_IN); signInNode.iconId = "profileIcon"; } accountNode.addItem(signInNode); } accountNode.update(); update(); } function getUserPlaylistsNode() { return(userPlaylistsFeedNode); } function getAutoPlayNode() { return(autoPlayNode); } function getUserSubscriptionsNode() { return(subscriptionsNode); } function getWatchHistoryNode() { return(watchHistoryNode); } static function getRoot() { if (!treeRoot) { treeRoot = new com.google.youtube.tv.tree.ContentTree(); } return(treeRoot); } function toString() { return(" < ContentTree > "); } static var ENTRY_XTRACTOR = ((((((((((("title," + "author/name as author,published,") + "yt:statistics/@viewCount as view_count,") + "yt:rating/@numDislikes as dislikes,") + "yt:rating/@numLikes as likes,") + "yt:hd as hd,") + "media:group(media:credit[@role=\"uploader\"]/@yt:display as uploader,") + "media:thumbnail/@url as thumbnail,") + "media:description as description,") + "yt:duration/@seconds as duration,") + "yt:uploaded as uploaded,") + "yt:uploaderId as uploaderId,") + "yt:videoid as videoId)"; static var FEED_USER_PLAYLISTS_FIELDS = (("entry(yt:playlistId,title,link,updated,yt:countHint," + "media:group/media:thumbnail[@yt:name='") + com.google.youtube.tv.app.Config.THUMBS_QUALITY) + "'](@url))"; static var WHAT_TO_WATCH_URL = "${gdataUrl}/feeds/api/users/default/river"; static var FEED_FAVORITES_URL = "${gdataUrl}/feeds/api/users/default/favorites"; static var FEED_SUBSCRIBED_CHANNELS_TEMPLATE = "${gdataUrl}/feeds/api/users/default/subscriptions?" + "start-index=${start}&max-results=${size}&fields=${fields}"; static var FEED_SUBSCRIBED_CHANNELS_FIELDS = "entry(yt:username)"; static var FEED_USER_PLAYLISTS_URL = "${gdataUrl}/feeds/api/users/default/playlists"; static var FEED_UPLOADS_URL = "${gdataUrl}/feeds/api/users/default/uploads"; static var FEED_VIDEO_INFO_TEMPLATE = "http://gdata.youtube.com/feeds/api/videos/${videoId}?fields=${fields}"; static var FEED_VIDEO_INFO_FIELDS = ((("title,link,id,author/name,published,yt:statistics,yt:rating," + "media:group(media:thumbnail[@yt:name='") + com.google.youtube.tv.app.Config.THUMBS_QUALITY) + "'](@url),media:description,yt:videoid,") + "yt:uploaded,yt:uploaderId,yt:duration)"; static var FEED_VIDEO_INFO_XTRACTOR = ("/entry[*](" + ENTRY_XTRACTOR) + ")"; static var MAX_LOAD_TIME = 7000; var loadedNodesCount = 0; }
Symbol 20502 MovieClip [__Packages.com.google.youtube.tv.tree.PlaylistFeedNode] Frame 0
class com.google.youtube.tv.tree.PlaylistFeedNode extends com.google.youtube.tv.tree.GDataNode { var loaded, hasMore, trackingType, url, setTrackingType, title, videoCount, isStandardFeed, cobj, dataSelector, children, getData, addItem, clear, startIndex, needLoadMore, pageSize, loadStarted, prefetchedData, type, instanceId, count; function PlaylistFeedNode (title, url, loadNow, data, needLoadMore) { super(title, url, loadNow, data, needLoadMore); } function setDeduplicate(value) { deduplicate = value; } function loadMore() { if ((!loaded) || (hasMore)) { super.loadMore(); } } function getTrackingType() { if ((!trackingType) && (url)) { detectTrackingType(); } return(super.getTrackingType()); } function detectTrackingType() { if (url.indexOf("/standardfeeds/") > 0) { var _local2 = com.google.youtube.tv.tree.TreeNode.TRACKING_TYPE_STANDARD + url.split("?")[0].split("/").pop(); } else if (url.indexOf("/related") > 0) { var _local2 = com.google.youtube.tv.tree.TreeNode.TRACKING_TYPE_RELATED; } else if (url.indexOf("/users/") > 0) { var _local3 = com.google.youtube.tv.tree.TreeNode.TRACKING_TYPE_USER_LIST; if (url.indexOf("/favorites") > 0) { _local3 = com.google.youtube.tv.tree.TreeNode.TRACKING_TYPE_FAVORITES; } else if (url.indexOf("/uploads") > 0) { _local3 = com.google.youtube.tv.tree.TreeNode.TRACKING_TYPE_UPLOADS; } var _local2 = _local3 + url.split("/users/")[1].split("/")[0]; } else if (url.indexOf("/playlists/")) { var _local2 = url.split("/playlists/")[1].split("?")[0]; if (_local2.indexOf(com.google.youtube.tv.tree.TreeNode.TRACKING_TYPE_PLAYLIST) != 0) { _local2 = com.google.youtube.tv.tree.TreeNode.TRACKING_TYPE_PLAYLIST + _local2; } } if (_local2) { setTrackingType(_local2); } } function parse(src) { var _local3 = new XML(); _local3.ignoreWhite = true; _local3.parseXML(src); if (!title) { title = com.google.youtube.tv.util.Xtract.getValue(_local3, "/feed/title"); } videoCount = videoCount || (Number(com.google.youtube.tv.util.Xtract.getValue(_local3, "/feed/openSearch:totalResults"))); if ((videoCount <= com.google.youtube.tv.app.Config.GDATA_NUM_RESULTS_PER_PAGE) && (isStandardFeed())) { videoCount = com.google.youtube.tv.app.Config.GDATA_STANDARD_FEED_SIZE; } hasMore = (com.google.youtube.tv.util.Xtract.getValue(_local3, "/feed/link[@rel=\"next\"]/@rel") != null) || (isStandardFeed()); cobj = com.google.youtube.tv.util.Xtract.getComplexValues(_local3, dataSelector || (DEFAULT_XTRACTOR)); if (deduplicate) { removeDuplicates(); } } function removeDuplicates() { var _local2 = {}; var _local3 = 0; for ( ; (_local3 < children.length) || 0 ; _local3++) { var _local4 = com.google.youtube.tv.tree.VideoNode(children[_local3]).getVideoId(); if (_local4) { _local2[_local4] = true; } } var _local5 = getData(); var _local6 = _local5.length - 1; for ( ; _local6 >= 0 ; _local6--) { var _local7 = _local5[_local6].videoId; for ( ; !_local7 ; _local6--) { } if (_local2[_local7]) { _local5.splice(_local6, 1); } else { _local2[_local7] = true; } } } function createChildren() { var _local3 = getData(); var _local4 = false; var _local5 = 0; for ( ; _local5 < _local3.length ; _local5++) { for ( ; !_local3[_local5].videoId ; _local5++) { } var _local6 = new com.google.youtube.tv.tree.VideoNode(_local3[_local5]); addItem(_local6); hasRealChildren = true; _local4 = true; } if (!hasRealChildren) { clear(); } if ((!isStandardFeed()) && (videoCount && (startIndex >= videoCount))) { needLoadMore = false; } if (_local4) { skippedVideosCount = 0; } else if (skippedVideosCount < MAX_UNAVAILABLE_VIDEOS) { skippedVideosCount = skippedVideosCount + pageSize; } else { hasMore = false; } if (!hasMore) { videoCount = children.length; } if ((!_local4) && (needLoadMore && (hasMore))) { loadStarted = false; loadMore(); } else { super.createChildren(); } } function hasMoreVideos() { return(hasMore); } function getVideosCount() { return(videoCount || (prefetchedData.video_count || (children.length || 0))); } function getPlaylistId() { return(prefetchedData.playlist_id || (prefetchedData.list_id)); } function getType() { return(type); } function setType(type) { this.type = type; } function isTerminal() { return(true); } function containsOnlyVideoNodes() { var _local2 = 0; for ( ; (_local2 < children.length) || 0 ; _local2++) { if (!com.google.youtube.tv.tree.VideoNode(children[_local2])) { return(false); } } return(true); } function getUID() { return("PlaylistFeedNode" + instanceId); } function toString() { return(((("<PlaylistFeedNode title:" + title) + " count:") + count) + ">"); } static var TYPE_UPLOADS = "TYPE_UPLOADS"; static var DEFAULT_XTRACTOR = ("/feed/entry[*](" + com.google.youtube.tv.tree.ContentTree.ENTRY_XTRACTOR) + ")"; static var MAX_UNAVAILABLE_VIDEOS = 20; var hasRealChildren = false; var deduplicate = false; var skippedVideosCount = 0; }
Symbol 20503 MovieClip [__Packages.com.google.youtube.tv.tree.ChannelOverviewNode] Frame 0
class com.google.youtube.tv.tree.ChannelOverviewNode extends com.google.youtube.tv.tree.PlaylistFeedNode { var extraNodes, addItem; function ChannelOverviewNode (title, url, loadNow, extraNodes) { super(title, url, loadNow); this.extraNodes = extraNodes; } function createChildren() { super.createChildren(); var _local3 = 0; for ( ; _local3 < extraNodes.length ; _local3++) { addItem(extraNodes[_local3]); } } }
Symbol 20504 MovieClip [__Packages.com.google.youtube.tv.wiring.EventStream] Frame 0
class com.google.youtube.tv.wiring.EventStream { var instanceId, name, func, sources, sinks, node, args, mapping; function EventStream (name, func, sources, node) { instanceId = lastId++; this.name = name || "anon"; this.func = func || (com.google.youtube.tv.wiring.FRP.identity); this.sources = sources || ([]); sinks = []; this.node = node; args = []; mapping = {}; bindToSources(this.sources); counterE++; } function bindToSources(sources) { var _local3 = 0; for ( ; _local3 < sources.length ; _local3++) { sources[_local3].sinks.push(this); mapping[sources[_local3]] = _local3; args[_local3] = null; } } function addSink(sink) { sinks.push(sink); } function addSinkFunction(f) { addSink({update:f}); } function removeSink(sink) { var _local3 = sinks.length - 1; for ( ; _local3 >= 0 ; _local3--) { if (sinks[_local3] == sink) { sinks.splice(_local3, 1); } } } function removeSinkFunction(f) { var _local3 = sinks.length - 1; for ( ; _local3 >= 0 ; _local3--) { if (sinks[_local3].update == f) { sinks.splice(_local3, 1); } } } function update(event, source) { var _local4 = mapping[source]; args[_local4] = event; var _local5 = func.apply(this, args); if (_local5 != com.google.youtube.tv.wiring.FRP.STOP) { propagate(_local5); } } function sendEvent(event) { var _local3 = func.apply(this, [event]); if (_local3 != com.google.youtube.tv.wiring.FRP.STOP) { propagate(_local3); } } function propagate(newValue) { if (node && (!node.canPropagate())) { return(undefined); } var _local3 = 0; for ( ; _local3 < sinks.length ; _local3++) { sinks[_local3].update(newValue, this); } } function printerE(name) { var _local3 = function (event) { var _local3 = []; for (var i in event) { _local3.push((("" + i) + ":") + event[i]); } return(com.google.youtube.tv.wiring.FRP.STOP); }; return(new com.google.youtube.tv.wiring.EventStream("printerE", _local3, [this])); } static function changes(beh) { var es = (new com.google.youtube.tv.wiring.EventStream("ES:changes-of-" + beh.toString(), null, [beh])); var _local3 = function (newValue) { es.sendEvent(newValue); }; es.func = _local3; return(es); } static function mergeE() { var _local2 = new com.google.youtube.tv.wiring.EventStream("mergeE", null, arguments); _local2.update = _local2.propagate; return(_local2); } function emap(f) { return(new com.google.youtube.tv.wiring.EventStream("emap", f, [this])); } function filter(f) { var _local2 = function (value) { if (f(value)) { return(value); } return(com.google.youtube.tv.wiring.FRP.STOP); }; return(new com.google.youtube.tv.wiring.EventStream("filter", _local2, [this])); } static function id(value) { return(new com.google.youtube.tv.wiring.EventStream("id", com.google.youtube.tv.wiring.FRP.identity, arguments)); } static function zipE(zip) { return(new com.google.youtube.tv.wiring.EventStream("zipE", zip, arguments.slice(1))); } static function E1(obj, eventName, func) { var es = (new com.google.youtube.tv.wiring.EventStream((("E1:" + obj.toString) + "::") + eventName, func)); es[eventName] = function (event) { es.update(event); }; obj.addListener(es); return(es); } function startsWith(value) { return(new com.google.youtube.tv.wiring.ValueStream("startsWith", undefined, [this], value)); } static function keyE() { var _local2 = function () { return(Key.getCode()); }; return(com.google.youtube.tv.wiring.EventStream.E1(Key, "onKeyDown", _local2)); } function toString() { return((("ES" + instanceId) + ":") + name); } static var counterE = 0; static var lastId = 0; }
Symbol 20505 MovieClip [__Packages.com.google.youtube.tv.services.DeviceRetentionService] Frame 0
class com.google.youtube.tv.services.DeviceRetentionService extends com.google.chianti.event.EventBroadcaster { static var instance; var storage, userSignedIn, envLoader, timestamp, country; function DeviceRetentionService () { super(); com.google.chianti.event.EventBroadcaster.initialize(this); storage = com.google.youtube.tv.services.StorageService.get(); getEnvironment(); } static function getInstance() { if (!instance) { instance = new com.google.youtube.tv.services.DeviceRetentionService(); } return(instance); } function retainDeviceInfo(userSignedIn) { if (!haveEnvironment) { this.userSignedIn = userSignedIn; sendPing = true; getEnvironment(); } else { sendDeviceRetentionPing(); } } function getEnvironment() { if (gettingEnvironment) { return(undefined); } gettingEnvironment = true; envLoader = new LoadVars(); envLoader.onData = com.google.chianti.event.EventDelegate.create(this, onEnvironmentRecieved); envLoader.load(com.google.youtube.tv.util.StringUtil.replacePlaceholders(ENVIRONMENT_URL)); } function onEnvironmentRecieved(src) { if (src) { var _local3 = com.adobe.serialization.json.JSON.decode(src); timestamp = _local3.environment.start_time; country = _local3.environment.country; haveEnvironment = true; gettingEnvironment = false; if (sendPing) { sendDeviceRetentionPing(); } } } function isFirstRun() { return(!storage.getValue(com.google.youtube.tv.services.StorageService.FIRST_GEO)); } function storeFirstRunParams() { storage.setValueWithoutFlush(com.google.youtube.tv.services.StorageService.FIRST_GEO, country); storage.setValue(com.google.youtube.tv.services.StorageService.FIRST_USE_TIMESTAMP, timestamp); } function sendDeviceRetentionPing() { var _local2 = new com.google.utils.EventReporter(DEVICE_RETENTION_URL); var _local3 = {}; migrateUuidToDRPRecord(); if (isFirstRun()) { storeFirstRunParams(); } _local3.c = "TVLITE"; _local3.cbr = ""; _local3.cbrver = (com.google.youtube.tv.platform.Box.isWii() ? (com.google.youtube.tv.platform.Box.getApiFirmware()) : ""); _local3.cbrand = com.google.youtube.tv.platform.Box.getVendor() || ""; _local3.cmodel = com.google.youtube.tv.platform.Box.getModel() || ""; _local3.cnetwork = com.google.youtube.tv.platform.Box.getNetwork() || ""; _local3.firstactivegeo = storage.getValue(com.google.youtube.tv.services.StorageService.FIRST_GEO); _local3.app_anon_id = storage.getUuid(); _local3.firstactive = storage.getValue(com.google.youtube.tv.services.StorageService.FIRST_USE_TIMESTAMP); if (storage.getValue(com.google.youtube.tv.services.StorageService.LAST_USE_TIMESTAMP)) { _local3.prevactive = storage.getValue(com.google.youtube.tv.services.StorageService.LAST_USE_TIMESTAMP); } if (storage.getValue(com.google.youtube.tv.services.StorageService.FIRST_LOGIN_TIMESTAMP)) { _local3.firstlogin = storage.getValue(com.google.youtube.tv.services.StorageService.FIRST_LOGIN_TIMESTAMP); } if (storage.getValue(com.google.youtube.tv.services.StorageService.LAST_LOGIN_TIMESTAMP)) { _local3.prevlogin = storage.getValue(com.google.youtube.tv.services.StorageService.LAST_LOGIN_TIMESTAMP); } _local3.loginstate = (userSignedIn ? "1" : "0"); _local3.uga = ""; _local3.cos = _global.escape(com.google.youtube.tv.platform.Box.getOs()); _local3.cosver = _global.escape(com.google.youtube.tv.platform.Box.getOsVersion()); _local3.cplatform = (com.google.youtube.tv.platform.Box.isWii() ? "GAME_CONSOLE" : "TV"); _local3.cver = (com.google.youtube.tv.platform.Box.isWii() ? "4" : "3"); _local2.send(_local3); updateTimestamps(); } function updateTimestamps() { if (userSignedIn) { storage.setValueWithoutFlush(com.google.youtube.tv.services.StorageService.LAST_LOGIN_TIMESTAMP, timestamp); } var _local2 = storage.getValue(com.google.youtube.tv.services.StorageService.FIRST_LOGIN_TIMESTAMP); if (userSignedIn && (!_local2)) { storage.setValueWithoutFlush(com.google.youtube.tv.services.StorageService.FIRST_LOGIN_TIMESTAMP, timestamp); } storage.setValue(com.google.youtube.tv.services.StorageService.LAST_USE_TIMESTAMP, timestamp); } function migrateUuidToDRPRecord() { if (hasDRPRecord() || ((!hasUUIDTimestamp()) || (com.google.youtube.tv.platform.Box.isWii()))) { return(undefined); } storage.setValueWithoutFlush(com.google.youtube.tv.services.StorageService.FIRST_GEO, country); var _local2 = timestampFlooredToHourInSeconds(_global.parseInt(storage.getValue(com.google.youtube.tv.services.StorageService.UUID_TIMESTAMP))); storage.setValueWithoutFlush(com.google.youtube.tv.services.StorageService.FIRST_USE_TIMESTAMP, _local2); storage.setValue(com.google.youtube.tv.services.StorageService.LAST_USE_TIMESTAMP, _local2); } function timestampFlooredToHourInSeconds(timestamp) { return(Math.round((timestamp - (timestamp % HOUR_IN_MILLIS)) / 1000)); } function hasDRPRecord() { return(storage.getValue(com.google.youtube.tv.services.StorageService.FIRST_USE_TIMESTAMP)); } function hasUUIDTimestamp() { return(storage.getUuid()); } static var ENVIRONMENT_URL = "https://${servletHost}/leanback_ajax?action_environment"; static var DEVICE_RETENTION_URL = "https://www.youtube-nocookie.com/device_204"; static var HOUR_IN_MILLIS = (60 * 60) * 1000; var gettingEnvironment = false; var haveEnvironment = false; var sendPing = false; }
Symbol 20506 MovieClip [__Packages.com.as2regexp.RegExp] Frame 0
class com.as2regexp.RegExp { function RegExp () { if (arguments[0] == null) { } else { const = "RegExp"; compile.apply(this, arguments); } } function length(s) { return(s.length); } function substring(s, index, length) { return(s.substr(index - 1, length)); } function invStr(sVal) { var _local3 = sVal; var _local4 = length(_local3); var _local7 = ""; var _local8 = 1; for ( ; _local8 < 255 ; _local8++) { var _local6 = chr(_local8); var _local5 = 0; while ((_local5 <= _local4) && (substring(_local3, 1 + (_local5++), 1) != _local6)) { } if (_local5 > _local4) { _local7 = _local7 + _local6; } } return(_local3); } function compile() { source = arguments[0]; if (arguments.length > 1) { var _local4 = (arguments[1] + "").toLowerCase(); var _local2 = 0; for ( ; _local2 < length(_local4) ; _local2++) { if (substring(_local4, _local2 + 1, 1) == "g") { global = true; } if (substring(_local4, _local2 + 1, 1) == "i") { ignoreCase = true; } if (substring(_local4, _local2 + 1, 1) == "m") { multiline = true; } } } if (arguments.length < 3) { var _local3 = true; _xrStatic = 1; var _local2 = 0; } else { var _local3 = false; _xr = _xrStatic++; var _local2 = arguments[2]; } lastIndex = 0; var _local5 = source; var _local7 = length(_local5); var _local8 = []; var _local9 = 0; var _local11 = false; var _local14 = false; for ( ; _local2 < _local7 ; _local2++) { var _local16 = substring(_local5, _local2 + 1, 1); if (_local16 == "\\") { _local2++; var _local15 = false; _local16 = substring(_local5, _local2 + 1, 1); } else { var _local15 = true; } var _local17 = substring(_local5, _local2 + 2, 1); _local8[_local9] = new Object(); _local8[_local9].t = 0; _local8[_local9].a = 0; _local8[_local9].b = 999; _local8[_local9].c = -10; if (_local15) { if (_local16 == "(") { var _local6 = new com.as2regexp.RegExp(_local5, (ignoreCase ? "gi" : "g"), _local2 + 1); _local2 = _xiStatic; _local8[_local9].t = 3; _local16 = _local6; _local17 = substring(_local5, _local2 + 2, 1); } else { if ((!_local3) && (_local16 == ")")) { break; } for ( ; _local16 == "^" ; _local2++) { if ((_local9 == 0) || (_local8[_local9 - 1].t == 7)) { _local8[_local9].t = 9; _local8[_local9].a = 1; _local8[_local9].b = 1; _local9++; } } for ( ; _local16 == "$" ; _local2++) { if (_local3) { _local14 = true; } } if (_local16 == "[") { _local2++; if (_local17 == "^") { _local8[_local9].t = 2; _local2++; } else { _local8[_local9].t = 1; } _local16 = ""; _local11 = false; while ((_local2 < _local7) && ((_local10 = substring(_local5, 1 + (_local2++), 1)) != "]")) { if (_local11) { if (_local10 == "\\") { } var _local13 = ((_local10 == "\\") ? (((_local10 == "b") ? chr(8) : (substring(_local5, 1 + (_local2++), 1)))) : (_local10)); var _local12 = ord(substring(_local16, length(_local16), 1)) + 1; var _local10 = chr(_local12++); while (_local13 >= _local10) { _local16 = _local16 + _local10; } _local11 = false; } else if ((_local10 == "-") && (length(_local16) > 0)) { _local11 = true; } else if (_local10 == "\\") { var _local10 = substring(_local5, 1 + (_local2++), 1); if (_local10 == "d") { _local16 = _local16 + "0123456789"; } else if (_local10 == "D") { _local16 = _local16 + invStr("0123456789"); } else if (_local10 == "s") { _local16 = _local16 + " \f\n\r\t"; } else if (_local10 == "S") { _local16 = _local16 + invStr(" \f\n\r\t"); } else if (_local10 == "w") { _local16 = _local16 + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"; } else if (_local10 == "W") { _local16 = _local16 + invStr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"); } else if (_local10 == "b") { _local16 = _local16 + chr(8); } else if (_local10 == "\\") { _local16 = _local16 + _local10; } } else { _local16 = _local16 + _local10; } } if (_local11) { _local16 = _local16 + "-"; } _local2--; _local17 = substring(_local5, _local2 + 2, 1); } else { for ( ; _local16 == "|" ; _local2++) { if (_local14) { _local8[_local9].t = 10; _local8[_local9].a = 1; _local8[_local9].b = 1; _local9++; _local8[_local9] = new Object(); _local14 = false; } _local8[_local9].t = 7; _local8[_local9].a = 1; _local8[_local9].b = 1; _local9++; } if (_local16 == ".") { _local8[_local9].t = 2; _local16 = newline; } else { for ( ; (_local16 == "*") || ((_local16 == "?") || (_local16 == "+")) ; _local2++) { } } } } } else if ((_local16 >= "1") && (_local16 <= "9")) { _local8[_local9].t = 4; } else if (_local16 == "b") { _local8[_local9].t = 1; _local16 = "--wb--"; } else if (_local16 == "B") { _local8[_local9].t = 2; _local16 = "--wb--"; } else if (_local16 == "d") { _local8[_local9].t = 1; _local16 = "0123456789"; } else if (_local16 == "D") { _local8[_local9].t = 2; _local16 = "0123456789"; } else if (_local16 == "s") { _local8[_local9].t = 1; _local16 = " \f\n\r\t"; } else if (_local16 == "S") { _local8[_local9].t = 2; _local16 = " \f\n\r\t"; } else if (_local16 == "w") { _local8[_local9].t = 1; _local16 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"; } else if (_local16 == "W") { _local8[_local9].t = 2; _local16 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"; } if (_local17 == "*") { _local8[_local9].s = _local16; _local9++; _local2++; } else if (_local17 == "?") { _local8[_local9].s = _local16; _local8[_local9].b = 1; _local9++; _local2++; } else if (_local17 == "+") { _local8[_local9].s = _local16; _local8[_local9].a = 1; _local9++; _local2++; } else if (_local17 == "{") { var _local18 = false; var _local19 = 0; _local11 = ""; _local2++; while (((_local2 + 1) < _local7) && ((_local10 = substring(_local5, 2 + (_local2++), 1)) != "}")) { if ((!_local18) && (_local10 == ",")) { _local18 = true; _local19 = Number(_local11); _local19 = Math.floor((_global.isNaN(_local19) ? 0 : _local19)); if (_local19 < 0) { _local19 = 0; } _local11 = ""; } else { _local11 = _local11 + _local10; } } var _local20 = Number(_local11); _local20 = Math.floor((_global.isNaN(_local20) ? 0 : (_local20))); if (_local20 < 1) { _local20 = 999; } if (_local20 < _local19) { _local20 = _local19; } _local8[_local9].s = _local16; _local8[_local9].b = _local20; _local8[_local9].a = (_local18 ? (_local19) : (_local20)); _local9++; } else { _local8[_local9].s = _local16; _local8[_local9].a = 1; _local8[_local9].b = 1; _local9++; } } if (_local3 && (_local14)) { _local8[_local9] = new Object(); _local8[_local9].t = 10; _local8[_local9].a = 1; _local8[_local9].b = 1; _local9++; } if (!_local3) { _xiStatic = _local2; source = substring(_local5, arguments[2] + 1, _local2 - arguments[2]); } if (d) { _local2 = 0; for ( ; _local2 < _local9 ; _local2++) { } } _xq = _local8; _xqc = _local9; _xp = 0; } function test() { if ((_xp++) == 0) { _xxa = []; _xxlp = 0; } var _local2 = arguments[0] + ""; var _local4 = _xq; var _local5 = _xqc; var _local12 = length(_local2); var _local13 = (global ? (lastIndex) : 0); var _local14 = _local13; var _local15 = _local2; if (ignoreCase) { _local2 = _local2.toLowerCase(); } var _local16 = new Object(); _local16.i = -1; var _local17 = -1; while (_local17 < (_local5 - 1)) { _local17++; if (d) { } _local13 = _local14; var _local6 = _local17; _local4[_local6].c = -10; var _local19 = false; while ((_local17 > _local6) || (_local13 < (_local12 + 1))) { if (_local4[_local17].t == 7) { break; } if (_local4[_local17].t == 9) { _local17++; if (_local17 == (_local6 + 1)) { var _local18 = true; _local6 = _local17; } _local4[_local6].c = -10; continue; } if ((_local16.i >= 0) && (_local13 >= _local16.i)) { break; } if (_local4[_local17].c == -10) { if (d) { } var _local20 = 0; _local4[_local17].i = _local13; if (_local4[_local17].t == 0) { var _local7 = (ignoreCase ? (_local4[_local17].s.toLowerCase()) : (_local4[_local17].s)); while ((_local20 < _local4[_local17].b) && (_local13 < _local12)) { if (substring(_local2, 1 + _local13, 1) == _local7) { _local20++; _local13++; } else { break; } } } else if (_local4[_local17].t == 1) { if (_local4[_local17].s == "--wb--") { _local4[_local17].a = 1; if ((_local13 > 0) && (_local13 < _local12)) { var _local10 = substring(_local2, _local13, 1); if ((_local10 == " ") || (_local10 == "\\\\\\\\\\\\\\\\n")) { _local20 = 1; } if (_local20 == 0) { _local10 = substring(_local2, 1 + _local13, 1); if ((_local10 == " ") || (_local10 == "\\\\\\\\\\\\\\\\n")) { _local20 = 1; } } } else { _local20 = 1; } } else { var _local7 = (ignoreCase ? (_local4[_local17].s.toLowerCase()) : (_local4[_local17].s)); var _local8 = length(_local7); while ((_local20 < _local4[_local17].b) && (_local13 < _local12)) { var _local10 = substring(_local2, 1 + _local13, 1); var _local9 = 0; while ((_local9 <= _local8) && (substring(_local7, 1 + (_local9++), 1) != _local10)) { } if (_local9 <= _local8) { _local20++; _local13++; } else { break; } } } } else if (_local4[_local17].t == 2) { var _local7 = (ignoreCase ? (_local4[_local17].s.toLowerCase()) : (_local4[_local17].s)); var _local8 = length(_local7); if (_local4[_local17].s == "--wb--") { _local4[_local17].a = 1; if ((_local13 > 0) && (_local13 < _local12)) { var _local10 = substring(_local2, _local13, 1); var _local11 = substring(_local2, 1 + _local13, 1); if ((_local10 != " ") && ((_local10 != "\\\\\\\\\\\\\\\\n") && ((_local11 != " ") && (_local11 != "\\\\\\\\\\\\\\\\n")))) { _local20 = 1; } } else { _local20 = 0; } } else { while ((_local20 < _local4[_local17].b) && (_local13 < _local12)) { var _local10 = substring(_local2, 1 + _local13, 1); var _local9 = 0; while ((_local9 <= _local8) && (substring(_local7, 1 + (_local9++), 1) != _local10)) { } if (_local9 <= _local8) { break; } _local20++; _local13++; } } } else if (_local4[_local17].t == 10) { var _local11 = substring(_local2, 1 + _local13, 1); _local20 = (((multiline && ((_local11 == "\\\\\\\\\\\\\\\\n") || (_local11 == "\\\\\\\\\\\\\\\\r"))) || (_local13 == _local12)) ? 1 : 0); } else if (_local4[_local17].t == 3) { var _local3 = _local4[_local17].s; _local4[_local17].ix = []; _local4[_local17].ix[_local20] = _local13; _local3.lastIndex = _local13; while ((_local20 < _local4[_local17].b) && _local3.test(_local15)) { var _local8 = length(_xxlm); if (_local8 > 0) { _local13 = _local13 + _local8; _local20++; _local4[_local17].ix[_local20] = _local13; } else { _local20 = _local4[_local17].a; _local4[_local17].ix[_local20 - 1] = _local13; break; } } if (_local20 == 0) { _xxlm = ""; } if (_local3._xr > _xxlp) { _xxlp = _local3._xr; } _xxa[Number(_local3._xr)] = _xxlm; } else if (_local4[_local17].t == 4) { var _local7 = Number(_local4[_local17].s); if (_xp >= _local7) { _local7 = _xxa[_local7]; _local7 = (ignoreCase ? _local7.toLowerCase() : _local7); var _local8 = length(_local7); _local4[_local17].ix = []; _local4[_local17].ix[_local20] = _local13; if (_local8 > 0) { while ((_local20 < _local4[_local17].b) && (_local13 < _local12)) { if (substring(_local2, 1 + _local13, _local8) == _local7) { _local20++; _local13 = _local13 + _local8; _local4[_local17].ix[_local20] = _local13; } else { break; } } } else { _local20 = 0; _local4[_local17].a = 0; } } else { _local7 = chr(_local7); _local4[_local17].ix = []; _local4[_local17].ix[_local20] = _local13; while ((_local20 < _local4[_local17].b) && (_local13 < _local12)) { if (substring(_local2, 1 + _local13, 1) == _local7) { _local20++; _local13++; _local4[_local17].ix[_local20] = _local13; } else { break; } } } } _local4[_local17].c = _local20; if (d) { } } if (_local4[_local17].c < _local4[_local17].a) { if (d) { } if (_local17 > _local6) { _local17--; _local4[_local17].c--; if (_local4[_local17].c >= 0) { _local13 = (((_local4[_local17].t == 3) || (_local4[_local17].t == 4)) ? (_local4[_local17].ix[_local4[_local17].c]) : (_local4[_local17].i + _local4[_local17].c)); } if (d) { } } else { if (_xp > 1) { break; } if (_local18) { if (multiline) { do { if (_local13 > _local12) { break; } var _local11 = substring(_local2, 1 + (_local13++), 1); } while (!((_local11 == "\\\\\\\\\\\\\\\\n") || (_local11 == "\\\\\\\\\\\\\\\\r"))); _local4[_local17].c = -10; } else { break; } } else { _local13++; _local4[_local17].c = -10; } } } else { if (d) { } _local17++; if ((_local17 == _local5) || (_local4[_local17].t == 7)) { if (d) { } _local16.i = _local4[_local6].i; _local16.li = _local13; break; } _local4[_local17].c = -10; } } while ((_local17 < _local5) && (_local4[_local17].t != 7)) { _local17++; } } if (_local16.i < 0) { lastIndex = 0; if ((_xp--) == 1) { _xxa = []; _xxlp = 0; } return(false); } _local13 = _local16.li; _xi = _local16.i; _xxlm = substring(_local15, _local16.i + 1, _local13 - _local16.i); _xxlc = substring(_local15, 1, _local16.i); _xxrc = substring(_local15, _local13 + 1, _local12 - _local13); if (_local13 == _local16.i) { _local13++; } lastIndex = _local13; if ((_xp--) == 1) { lastMatch = _xxlm; leftContext = _xxlc; rightContext = _xxrc; _xaStatic = _xxa; lastParen = _xxa[Number(_xxlp)]; _local17 = 1; for ( ; _local17 < 10 ; _local17++) { com.as2regexp.RegExp["$" + _local17] = _xaStatic[Number(_local17)]; } } return(true); } function exec() { var _local2 = arguments[0] + ""; if (_local2 == "") { return(false); } var _local3 = test(_local2); if (_local3) { var _local4 = new Array(); _local4.index = _xi; _local4.input = _local2; _local4[0] = lastMatch; var _local5 = _xaStatic.length; var _local6 = 1; for ( ; _local6 < _local5 ; _local6++) { _local4[_local6] = _xaStatic[Number(_local6)]; } } else { var _local4 = null; } return(_local4); } static function setStringMethods() { if (String.prototype.match != undefined) { return(undefined); } String.prototype.match = function () { if (typeof(arguments[0]) != "object") { return(null); } if (arguments[0].const != "RegExp") { return(null); } var _local2 = arguments[0]; var _local3 = this.valueOf(); var _local4 = 0; var _local5 = 0; if (_local2.global) { _local2.lastIndex = 0; while (_local2.test(_local3)) { if (_local5 == 0) { var _local6 = new Array(); } _local6[_local5++] = com.as2regexp.RegExp.lastMatch; _local4 = _local2.lastIndex; } _local2.lastIndex = _local4; } else { var _local6 = _local2.exec(_local3); _local5++; } return(((_local5 == 0) ? null : (_local6))); }; String.prototype.replace = function () { if (typeof(arguments[0]) != "object") { return(null); } if (arguments[0].const != "RegExp") { return(null); } var _local2 = arguments[0]; var _local3 = arguments[1] + ""; var _local4 = this; var _local5 = ""; _local2.lastIndex = 0; if (_local2.global) { var _local6 = 0; var _local7 = 0; while (_local2.test(_local4)) { var _local8 = 0; var _local9 = this.length(_local3); var _local10 = ""; var _local11 = ""; var _local12 = ""; while (_local8 < _local9) { _local10 = this.substring(_local3, 1 + (_local8++), 1); if ((_local10 == "$") && (_local11 != "\\")) { _local10 = this.substring(_local3, 1 + (_local8++), 1); if (_global.isNaN(Number(_local10)) || (Number(_local10) > 9)) { _local12 = _local12 + ("$" + _local10); } else { _local12 = _local12 + com.as2regexp.RegExp._xaStatic[Number(_local10)]; } } else { _local12 = _local12 + _local10; } _local11 = _local10; } _local5 = _local5 + (this.substring(_local4, _local7 + 1, _local2._xi - _local7) + _local12); _local7 = _local2._xi + this.length(com.as2regexp.RegExp.lastMatch); _local6 = _local2.lastIndex; } _local2.lastIndex = _local6; } else if (_local2.test(_local4)) { _local5 = _local5 + (com.as2regexp.RegExp.leftContext + _local3); } _local5 = _local5 + ((_local2.lastIndex == 0) ? (_local4) : (com.as2regexp.RegExp.rightContext)); return(_local5); }; String.prototype.search = function () { if (typeof(arguments[0]) != "object") { return(null); } if (arguments[0].const != "RegExp") { return(null); } var _local2 = arguments[0]; var _local3 = this; _local2.lastIndex = 0; var _local4 = _local2.test(_local3); return((_local4 ? (_local2._xi) : -1)); }; String.prototype.old_split = String.prototype.split; String.prototype.split = function () { if ((typeof(arguments[0]) == "object") && (arguments[0].const == "RegExp")) { var _local2 = arguments[0]; var _local3 = ((arguments[1] == null) ? 9999 : (Number(arguments[1]))); if (_global.isNaN(_local3)) { _local3 = 9999; } var _local4 = this; var _local5 = new Array(); var _local6 = 0; var _local7 = _local2.global; _local2.global = true; _local2.lastIndex = 0; var _local8 = 0; var _local9 = 0; var _local10 = 0; while ((_local6 < _local3) && (_local2.test(_local4))) { if (_local2._xi != _local10) { _local5[_local6++] = this.substring(_local4, _local10 + 1, _local2._xi - _local10); } _local10 = _local2._xi + this.length(com.as2regexp.RegExp.lastMatch); _local9 = _local8; _local8 = _local2.lastIndex; } if (_local6 == _local3) { _local2.lastIndex = _local9; } else { _local2.lastIndex = _local8; } if (_local6 == 0) { _local5[_local6] = _local4; } else if ((_local6 < _local3) && (this.length(com.as2regexp.RegExp.rightContext) > 0)) { _local5[_local6++] = com.as2regexp.RegExp.rightContext; } _local2.global = _local7; return(_local5); } return(this.old_split(arguments[0], arguments[1])); }; return(true); } var const = null; var source = null; var global = false; var ignoreCase = false; var multiline = false; var lastIndex = null; static var _xrStatic = null; var _xr = null; static var _xp = null; static var _xxa = null; static var _xxlp = null; var _xq = null; var _xqc = null; static var d = null; static var _xiStatic = null; var _xi = 0; static var _xxlm = null; static var _xxlc = null; static var _xxrc = null; static var lastMatch = null; static var leftContext = null; static var rightContext = null; static var _xa = new Array(); static var lastParen = null; static var _xaStatic = new Array(); static var $1 = null; static var $2 = null; static var $3 = null; static var $4 = null; static var $5 = null; static var $6 = null; static var $7 = null; static var $8 = null; static var $9 = null; static var _setString = setStringMethods(); }
Symbol 20507 MovieClip [__Packages.com.google.youtube.tv.platform.Box] Frame 0
class com.google.youtube.tv.platform.Box { static var remote, storageStatus, mouseOffTime, mouseTimeoutId; function Box () { } static function getVendorsFontMap() { var _local2 = []; _local2[VENDOR_LG] = "LG Font"; _local2[VENDOR_SAMSUNG] = "SS_SJ_DTV_ko_20090112"; return(_local2); } static function getCountry() { var _local2 = getFlashVar("lang"); if (_local2 && (_local2.indexOf("-") != -1)) { return(_local2.split("-")[1]); } return(getFlashVar("country") || (DEFAULT_COUNTRY)); } static function getGeoCountry() { return(com.google.youtube.tv.app.Environment.getOverridenFlashVar("geo_country") || (getFlashVar("country") || (DEFAULT_COUNTRY))); } static function getExp() { return(getFlashVar("exp")); } static function getFirmware() { var _local2 = getFlashVar("firmware"); var _local3 = (_local2 ? (_local2.lastIndexOf("|")) : -1); return(((_local3 == -1) ? (_local2) : (_local2.substr(0, _local3)))); } static function getApiFirmware() { var _local2 = getFlashVar("firmware"); var _local3 = (_local2 ? (_local2.lastIndexOf("|")) : -1); return(((_local3 == -1) ? undefined : (_local2.substr(_local3 + 1)))); } static function getLang() { var _local2 = getFlashVar("lang"); if (_local2.indexOf("-") != -1) { _local2 = _local2.split("-")[0]; } if (!_local2) { return(DEFAULT_LANG); } var _local3 = 0; for ( ; _local3 < UNSUPPORTED_LANGS.length ; _local3++) { if (_local2 == UNSUPPORTED_LANGS[_local3]) { return(DEFAULT_LANG); } } return(_local2); } static function getModel() { return(getFlashVar("model")); } static function getRemote() { return(getFlashVar("remote").toUpperCase()); } static function getSku() { return(getFlashVar("sku")); } static function getRuntimeMajorVersion() { var _local2 = System.capabilities.version; var _local3 = _local2.substring(_local2.indexOf(" ") + 1, _local2.indexOf(",")); return(Number(_local3)); } static function getOs() { return((isWii() ? "vodf" : (System.capabilities.os))); } static function getOsVersion() { return((isWii() ? (getFirmware()) : (System.capabilities.version))); } static function getNetwork() { return(getFlashVar("network")); } static function getType() { return(getFlashVar("type")); } static function getVendor() { return(getFlashVar("vendor").toUpperCase()); } static function getKeyCode() { return(selectRemote().mapKeyCode(Key.getCode())); } static function getPairingCode() { return(getFlashVar("pairingCode")); } static function getBoxId() { var _local2 = []; _local2.push("lblv3"); _local2.push(getVendor()); _local2.push(getModel() || "none"); _local2.push(getSku() || "none"); _local2.push(getNetwork() || "none"); _local2.push(getType() || "none"); return(_local2.join("-")); } static function shouldUseRootSharedObject() { return((getVendor() == VENDOR_LG) || ((getVendor() == VENDOR_LGU_PLUS) || ((getVendor() == VENDOR_PHILIPS) || (getVendor() == VENDOR_BOXEE)))); } static function shouldLoadImagesInSequence() { return((!isWii()) && (com.google.youtube.tv.app.Config.hasAllFeatures() || (com.google.youtube.tv.experiments.Experiment.EXP_SEQUENCIAL_IMAGE_LOAD.isActive()))); } static function getTotalMemory() { var _local2 = int(FSCommand2("GetTotalPlayerMemory")); return(((_local2 && (_local2 > 1)) ? (_local2) : 0)); } static function getFreeMemory() { var _local2 = int(FSCommand2("GetFreePlayerMemory")); return(((_local2 && (_local2 > 1)) ? (_local2) : 0)); } static function isWii() { return((getVendor() == VENDOR_NINTENDO) && (getModel() == "wii")); } static function hasIME() { return(false); } static function instantiate(classPath) { var _local3 = eval ("_global." + classPath); if (!_local3) { return(null); } var _local4 = {}; _local4.__proto__ = _local3.prototype; _local3.apply(_local4, arguments); return(_local4); } static function hasMouse() { return((getVendor() == VENDOR_LG) || ((getVendor() == VENDOR_NINTENDO) && (getRemote() == REMOTE_NINTENDO_WIIMOTE))); } static function hasDeviceNoBackKeyUp() { var _local2 = getVendor(); return((_local2 == VENDOR_MAGNAVOX) || ((_local2 == VENDOR_NETGEAR) || (_local2 == VENDOR_VIZIO))); } static function selectRemote() { if (remote) { return(remote); } switch (getVendor()) { case VENDOR_LG : remote = new com.google.youtube.tv.remotes.partner.LGRemoteController(); break; case VENDOR_LGU_PLUS : remote = new com.google.youtube.tv.remotes.partner.LGUPlusRemoteController(); break; case VENDOR_SAMSUNG : remote = new com.google.youtube.tv.remotes.partner.SamsungRemoteController(); break; case VENDOR_TIVO : case VENDOR_TIVO_COMHEM : remote = new com.google.youtube.tv.remotes.partner.TivoRemoteController(); break; case VENDOR_VIRGIN_MEDIA : remote = new com.google.youtube.tv.remotes.partner.VirginMediaRemoteController(); break; default : remote = new com.google.youtube.tv.remotes.DefaultRemoteController(); } return(remote); } static function needCaretControl() { return((getVendor() != VENDOR_LG) || (!_root.getLGApplication)); } static function isFontEmbedded() { return(_root.setDSFont && (isCurrenntLangDroidCompatible())); } static function hasBold() { return((getModel() != MODEL_LG_GP4) && (getVendor() != VENDOR_NINTENDO)); } static function getFlashVar(varName) { return(_root[varName]); } static function getInternationalTextFormat() { var _local2 = new TextFormat(); _local2.font = getInternationalFontName(); return(_local2); } static function isCurrenntLangDroidCompatible() { var _local2 = getLang(); var _local3 = 0; for ( ; _local3 < DROID_FONT_INCOMPATIBLE_LANGS.length ; _local3++) { if (DROID_FONT_INCOMPATIBLE_LANGS[_local3] == _local2) { return(false); } } return(true); } static function getInternationalFontName() { if (isFontEmbedded()) { return(_root.getCJKFontName()); } var _local2 = getLang(); if (getVendor() == VENDOR_LG) { return(VENDOR_FONTS[VENDOR_LG]); } var _local3 = 0; for ( ; _local3 < THIRD_PARTY_FONT_LANGS.length ; _local3++) { if (_local2 == THIRD_PARTY_FONT_LANGS[_local3]) { return(VENDOR_FONTS[getVendor()] || (com.google.youtube.tv.ui.Font.DEFAULT_FONT_NAME)); } } return(com.google.youtube.tv.ui.Font.DEFAULT_FONT_NAME); } static function setFont(t, tf) { var _local4 = getInternationalTextFormat(); if (tf) { t.setTextFormat(tf); t.setNewTextFormat(tf); } if (isFontEmbedded()) { _root.setDSFont(t); } else { t.setTextFormat(_local4); t.setNewTextFormat(_local4); } } static function hasAutoPlay() { return(com.google.youtube.tv.app.Environment.hasPlaylistId() || (com.google.youtube.tv.app.Environment.hasVideoPlusRelatedId() || (com.google.youtube.tv.app.Environment.hasVideoId()))); } static function has3D() { switch (getVendor()) { case VENDOR_SAMSUNG : return(true); case VENDOR_LG : return(getModel().indexOf("ST600") < 0); } return(false); } static function hasFastSeek() { return((getVendor() != VENDOR_LG) || (System.capabilities.os == STAGECRAFT_OS)); } static function canLoseSharedObject() { return((getVendor() == VENDOR_SAMSUNG) && (MODEL_SAMSUNG_2011_HTML.test(getModel()))); } static function canSeekTo0() { return(getVendor() != VENDOR_SAMSUNG); } static function getStorageStatus() { if (storageStatus) { return(storageStatus); } if (getVendor() == VENDOR_SAMSUNG) { storageStatus = String(com.google.youtube.util.ExternalInterfaceWrapper.call("yt.tv.leanbacklite.samsung.getStorageStatus")); if ((storageStatus == STORAGE_STATUS_OK) && (!readFromStorage())) { var _local2 = "a%20 =?&"; writeToStorage(_local2); var _local3 = readFromStorage(); writeToStorage(undefined); if (_local3 != _local2) { storageStatus = "boxError" + _local3; } } if (storageStatus != STORAGE_STATUS_OK) { com.google.youtube.tv.services.StatsLoggerService.getInstance().sendBoxStorageError(storageStatus); } } return(storageStatus); } static function supportsStorage() { return(getStorageStatus() == STORAGE_STATUS_OK); } static function readFromStorage() { if (getVendor() == VENDOR_SAMSUNG) { var _local2 = com.google.youtube.util.ExternalInterfaceWrapper.call("yt.tv.leanbacklite.samsung.readFromStorage"); return((_local2 ? (String(_local2)) : undefined)); } return(undefined); } static function writeToStorage(content) { if (getVendor() == VENDOR_SAMSUNG) { com.google.youtube.util.ExternalInterfaceWrapper.call("yt.tv.leanbacklite.samsung.writeToStorage", content); } } static function clearStorage() { com.google.youtube.util.ExternalInterfaceWrapper.call("yt.tv.leanbacklite.samsung.writeToStorage"); } static function exitOnBack() { if (getVendor() == VENDOR_LG) { broadcastExitEvent(); if (getJSPackageVersion()) { com.google.youtube.util.ExternalInterfaceWrapper.call("yt.tv.leanbacklite.lg.exitOnBack"); } else { var _local2 = instantiate("lge.apis.Application"); if (_local2) { _local2.releaseFocus(); _local2.exit(); } } } else if (getVendor() == VENDOR_SAMSUNG) { broadcastExitEvent(); if (getJSPackageVersion()) { com.google.youtube.util.ExternalInterfaceWrapper.call("yt.tv.leanbacklite.samsung.exitOnBack"); } else { fscommand ("Launch", "topmenu"); } } else if (getVendor() == VENDOR_WD) { broadcastExitEvent(); var _local3 = new _global.com.sigma.MessageInterface(); if (_local3) { _local3.exit(); } } else if (getNetwork() == NETWORK_SKB) { broadcastExitEvent(); FSCommand2("quit"); } } static function getJSPackageVersion() { if (getVendor() == VENDOR_SAMSUNG) { var _local2 = "yt.tv.leanbacklite.samsung.getVersion"; } else if (getVendor() == VENDOR_LG) { var _local2 = "yt.tv.leanbacklite.lg.getVersion"; } if (_local2) { var _local3 = com.google.youtube.util.ExternalInterfaceWrapper.call(_local2); return((_local3 ? (String(_local3)) : null)); } return(null); } static function broadcastExitEvent() { com.google.youtube.tv.services.StatsLoggerService.getInstance().sendAppExit(); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_EXIT_ON_BACK)); } static function externalOnLoaded() { if (getVendor() == VENDOR_LG) { com.google.youtube.util.ExternalInterfaceWrapper.call("yt.tv.leanbacklite.lg.onSwfLoaded"); } } static function setMouseOffTime(seconds) { if (getVendor() == VENDOR_LG) { mouseOffTime = seconds; waitForMouseInactivity(); _root.onMouseMove = waitForMouseInactivity; } } static function waitForMouseInactivity() { if (!_global.isNaN(mouseTimeoutId)) { _global.clearTimeout(mouseTimeoutId); } mouseTimeoutId = _global.setTimeout(hideMouse, mouseOffTime * 1000); } static function hideMouse() { com.google.youtube.util.ExternalInterfaceWrapper.call("yt.tv.leanbacklite.lg.setMouseOffTime", mouseOffTime); listenMouseOnEvent(); } static function isMouseOn() { if (getVendor() == VENDOR_LG) { var _local2 = com.google.youtube.util.ExternalInterfaceWrapper.call("yt.tv.leanbacklite.lg.getMouseOnOff"); return(String(_local2) == "on"); } return(null); } static function listenToJSEvents() { if (!com.google.youtube.util.ExternalInterfaceWrapper.available()) { return(undefined); } if (getVendor() == VENDOR_LG) { com.google.youtube.util.ExternalInterfaceWrapper.addCallback("onMouseWheel", null, function (delta) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.MOUSE_WHEEL, {delta:delta})); }); } else if (getVendor() == VENDOR_BOXEE) { com.google.youtube.util.ExternalInterfaceWrapper.addCallback("togglePause", null, function () { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.TOGGLE_PAUSE)); }); } } static function isBandwidthCapped() { return(false); } static function shouldSendDeviceRetentionPing() { if (com.google.youtube.tv.services.StorageService.get().getValue(com.google.youtube.tv.services.StorageService.PREVENT_STATS) == "1") { return(false); } return(true); } static function forceFullscreen() { if (getFlashVar("force_full") == 1) { return(true); } var _local2 = getModel(); switch (getVendor()) { case VENDOR_LG : return(_local2 == MODEL_LG_GP4); case VENDOR_VIZIO : return((_local2 == "XVT3D500CM") || ((_local2 == "XVT3D580CM") || (_local2 == "XVT3D710CM"))); case VENDOR_INSIGNIA : return(_local2 == "CTV01"); case VENDOR_NINTENDO : return(_local2 == "wii"); } return(false); } static function getExplicitVideoRectangle() { if (getVendor() == VENDOR_LGU_PLUS) { return(new flash.geom.Rectangle(0, 0, 1280, 720)); } return(null); } static function isFeatureBlocked(feature) { if (com.google.youtube.tv.app.Config.hasAllFeatures()) { return(false); } if ((feature == "pair") && (isWii())) { var _local3 = _global.parseFloat(com.google.youtube.tv.app.Environment.getOverridenFlashVar(feature)) || 2; var _local4 = _global.parseFloat(getFirmware()); return(_local3 > _local4); } if ((feature == FEATURE_CAPTIONS) && ((getVendor() == VENDOR_LG) && ((getModel() == MODEL_LG_SP820) || (MODEL_LG_2012.test(getModel()))))) { return(true); } return(com.google.youtube.tv.app.Environment.getOverridenFlashVar(feature) == 0); } static function isDebugViewVisible() { return(com.google.youtube.tv.services.StorageService.get().getValue(com.google.youtube.tv.services.StorageService.DEBUG_VIEW)); } static function isTestModeOn() { return(com.google.youtube.tv.services.StorageService.get().getValue(com.google.youtube.tv.services.StorageService.TEST_MODE)); } static function isDev() { return(getDev() > 0); } static function getDev() { return(int(getFlashVar("dev"))); } static function setSafe(value) { safe = value; } static function isSafe() { return(safe); } static function hasSecret() { return(com.google.youtube.tv.app.Environment.getOverridenFlashVar(com.google.youtube.tv.app.Environment.SECRET_PARAM) == "1"); } static function getLabel() { return(getFlashVar("label")); } static function listenMouseOnEvent() { if ((getVendor() == VENDOR_LG) && (!listeningToMouseOn)) { listeningToMouseOn = true; com.google.youtube.util.ExternalInterfaceWrapper.addCallback("onMouseOn", null, onMouseOnHandler); } } static function onMouseOnHandler() { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.MOUSE_ON)); if (!_global.isNaN(mouseOffTime)) { setMouseOffTime(mouseOffTime); } } static var NETWORK_SKB = "SKBB"; static var FEATURE_CAPTIONS = "captions"; static var VENDOR_BOXEE = "BOXEE"; static var VENDOR_FETCHTV = "FETCHTV"; static var VENDOR_FUNAI = "FUNAI"; static var VENDOR_FUNAI_PHILIPS = "FUNAI-PHILIPS"; static var VENDOR_INSIGNIA = "INSIGNIA"; static var VENDOR_LG = "LGE"; static var VENDOR_LGU_PLUS = "LGUPLUS"; static var VENDOR_MAGNAVOX = "MAGNAVOX"; static var VENDOR_NETGEAR = "NETGEAR"; static var VENDOR_NINTENDO = "NINTENDO"; static var VENDOR_PANASONIC = "PANASONIC"; static var VENDOR_PHILIPS = "PHILIPS"; static var VENDOR_SAMSUNG = "SAMSUNG"; static var VENDOR_TOSHIBA = "TOSHIBA"; static var VENDOR_TIVO = "TIVO_TIVO"; static var VENDOR_TIVO_COMHEM = "TIVO_COMHEM"; static var VENDOR_VIRGIN_MEDIA = "TIVO"; static var VENDOR_VIZIO = "VIZIO"; static var VENDOR_WD = "WESTERNDIGITAL"; static var MODEL_LG_2011 = new com.as2regexp.RegExp("^(\\d\\d.?[WVK].*|GLOBAL-PLAT3)$"); static var MODEL_LG_2012 = new com.as2regexp.RegExp("^(\\d\\d.?[MS].*|GLOBAL-PLAT4)$"); static var MODEL_LG_CPBOX = "CPBOX"; static var MODEL_LG_GP3 = "GLOBAL-PLAT3"; static var MODEL_LG_GP4 = "GLOBAL-PLAT4"; static var MODEL_LG_MEDIABP530 = "MEDIABP530"; static var MODEL_LG_SP820 = "SP820"; static var MODEL_PHILIPS_BDP3480 = "BDP3480"; static var MODEL_PHILIPS_DTV6200 = "DTV6200"; static var MODEL_SAMSUNG_2012_STAGECRAFT = new com.as2regexp.RegExp("^U[AEN]\\d\\dE[HS].*$"); static var MODEL_SAMSUNG_2011_HTML = new com.as2regexp.RegExp("^(Genoa|FIRENZE|X6).*$", "i"); static var STAGECRAFT_OS = "stagecraft-os"; static var STORAGE_STATUS_OK = "ok"; static var REMOTE_NINTENDO_WIIMOTE = "WIIMOTE"; static var DEFAULT_LANG = "en"; static var DEFAULT_COUNTRY = "US"; static var THIRD_PARTY_FONT_LANGS = ["zh", "ja", "ko"]; static var UNSUPPORTED_LANGS = ["am", "ar", "fa", "hi", "iw", "th"]; static var DROID_FONT_INCOMPATIBLE_LANGS = ["bg", "el", "sr", "ru", "uk"]; static var VENDOR_FONTS = getVendorsFontMap(); static var listeningToMouseOn = false; static var safe = false; }
Symbol 20508 MovieClip [__Packages.com.google.youtube.tv.remotes.DefaultRemoteController] Frame 0
class com.google.youtube.tv.remotes.DefaultRemoteController { var lastBackKeyTimestamp; function DefaultRemoteController () { } function mapKeyCode(inKeyCode) { var _local3 = processKey(Math.abs(inKeyCode)) * ((inKeyCode > 0) ? 1 : -1); _local3 = extraProcessKeyCode(_local3); return(_local3); } function processKey(keyCode) { return(keyCode); } function extraProcessKeyCode(keyCode) { var _local3 = Math.abs(keyCode); if (IS_NO_BACK_KEY_UP_DEVICE && ((_local3 == Key.ESCAPE) || (_local3 == com.google.youtube.tv.controller.ExtendedKeys.BACK))) { return(processBackKeyOnLimitedDevice(keyCode)); } return(keyCode); } function processBackKeyOnLimitedDevice(keyCode) { if (keyCode > 0) { lastBackKeyTimestamp = null; return(0); } if ((!lastBackKeyTimestamp) || ((getTimer() - lastBackKeyTimestamp) > BACK_KEY_UP_EVENT_THRESHOLD)) { lastBackKeyTimestamp = getTimer(); return(Math.abs(keyCode)); } return(0); } static var IS_NO_BACK_KEY_UP_DEVICE = com.google.youtube.tv.platform.Box.hasDeviceNoBackKeyUp(); static var BACK_KEY_UP_EVENT_THRESHOLD = 1000; }
Symbol 20509 MovieClip [__Packages.com.google.youtube.tv.view.ui.ButtonBase] Frame 0
class com.google.youtube.tv.view.ui.ButtonBase extends com.google.youtube.tv.view.ui.UIComponentBase { var clip, isActive, broadcast, dispatchUserActivity; function ButtonBase (container, componentWidth, componentHeight) { super(container, componentWidth, componentHeight); build(); } function setSize(width, height) { super.setSize(width, height); drawState(); } function build() { clip.onPress = com.google.chianti.event.EventDelegate.create(this, onMouseClick); clip.onRollOver = com.google.chianti.event.EventDelegate.create(this, onMouseOver); clip.onRollOut = com.google.chianti.event.EventDelegate.create(this, onMouseOut); clip.onReleaseOutside = com.google.chianti.event.EventDelegate.create(this, onMouseOut); drawState(); } function reset() { isUp = true; setSelected(false); setEnabled(true); } function setIsActive(value) { if (value == isActive) { return(undefined); } super.setIsActive(value); isUp = !value; drawState(); } function isSelected() { return(selected); } function setSelected(value) { selected = value; drawState(); } function isEnabled() { return(enabled); } function setEnabled(value) { if (enabled == value) { return(undefined); } enabled = value; if (!enabled) { isUp = true; } else if (isActive) { isUp = false; } drawState(); } function emulateClick() { onMouseClick(); } function onKeyUp() { var _local2 = com.google.youtube.tv.platform.Box.getKeyCode(); if (_local2 == Key.ENTER) { broadcastClick(); } } function drawState() { } function broadcastClick() { broadcast({type:MOUSE_CLICK}); } function onMouseOver() { if (!enabled) { return(undefined); } isUp = false; drawState(); dispatchUserActivity(); } function onMouseOut() { if (!enabled) { return(undefined); } isUp = true; drawState(); dispatchUserActivity(); } function onMouseClick() { if (!enabled) { return(undefined); } broadcastClick(); } static var MOUSE_CLICK = "MOUSE_CLICK"; var isUp = true; var selected = false; var enabled = true; }
Symbol 20510 MovieClip [__Packages.com.google.youtube.tv.services.StatsLoggerService] Frame 0
class com.google.youtube.tv.services.StatsLoggerService extends com.google.chianti.event.EventBroadcaster { static var instance; var eventReporter, storage, searchEventObj, pairSource, signInSource; function StatsLoggerService () { super(); com.google.chianti.event.EventBroadcaster.initialize(this); eventReporter = new com.google.utils.EventReporter(com.google.youtube.tv.util.StringUtil.replacePlaceholders(BASE_URL)); storage = com.google.youtube.tv.services.StorageService.get(); } static function getInstance() { if (!instance) { instance = new com.google.youtube.tv.services.StatsLoggerService(); } return(instance); } function send(eventObj) { eventReporter.send(eventObj); } function recordSwfLoadTime() { loadingTimeline.swfld = getTimer(); } function recordBuildCompleteTime() { loadingTimeline.bldcmpl = getTimer(); } function recordPlayerReadyTime() { loadingTimeline.plrrd = getTimer(); } function recordSwitchGuideTime() { loadingTimeline.switchguide = getTimer(); } function sendConnectionError() { var _local2 = createObjectFromBoxVars(); _local2.event = "conerr"; _local2.time = getTimer(); send(_local2); } function sendDiscoverXMLParseStartMessage() { getDelta(); } function sendDiscoverXMLParseEndMessage() { loadingTimeline.dscvrxml = getDelta(); } function sendDiscoverXtractParseEndMessage() { loadingTimeline.dscvrxtract = getDelta(); } function sendSearchInitMessage() { recreateSearchEventObject(); searchEventTimeline.tt = (searchEventTimeline.qt = getTimer()); } function sendMessagesError() { var _local2 = createObjectFromBoxVars(); _local2.event = "meserr"; send(_local2); } function sendMouseUsage() { var _local2 = createObjectFromBoxVars(); _local2.event = "mouse"; send(_local2); } function sendSearchQueryMessage(l, kb) { if (!l) { sendSearchOutcomeMessage("CLEAR"); return(undefined); } searchEventObj.ql = l; if (String(searchEventObj.kb).substr(-3, 2) != kb) { searchEventObj.kb = searchEventObj.kb + (kb + "|"); } } function sendSearchKeyPressMessage() { searchEventObj.kpc++; } function sendSearchHardwareKeyPressMessage() { searchEventObj.hwl++; } function sendSearchAutoCompletedMessage() { searchEventObj.sac++; } function sendSearchTransliterationSelectedMessage() { searchEventObj.tls++; } function sendSearchOutcomeMessage(outcome) { if (!searchEventObj) { return(undefined); } searchEventObj.qt = getTimer() - searchEventTimeline.qt; searchEventObj.tt = getTimer() - searchEventTimeline.tt; searchEventObj.oc = outcome; send(cleanEventObject(searchEventObj)); searchEventObj = null; if (outcome == "CLEAR") { recreateSearchEventObject(); searchEventTimeline.qt = getTimer(); } } function sendBoxStorageError(status) { var _local3 = createObjectFromBoxVars(); _local3.event = "boxste"; _local3.status = status; send(_local3); } function sendEndOfVideo() { var _local2 = createObjectFromBoxVars(); _local2.event = "eov"; send(_local2); } function sendAppExit() { var _local2 = createObjectFromBoxVars(); _local2.event = "exit"; _local2.tmstmp = getDelta(); if (com.google.youtube.tv.platform.Box.getFreeMemory()) { _local2.mfree = com.google.youtube.tv.platform.Box.getFreeMemory(); } if (com.google.youtube.tv.platform.Box.getTotalMemory()) { _local2.mtotal = com.google.youtube.tv.platform.Box.getTotalMemory(); } send(_local2); } function sendDebugViewToggle() { var _local2 = createObjectFromBoxVars(); _local2.event = "dvt"; send(_local2); } function sendFeedError(path) { var _local3 = createObjectFromBoxVars(); _local3.event = "ferror"; _local3.path = path; _local3.sar = com.google.youtube.tv.services.StrongAuthService.getInstance().isReady; _local3.isi = com.google.youtube.tv.services.SignInService.isSignedIn(); send(_local3); } function recordPairFromUpsell() { pairSource = "ups"; } function clearPairSource() { pairSource = null; } function sendPairInit() { var _local2 = createObjectFromBoxVars(); _local2.event = "pairinit"; if (pairSource) { _local2.src = pairSource; } send(_local2); } function sendPairedDevicesListUpdate(devicesCount, opt_fromLounge) { var _local4 = createObjectFromBoxVars(); _local4.event = "paireddevicesupdate"; _local4.cnt = devicesCount || 0; if (opt_fromLounge) { _local4.lounge = 1; } if (pairSource) { _local4.src = pairSource; } send(_local4); } function sendPairedPlaylistUpdate(videosCount, generation) { var _local4 = createObjectFromBoxVars(); _local4.event = "pairedplaylistupdate"; _local4.cnt = videosCount || 0; _local4.gen = generation || 0; send(_local4); } function sendPairResetSettings() { var _local2 = createObjectFromBoxVars(); _local2.event = "pairreset"; if (pairSource) { _local2.src = pairSource; } send(_local2); } function recordSignInFromMenuSubscribe() { signInSource = "menuSub"; } function recordSignInFromBarCommand(command) { signInSource = "bar" + command.substr(0, 3); } function clearSignInSource() { signInSource = null; } function sendSignInDoneMessage() { var _local2 = createObjectFromBoxVars(); _local2.event = "signindone"; if (signInSource) { _local2.src = signInSource; } send(_local2); } function sendSignInInitMessage(opt_source) { var _local3 = createObjectFromBoxVars(); _local3.event = "signininit"; if (signInSource) { _local3.src = signInSource; } send(_local3); } function sendSignInRefreshMessage() { var _local2 = createObjectFromBoxVars(); _local2.event = "signinrefresh"; send(_local2); } function sendSignOutMessage() { var _local2 = createObjectFromBoxVars(); _local2.event = "signout"; send(_local2); } function sendSignInErrorMessage(event) { var _local3 = createObjectFromBoxVars(); _local3.event = "signinerror"; _local3.status = event.status; _local3.step = event.step; send(_local3); } function sendSubscribeFeatureUse() { var _local2 = createObjectFromBoxVars(); _local2.event = "fuse"; _local2.feat = "sub"; send(_local2); } function sendUnsubscribeFeatureUse() { var _local2 = createObjectFromBoxVars(); _local2.event = "fuse"; _local2.feat = "unsub"; send(_local2); } function sendLikeFeatureUse() { var _local2 = createObjectFromBoxVars(); _local2.event = "fuse"; _local2.feat = "like"; send(_local2); } function sendDislikeFeatureUse() { var _local2 = createObjectFromBoxVars(); _local2.event = "fuse"; _local2.feat = "dlike"; send(_local2); } function sendAddToPlaylistFeatureUse() { var _local2 = createObjectFromBoxVars(); _local2.event = "fuse"; _local2.feat = "atpl"; send(_local2); } function sendSharedObjectClear() { var _local2 = createObjectFromBoxVars(); _local2.event = "soclear"; send(_local2); } function sendSharedObjectFail() { var _local2 = createObjectFromBoxVars(); _local2.event = "sofail"; _local2.fv = System.capabilities.version; send(_local2); } function sendTestModeToggle() { var _local2 = createObjectFromBoxVars(); _local2.event = "tmt"; send(_local2); } function sendStrongAuthError(error, status, httpStatus) { var _local5 = createObjectFromBoxVars(); _local5.event = "saerr"; _local5.error = error; _local5.status = status; if (httpStatus) { _local5.hst = httpStatus; } send(_local5); } function sendStorageStats(type, success, error, pending, statusFailed, statusSuccess, statusUnknown, size, maxSize) { var _local11 = createObjectFromBoxVars(); _local11.event = "flush"; _local11.stt = type; if (success) { _local11.suc = success; } if (error) { _local11.err = error; } if (pending) { _local11.pen = pending; } if (statusFailed) { _local11.stf = statusFailed; } if (statusSuccess) { _local11.sts = statusSuccess; } if (statusUnknown) { _local11.stu = statusUnknown; } if (size) { _local11.size = size; } if (maxSize) { _local11.msize = maxSize; } _local11.v = com.google.youtube.tv.util.StringUtil.encodeUriComponent(com.google.youtube.tv.platform.Box.getOsVersion()); send(_local11); } function sendFatalError(type, code, httpStatus, videoId) { var _local6 = createObjectFromBoxVars(); _local6.event = "ferr"; _local6.type = type; _local6.code = code; if (httpStatus) { _local6.hst = httpStatus; } if (videoId) { _local6.video = videoId; } send(_local6); } function sendVideoSkippedReason(videoId, playerError) { var _local4 = createObjectFromBoxVars(); _local4.event = "vskip"; _local4.video = videoId; _local4.perr = playerError; send(_local4); } function sendEasterEggActivation(loops, power) { var _local4 = createObjectFromBoxVars(); _local4.event = "ea"; _local4.l = loops; if (!_global.isNaN(power)) { _local4.p = power; } send(_local4); } function sendUpgradeActivation(type) { var _local3 = createObjectFromBoxVars(); _local3.event = "upa"; _local3.type = type; send(_local3); } function sendUpgradeResolution(type, download) { var _local4 = createObjectFromBoxVars(); _local4.event = "upr"; _local4.type = type; _local4.res = (download ? "d" : "l"); send(_local4); } function sendSessionInitMessage() { var _local2 = com.google.youtube.tv.util.ObjectUtil.merge(createObjectFromBoxVars(), createObjectFromEnvironmentVars()); _local2.uuidstatus = (storage.isFirstLaunch() ? "new" : "existing"); _local2.event = "sessioninit"; _local2.gc = com.google.youtube.tv.platform.Box.getGeoCountry(); if (com.google.youtube.tv.platform.Box.getPairingCode()) { _local2.pc = "1"; } _local2.stt = storage.getStorageType(); _local2.jspv = com.google.youtube.tv.platform.Box.getJSPackageVersion(); if ((Stage.width != 1280) || (Stage.height != 720)) { _local2.stwh = (Stage.width + "x") + Stage.height; } if (com.google.youtube.tv.platform.Box.isFontEmbedded()) { _local2.ef = "1"; } if (com.google.youtube.tv.app.Environment.getLoader()) { _local2.lv = com.google.youtube.tv.app.Environment.getLoader(); } if (com.google.youtube.tv.app.Environment.getPackage()) { _local2.pkg = com.google.youtube.tv.app.Environment.getPackage(); } if (storage.getValue(com.google.youtube.tv.services.StorageService.LAST_SESSION_DURATION)) { _local2.lst = storage.getValue(com.google.youtube.tv.services.StorageService.LAST_SESSION_DURATION); storage.setValue(com.google.youtube.tv.services.StorageService.LAST_SESSION_DURATION, null); } send(com.google.youtube.tv.util.ObjectUtil.merge(_local2, loadingTimeline)); } function sendBandwidthStats(videoId, bufferingCount, buffering, playing, playbackThreshold, bufferingThreshold) { var _local8 = createObjectFromBoxVars(); _local8.event = "buff"; _local8.v = videoId; _local8.bc = bufferingCount; if (buffering) { _local8.bi = buffering.min; _local8.bx = buffering.max; _local8.ba = buffering.avg; } if (playing) { _local8.pi = playing.min; _local8.px = playing.max; _local8.pa = playing.avg; } _local8.pt = playbackThreshold; _local8.bt = bufferingThreshold; send(_local8); } function sendProblemReport() { var _local2 = createObjectFromBoxVars(); _local2.event = "problem"; send(_local2); } function createLightObjectFromBoxVars() { var _local2 = new Object(); _local2.el = "leanback"; _local2.ps = "lbl"; _local2.lblv = "3"; return(_local2); } function createObjectFromBoxVars() { var _local2 = createLightObjectFromBoxVars(); (com.google.youtube.tv.platform.Box.getCountry() ? ((_local2.country = com.google.youtube.tv.platform.Box.getCountry())) : null); (com.google.youtube.tv.platform.Box.getFirmware() ? ((_local2.firmware = com.google.youtube.tv.platform.Box.getFirmware())) : null); (com.google.youtube.tv.platform.Box.getApiFirmware() ? ((_local2.afw = com.google.youtube.tv.platform.Box.getApiFirmware())) : null); (com.google.youtube.tv.platform.Box.getLang() ? ((_local2.lang = com.google.youtube.tv.platform.Box.getLang())) : null); (com.google.youtube.tv.platform.Box.getModel() ? ((_local2.model = com.google.youtube.tv.platform.Box.getModel())) : null); (com.google.youtube.tv.platform.Box.getRemote() ? ((_local2.remote = com.google.youtube.tv.platform.Box.getRemote())) : null); (com.google.youtube.tv.platform.Box.getRemote() ? ((_local2.sku = com.google.youtube.tv.platform.Box.getSku())) : null); (com.google.youtube.tv.platform.Box.getType() ? ((_local2.type = com.google.youtube.tv.platform.Box.getType())) : null); (com.google.youtube.tv.platform.Box.getVendor() ? ((_local2.vendor = com.google.youtube.tv.platform.Box.getVendor())) : null); (com.google.youtube.tv.platform.Box.getExp() ? ((_local2.exp = com.google.youtube.tv.platform.Box.getExp())) : null); (com.google.youtube.tv.platform.Box.getLabel() ? ((_local2.label = com.google.youtube.tv.platform.Box.getLabel())) : null); _local2.js = (com.google.youtube.util.ExternalInterfaceWrapper.available() ? "1" : "0"); if (com.google.youtube.tv.experiments.ExperimentsService.ACTIVE_EXPERIMENTS.length) { _local2.fexp = com.google.youtube.tv.experiments.ExperimentsService.ACTIVE_EXPERIMENTS.join(); } return(_local2); } function createObjectFromEnvironmentVars() { var _local2 = createLightObjectFromBoxVars(); (com.google.youtube.tv.app.Environment.hasPlaylistId() ? ((_local2.p = com.google.youtube.tv.app.Environment.getPlaylistId())) : null); (com.google.youtube.tv.app.Environment.hasSearchVar() ? ((_local2.q = com.google.youtube.tv.app.Environment.getSearchQuery())) : null); (com.google.youtube.tv.app.Environment.hasVideoId() ? ((_local2.v = com.google.youtube.tv.app.Environment.getVideoId())) : null); (com.google.youtube.tv.app.Environment.hasVideoPlusRelatedId() ? ((_local2.vv = com.google.youtube.tv.app.Environment.getVideoPlusRelatedId())) : null); (com.google.youtube.tv.app.Environment.getLaunchVar() ? ((_local2.launch = com.google.youtube.tv.app.Environment.getLaunchVar())) : null); return(_local2); } function getDelta() { var _local2 = getTimer(); var _local3 = _local2 - lastDelta; lastDelta = _local2; return(_local3); } function cleanEventObject(obj) { var _local3 = "|"; for (var i in obj) { if (typeof(obj[i]) == "string") { var _local4 = String(obj[i]); if (_local4.charAt(_local4.length - 1) == _local3) { obj[i] = _local4.substr(0, _local4.length - 1); } } } return(obj); } function recreateSearchEventObject() { searchEventObj = com.google.youtube.tv.util.ObjectUtil.merge(createObjectFromBoxVars(), SEARCH_EVENT_TEMPLATE); } static var BASE_URL = "${baseUrl}/player_204"; static var SEARCH_EVENT_TEMPLATE = {event:"search", kb:"", kpc:0, oc:"", ql:0, hwl:0, sac:0, tls:0, qt:0, tt:0}; var lastDelta = 0; var loadingTimeline = {}; var searchEventTimeline = {qt:null, tt:null}; }
Symbol 20511 MovieClip [__Packages.com.google.net.browserchannel.BrowserChannel] Frame 0
class com.google.net.browserchannel.BrowserChannel extends com.google.chianti.event.EventBroadcaster { var baseUrl, defaultQueryParams, defaultHeaders, forwardChannelTriesCount, backChannelTriesCount, currentTryTimeout, connectedOnce, forwardChannelLv, forwardChannelLvResult, backChannelLv, backChannelLvResult, dummyLv, registerEvent, forwardChannelActionInProgress, forwardChannelActionQueue, rid, lastEid, sessionId, sCookie, state, broadcast; function BrowserChannel (baseUrl, defaultQueryParams, defaultHeaders) { super(); com.google.chianti.event.EventBroadcaster.initialize(this); this.baseUrl = baseUrl; this.defaultQueryParams = defaultQueryParams; this.defaultHeaders = defaultHeaders; forwardChannelTriesCount = 0; backChannelTriesCount = 0; currentTryTimeout = MIN_RETRY_TIMEOUT; connectedOnce = false; forwardChannelLv = createForwardChannelLv(); forwardChannelLvResult = createForwardChannelLvResult(); forwardChannelLvResult.onHTTPStatus = com.google.chianti.event.EventDelegate.create(this, onForwardChannelLvHttpStatus); forwardChannelLvResult.onData = com.google.chianti.event.EventDelegate.create(this, onForwardChannelLvData); backChannelLv = createBackChannelLv(); backChannelLvResult = createBackChannelLvResult(); backChannelLvResult.onHTTPStatus = com.google.chianti.event.EventDelegate.create(this, onBackChannelLvHttpStatus); backChannelLvResult.onData = com.google.chianti.event.EventDelegate.create(this, onBackChannelLvData); dummyLv = new LoadVars(); registerEvent(BROWSER_CHANNEL_CONNECT_COMMAND, com.google.chianti.event.EventDelegate.create(this, connectCommandHandler)); registerEvent(BROWSER_CHANNEL_S_COOKIE_COMMAND, com.google.chianti.event.EventDelegate.create(this, sCookieCommandHandler)); } static function splitSizeAndPayload(data) { var _local3 = new Array(); var _local4 = 0; while (_local4 < data.length) { var _local5 = data.indexOf(newline, _local4); if (_local5 == -1) { break; } var _local6 = int(data.substring(_local4, _local5)); var _local7 = {size:_local6, payload:data.substring(_local5 + 1, (_local5 + 1) + _local6)}; _local4 = (_local5 + 1) + _local6; _local3.push(_local7); } return(_local3); } function processNextAction() { if ((!forwardChannelActionInProgress) && (forwardChannelActionQueue.length > 0)) { forwardChannelActionInProgress = true; var _local2 = forwardChannelActionQueue[0]; switch (_local2[0]) { case ACTION_CONNECT : rid = 0; lastEid = 0; sessionId = null; sCookie = null; sendForwardChannelPost(null); break; case ACTION_SEND : sendForwardChannelPost(_local2[1]); break; case ACTION_TERMINATE : sendForwardChannelTerminate(); break; default : throw new Error(INVALID_QUEUE_ACTION_ERROR); } } } function addActionToQueue(action, payload, inTheBeginning) { var _local5 = (inTheBeginning ? 0 : (forwardChannelActionQueue.length)); forwardChannelActionQueue.splice(_local5, 0, [action, payload]); } function buildRequestUrl(queryParams) { var _local3 = baseUrl + "?"; for (var key in queryParams) { _local3 = _local3 + (((key + "=") + _global.escape(queryParams[key])) + "&"); } return(_local3.substring(0, _local3.length - 1)); } function payloadToPostParams(payload) { var _local3 = {count:payload.length}; var _local4 = 0; for ( ; _local4 < payload.length ; _local4++) { var _local5 = payload[_local4]; for (var key in _local5) { _local3[(("req" + _local4) + "_") + key] = _local5[key]; } } return(_local3); } function sendPostRequest(queryParams, headers, postParams, sendLv, resultLv) { var _local7 = {}; if (defaultQueryParams != null) { for (var key in defaultQueryParams) { _local7[key] = defaultQueryParams[key]; } } for (var key in queryParams) { _local7[key] = queryParams[key]; } var _local8 = buildRequestUrl(_local7); if (defaultHeaders != null) { for (var key in defaultHeaders) { sendLv.addRequestHeader(key, defaultHeaders[key]); } } if (headers != null) { for (var key in headers) { sendLv.addRequestHeader(key, headers[key]); } } for (var key in sendLv) { delete sendLv[key]; } if (postParams == null) { sendLv.dummy = "fake"; } else { for (var key in postParams) { sendLv[key] = postParams[key]; } } sendLv.sendAndLoad(_local8, resultLv, "POST"); } function sendBackChannelPost() { var _local2 = {VER:BROWSER_CHANNEL_PROTOCOL_VERSION, CVER:BROWSER_CHANNEL_APP_SPECIFIC_VERSION, TYPE:BROWSER_CHANNEL_XMLHTTP_TYPE, RID:"rpc", CI:1, AID:lastEid, SID:sessionId, gsessionid:sCookie}; sendPostRequest(_local2, null, null, backChannelLv, backChannelLvResult); } function sendForwardChannelPost(payload) { var queryParams = {VER:BROWSER_CHANNEL_PROTOCOL_VERSION, CVER:BROWSER_CHANNEL_APP_SPECIFIC_VERSION, TYPE:BROWSER_CHANNEL_XMLHTTP_TYPE, showOnlineStatus:false, RID:rid}; if (sessionId && (sCookie)) { queryParams.SID = sessionId; queryParams.gsessionid = sCookie; } if ((state == STATE_CONNECTED) || ((forwardChannelTriesCount == 0) && (backChannelTriesCount == 0))) { sendPostRequest(queryParams, null, payload, forwardChannelLv, forwardChannelLvResult); } else { var self = this; setForwardChannelRetryTimeout(currentTryTimeout, function () { self.sendPostRequest(queryParams, null, payload, self.forwardChannelLv, self.forwardChannelLvResult); }); currentTryTimeout = currentTryTimeout * 2; } } function sendForwardChannelTerminate() { var _local2 = {VER:BROWSER_CHANNEL_PROTOCOL_VERSION, CVER:BROWSER_CHANNEL_APP_SPECIFIC_VERSION, TYPE:BROWSER_CHANNEL_TERMINATE_TYPE, RID:rid}; if (sessionId && (sCookie)) { _local2.SID = sessionId; _local2.gsessionid = sCookie; } sendPostRequest(_local2, null, null, forwardChannelLv, dummyLv); forwardChannelActionQueue.shift(); forwardChannelActionInProgress = false; if (state != STATE_DISCONNECTED) { processNextAction(); } } function processRawData(data) { if (data != null) { var _local3 = splitSizeAndPayload(data); if (_local3.length == 0) { return(false); } var _local4 = 0; for ( ; _local4 < _local3.length ; _local4++) { var _local5 = _local3[_local4]; try { var _local6 = com.google.third_party.json.JSON.parse(_local5.payload); } catch(_local) { var err = ( /* Error999 */ ); return(false); } broadcastEventsForData(Array(_local6)); } } return(true); } function onForwardChannelLvHttpStatus(status) { forwardChannelLastHttpStatus = status; } function onForwardChannelLvData(data) { if (state == STATE_DISCONNECTED) { return(undefined); } broadcast({type:EVENT_FORWARD_CHANNEL_DATA, data:data, state:state}); var _local3 = false; if ((forwardChannelLastHttpStatus == HTTP_STATUS_OK) || ((forwardChannelLastHttpStatus == HTTP_STATUS_UNKNOWN) && (data != null))) { forwardChannelActionQueue.shift(); rid = rid + 1; if (state == STATE_INIT) { try { _local3 = !processRawData(data); } catch(_local) { var ex = ( /* Error999 */ ); if (ex instanceof com.google.testing.AssertionFailedError) { throw ex; } } } else { forwardChannelTriesCount = 0; if ((backChannelTriesCount = 0)) { currentTryTimeout = MIN_RETRY_TIMEOUT; } } } else { _local3 = true; } if (_local3) { forwardChannelTriesCount = forwardChannelTriesCount + 1; if (forwardChannelTriesCount >= MAX_TRIES) { if (state == STATE_CONNECTED) { sendForwardChannelTerminate(); } state = STATE_DISCONNECTED; var _local4 = {type:EVENT_NETWORK_FAILURE, status:forwardChannelLastHttpStatus}; broadcast(_local4); return(undefined); } if (state != STATE_INIT) { addActionToQueue(ACTION_CONNECT, null, true); addActionToQueue(ACTION_TERMINATE, null, true); state = STATE_INIT; } } forwardChannelActionInProgress = false; processNextAction(); } function onBackChannelLvHttpStatus(status) { backChannelLastHttpStatus = status; } function onBackChannelLvData(data) { if (state != STATE_CONNECTED) { return(undefined); } broadcast({type:EVENT_BACK_CHANNEL_DATA, data:data, state:state}); if ((backChannelLastHttpStatus == HTTP_STATUS_OK) || ((backChannelLastHttpStatus == HTTP_STATUS_UNKNOWN) && (data != null))) { backChannelTriesCount = 0; if ((forwardChannelTriesCount = 0)) { currentTryTimeout = MIN_RETRY_TIMEOUT; } processRawData(data); } else { backChannelTriesCount = backChannelTriesCount + 1; if (backChannelTriesCount >= MAX_TRIES) { if (state == STATE_CONNECTED) { sendForwardChannelTerminate(); } state = STATE_DISCONNECTED; broadcast({type:EVENT_NETWORK_FAILURE, status:backChannelLastHttpStatus}); return(undefined); } addActionToQueue(ACTION_CONNECT, null, true); addActionToQueue(ACTION_TERMINATE, null, true); state = STATE_INIT; processNextAction(); } if (state == STATE_CONNECTED) { sendBackChannelPost(); } } function broadcastEventsForData(data) { lastEid = data[data.length - 1][0]; var _local3 = 0; for ( ; _local3 < data.length ; _local3++) { broadcast({type:data[_local3][1][0], payload:data[_local3][1]}); } } function connectCommandHandler(event) { sessionId = event.payload[1]; } function sCookieCommandHandler(event) { sCookie = event.payload[1]; state = STATE_CONNECTED; sendBackChannelPost(); var _local3 = {}; if (!connectedOnce) { _local3.type = EVENT_CONNECTED; connectedOnce = true; } else { _local3.type = EVENT_RECONNECTED; } broadcast(_local3); } function connect() { if (state != null) { throw new Error(TOO_MANY_CONNECT_CALLS_ERROR); } state = STATE_INIT; forwardChannelActionQueue = [[ACTION_CONNECT]]; processNextAction(); } function sendData(data) { var _local3 = payloadToPostParams(data); _local3.ofs = lastMapId; lastMapId = lastMapId + 1; addActionToQueue(ACTION_SEND, _local3, false); processNextAction(); } function disconnect() { if (state == STATE_CONNECTED) { addActionToQueue(ACTION_TERMINATE, null, false); processNextAction(); } state = STATE_DISCONNECTED; } static function createLoadVars() { return(new LoadVars()); } static var createForwardChannelLv = createLoadVars; static var createForwardChannelLvResult = createLoadVars; static var createBackChannelLv = createLoadVars; static var createBackChannelLvResult = createLoadVars; static function setForwardChannelRetryTimeout(timeout, callback) { return(com.google.youtube.util.Scheduler.setTimeout(timeout, callback)); } static var EVENT_CONNECTED = "EVENT_CONNECTED"; static var EVENT_RECONNECTED = "EVENT_RECONNECTED"; static var EVENT_NETWORK_FAILURE = "EVENT_NETWORK_FAILURE"; static var EVENT_FORWARD_CHANNEL_DATA = "EVENT_FORWARD_CHANNEL_DATA"; static var EVENT_BACK_CHANNEL_DATA = "EVENT_BACK_CHANNEL_DATA"; static var STATE_INIT = "init"; static var STATE_CONNECTED = "connected"; static var STATE_DISCONNECTED = "disconnected"; static var ACTION_CONNECT = "conn"; static var ACTION_SEND = "send"; static var ACTION_TERMINATE = "term"; static var BROWSER_CHANNEL_CONNECT_COMMAND = "c"; static var BROWSER_CHANNEL_S_COOKIE_COMMAND = "S"; static var BROWSER_CHANNEL_PROTOCOL_VERSION = 8; static var BROWSER_CHANNEL_APP_SPECIFIC_VERSION = 1; static var BROWSER_CHANNEL_XMLHTTP_TYPE = "xmlhttp"; static var BROWSER_CHANNEL_TERMINATE_TYPE = "terminate"; static var MIN_RETRY_TIMEOUT = 0.5; static var HTTP_STATUS_OK = 200; static var HTTP_STATUS_UNAUTHORIZED = 401; static var HTTP_STATUS_UNKNOWN = 0; static var INVALID_QUEUE_ACTION_ERROR = "Invalid action in the queue."; static var TOO_MANY_CONNECT_CALLS_ERROR = "Can't call connect() more than 1 time."; static var MAX_TRIES = 4; static var DEFAULT_SERVER_PING_INTERVAL = -1; var lastMapId = 0; var forwardChannelLastHttpStatus = 0; var backChannelLastHttpStatus = 0; }
Symbol 20512 MovieClip [__Packages.com.adobe.serialization.json.JSONEncoder] Frame 0
class com.adobe.serialization.json.JSONEncoder { var jsonString; function JSONEncoder (value) { jsonString = convertToString(value); } function getString() { return(jsonString); } function convertToString(value) { if (typeof(value) == "string") { return(escapeString(String(value))); } if (typeof(value) == "number") { return((_global.isFinite(value) ? (value.toString()) : "null")); } if (typeof(value) == "boolean") { return((value ? "true" : "false")); } if (typeof(value) == "object") { if (value instanceof Array) { return(arrayToString(Array(value))); } if (value) { return(objectToString(value)); } } return("null"); } function escapeString(str) { var _local3 = ""; var _local5 = str.length; var _local6 = 0; for ( ; _local6 < _local5 ; _local6++) { var _local4 = str.charAt(_local6); switch (_local4) { case "\"" : _local3 = _local3 + "\\\""; break; case "\\" : _local3 = _local3 + "\\\\"; break; case "\b" : _local3 = _local3 + "\\b"; break; case "\f" : _local3 = _local3 + "\\f"; break; case newline : _local3 = _local3 + "\\n"; break; case "\r" : _local3 = _local3 + "\\r"; break; case "\t" : _local3 = _local3 + "\\t"; break; default : if (_local4 < " ") { var _local7 = _local4.charCodeAt(0).toString(16); var _local8 = ((_local7.length == 2) ? "00" : "000"); _local3 = _local3 + (("\\u" + _local8) + _local7); } else { _local3 = _local3 + _local4; } } } return(("\"" + _local3) + "\""); } function arrayToString(a) { var _local3 = ""; var _local4 = 0; for ( ; _local4 < a.length ; _local4++) { if (_local3.length > 0) { _local3 = _local3 + ","; } _local3 = _local3 + convertToString(a[_local4]); } return(("[" + _local3) + "]"); } function objectToString(o) { var _local3 = ""; for (var key in o) { var _local4 = o[key]; if ((typeof(_local4) == "function") || (typeof(_local4) == "undefined")) { continue; } if (_local3.length > 0) { _local3 = _local3 + ","; } _local3 = _local3 + ((escapeString(key) + ":") + convertToString(_local4)); } return(("{" + _local3) + "}"); } }
Symbol 20513 MovieClip [__Packages.com.google.youtube.tv.ui.Rect] Frame 0
class com.google.youtube.tv.ui.Rect extends com.google.youtube.tv.ui.View { var box, clip, setPos; function Rect (parent, opt_box, opt_color, opt_alpha, opt_cornerRadius, opt_borderThickness, opt_borderColor, opt_borderAlpha) { super(parent, "rect"); build(opt_box, opt_color, opt_alpha, opt_cornerRadius, opt_borderThickness, opt_borderColor, opt_borderAlpha); } function build(opt_box, opt_color, opt_alpha, opt_cornerRadius, opt_borderThickness, opt_borderColor, opt_borderAlpha) { if (opt_box && (opt_box != box)) { box = opt_box.clone(); } if (opt_color != undefined) { color = opt_color; } if (opt_alpha != undefined) { alpha = opt_alpha; } if (opt_cornerRadius != undefined) { cornerRadius = opt_cornerRadius; } if (opt_borderThickness != undefined) { borderThickness = opt_borderThickness; } if (opt_borderColor != undefined) { borderColor = opt_borderColor; } if (opt_borderAlpha != undefined) { borderAlpha = opt_borderAlpha; } else if ((borderAlpha == 0) && (borderThickness > 0)) { borderAlpha = 100; } updateClip(); } function updateClip() { clip.clear(); if (!box) { return(undefined); } setPos(box.x, box.y); com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, box.width, box.height, borderThickness, borderColor, borderAlpha, color, alpha, cornerRadius); } function redraw(opt_color, opt_alpha, opt_cornerRadius, opt_borderThickness, opt_borderColor, opt_borderAlpha) { build(box, opt_color, opt_alpha, opt_cornerRadius, opt_borderThickness, opt_borderColor, opt_borderAlpha); } var color = com.google.youtube.tv.ui.Colors.HOT_PINK; var alpha = 100; var cornerRadius = 0; var borderThickness = 0; var borderColor = 0; var borderAlpha = 0; }
Symbol 20514 MovieClip [__Packages.com.google.youtube.tv.remotes.partner.LGUPlusRemoteController] Frame 0
class com.google.youtube.tv.remotes.partner.LGUPlusRemoteController extends com.google.youtube.tv.remotes.DefaultRemoteController { function LGUPlusRemoteController () { super(); } function processKey(keyCode) { if (!(keyCode === LG_LANGUAGE_SWITCH)) { } else { return(com.google.youtube.tv.controller.ExtendedKeys.LANGUAGE_SWITCH); } return(super.processKey(keyCode)); } static var LG_LANGUAGE_SWITCH = 16777251; }
Symbol 20515 MovieClip [__Packages.com.google.youtube.tv.components.TrayPageComponent] Frame 0
class com.google.youtube.tv.components.TrayPageComponent extends com.google.youtube.tv.components.BaseComponent { var playlistLocation, rect, clip, buttonDown, buttonUp, root; function TrayPageComponent (parent, playlistLocation) { super(parent, "trayPage"); this.playlistLocation = playlistLocation; } function build() { initialized = true; rect = new com.google.youtube.tv.ui.Rect(clip, new flash.geom.Rectangle(0, 0, Stage.width, Stage.height), com.google.youtube.tv.ui.Colors.BLACK, BACKGROUND_ALPHA); buttonDown = new com.google.youtube.tv.view.ui.PageNavigationButton(clip, com.google.youtube.tv.view.ui.PageNavigationButton.DOWN, com.google.youtube.tv.view.ui.PageNavigationButton.LABEL_TOP); buttonDown.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onButtonDownClick)); buttonUp = new com.google.youtube.tv.view.ui.PageNavigationButton(clip, com.google.youtube.tv.view.ui.PageNavigationButton.UP, com.google.youtube.tv.view.ui.PageNavigationButton.LABEL_BOTTOM); buttonUp.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onButtonUpClick)); } function activate() { super.activate(); root = com.google.youtube.tv.tree.VideoContentTree.getTree(); root.rebuildTree(playlistLocation.getNode(), playlistLocation.getIndex()); if (!initialized) { build(); initialized = true; } buttonDown.setVisible(root.getChildrenCount() > 0); alignUpDownButtons(); } function alignUpDownButtons() { buttonDown.setPos((Stage.width / 2) - (buttonDown.getWidth() / 2), (Stage.height - com.google.youtube.tv.view.ui.PageNavigationButton.SIZE) - BUTTON_PADDING); buttonUp.setPos((Stage.width / 2) - (buttonUp.getWidth() / 2), BUTTON_PADDING); } function handleKey(key) { if (key == Key.UP) { onButtonUpClick(); } else if (key == Key.DOWN) { onButtonDownClick(); } else { return(false); } return(true); } function getPlaybackRestriction() { return(undefined); } function onButtonDownClick() { } function onButtonUpClick() { } static var BACKGROUND_ALPHA = 65; static var BUTTON_PADDING = 44 * com.google.youtube.tv.app.Config.SCALE; var initialized = false; }
Symbol 20516 MovieClip [__Packages.com.google.youtube.tv.components.PivotComponent] Frame 0
class com.google.youtube.tv.components.PivotComponent extends com.google.youtube.tv.components.TrayPageComponent { var playlistLocation, root, menuLocation, thumbstripLocation, thumbstrip, clip, navigationTitles, pop, buttonUp, buttonDown, alignUpDownButtons; function PivotComponent (parent, playlistLocation) { super(parent, playlistLocation); this.playlistLocation = playlistLocation; } function getPlaybackRestriction() { return(undefined); } function build() { super.build(); root.getValueStream().vmap(com.google.chianti.event.EventDelegate.create(this, onMenuLocationChanged)); menuLocation = new com.google.youtube.tv.tree.Location(null, 0); thumbstripLocation = new com.google.youtube.tv.tree.Location(null, 0); menuLocation.vmap(com.google.chianti.event.EventDelegate.create(this, onMenuLocationChanged)); thumbstrip = new com.google.youtube.tv.components.ThumbstripComponent(clip, thumbstripLocation); thumbstrip.setPos(THUMBSTRIP_MARGIN, (Stage.height / 2) - (thumbstrip.getHeight() / 2)); thumbstrip.setWidth(Stage.width - (2 * THUMBSTRIP_MARGIN)); thumbstrip.registerEvent(com.google.youtube.tv.components.ThumbstripComponent.THUMBSTRIP_ITEM_SELECT, com.google.chianti.event.EventDelegate.create(this, playSelectedVideo)); } function activate() { super.activate(); rebuildNavigationTitles(); menuLocation.moveTo(root, 0); } function setVisible(value) { super.setVisible(value); thumbstrip.setVisible(value); } function rebuildNavigationTitles() { navigationTitles = []; var _local2 = 0; for ( ; _local2 < root.getChildrenCount() ; _local2++) { var _local3 = root.getChildren()[_local2]; navigationTitles[_local2] = navigationTitles[_local2] || ([]); navigationTitles[_local2 + 1] = navigationTitles[_local2 + 1] || ([]); var _local4 = ""; if (_local3 == playlistLocation.getNode()) { _local4 = com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.CURRENT_PLAYLIST); } else { _local4 = _local3.getTitle(); } if (_local2 == 0) { navigationTitles[_local2][0] = com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.INFO_PANEL); } else { navigationTitles[_local2 - 1][1] = _local4; } if (_local2 == (root.getChildrenCount() - 1)) { navigationTitles[_local2][1] = com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.INFO_PANEL); } navigationTitles[_local2 + 1][0] = _local4; navigationTitles[_local2][2] = _local4; } } function onButtonUpClick() { if (menuLocation.getIndex() == 0) { pop(); } else { navigateMenu(-1); } } function onButtonDownClick() { if (menuLocation.getIndex() == (root.getChildrenCount() - 1)) { pop(); pop(); } else { navigateMenu(1); } } function handleKey(keyCode) { switch (keyCode) { case -Key.LEFT : navigateThumbstrip(-1); return(true); case -Key.RIGHT : navigateThumbstrip(1); return(true); case Key.UP : onButtonUpClick(); return(true); case Key.DOWN : onButtonDownClick(); return(true); case Key.ENTER : playSelectedVideo(); return(true); } return(false); } function playSelectedVideo() { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_WATCH_PLAYLIST, {playlist:thumbstripLocation.getNode(), index:thumbstripLocation.getIndex()})); } function onMenuLocationChanged() { buttonUp.setText(navigationTitles[menuLocation.getIndex()][0]); buttonDown.setText(navigationTitles[menuLocation.getIndex()][1]); alignUpDownButtons(); if ((thumbstripLocation.getIndex() > 1) && (menuLocation.getValue() == thumbstripLocation.getNode())) { return(undefined); } var _local2 = 0; if (playlistLocation.getNode() == menuLocation.getValue()) { _local2 = playlistLocation.getIndex(); } thumbstripLocation.moveTo(menuLocation.getValue(), _local2); } function navigateMenu(dir) { menuLocation.setIndexOffset(dir, false); } function navigateThumbstrip(dir) { thumbstripLocation.setIndexOffset(dir, false); } function toString() { return("PivotComponent"); } static var THUMBSTRIP_MARGIN = 100 * com.google.youtube.tv.app.Config.SCALE; }
Symbol 20517 MovieClip [__Packages.com.google.youtube.tv.components.FlaggingComponent] Frame 0
class com.google.youtube.tv.components.FlaggingComponent extends com.google.youtube.tv.components.DialogBase { var backButton, initialized, pop, symbol, clip, textView; function FlaggingComponent (parent) { super(parent); } function activate() { super.activate(); backButton.setIsActive(true); } function deactivate() { backButton.setIsActive(false); super.deactivate(); } function build() { if (initialized) { return(undefined); } super.build(); backButton.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, pop)); symbol = new com.google.youtube.tv.ui.Symbol(clip, "flagOnWeb"); symbol.scale(); symbol.setPos((TITLE_X + TITLE_WIDTH) + IMAGE_GAP, com.google.youtube.tv.components.DialogBase.CONTENT_Y); textView = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(TITLE_X, com.google.youtube.tv.components.DialogBase.CONTENT_Y, TITLE_WIDTH, com.google.youtube.tv.components.DialogBase.CONTENT_MAX_HEIGHT), com.google.youtube.tv.ui.Font.getFontSizeForHeight(LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); textView.setMultiline(true); } function needsBackground() { return(false); } function setVideoId(id) { textView.setHtmlText((((((("<font size=\"" + com.google.youtube.tv.ui.Font.getFontSizeForHeight(TITLE_LINE_HEIGHT)) + "\">") + com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.FLAG_WEB)) + "</font><br><br><font color=\"#999999\">") + com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.FLAG_WEB_DESC)) + "</font><br><br>youtu.be/") + id); } static var TITLE_X = 150 * com.google.youtube.tv.app.Config.SCALE; static var TITLE_WIDTH = 600 * com.google.youtube.tv.app.Config.SCALE; static var TITLE_LINE_HEIGHT = 30 * com.google.youtube.tv.app.Config.SCALE; static var LINE_HEIGHT = 20 * com.google.youtube.tv.app.Config.SCALE; static var IMAGE_GAP = 40 * com.google.youtube.tv.app.Config.SCALE; }
Symbol 20518 MovieClip [__Packages.com.google.youtube.util.StringUtil] Frame 0
class com.google.youtube.util.StringUtil { function StringUtil () { } static function secondsToTimeString(totalSeconds, opt_minRequiredPositions) { if (!opt_minRequiredPositions) { opt_minRequiredPositions = 1; } var _local4 = 0; var _local5 = 0; var _local6 = Math.max(totalSeconds, 0); _local4 = Math.floor(_local6 / 3600); _local6 = _local6 % 3600; _local5 = Math.floor(_local6 / 60); _local6 = _local6 % 60; var _local7 = (((_local4 ? (_local4 + ":") : "") + (((_local4 > 0) && (_local5 < 10)) ? ("0" + _local5) : (_local5))) + ":") + ((_local6 < 10) ? ("0" + _local6) : (_local6)); var _local8 = _local7.split(":").join("").length; while (_local8 < opt_minRequiredPositions) { _local7 = ((_local8 % 2) ? ("0" + _local7) : ("0:" + _local7)); _local8 = _local7.split(":").join("").length; } return(_local7); } static function ellipsis(str, _textField, opt_textFormat) { str = str.toString(); var _local5 = str; if (opt_textFormat) { _textField.setNewTextFormat(opt_textFormat); } var _local6 = _textField.text; _textField.text = str; if ((_textField.textWidth > _textField._width) || (_textField.textHeight > _textField._height)) { var _local7 = Math.round(str.length / 2); var _local8 = _local7; do { _local7 = Math.floor(_local7 / 2); _textField.text = str.substr(0, _local8) + "..."; if ((_textField.textWidth > _textField._width) || (_textField.textHeight > _textField._height)) { _local8 = _local8 - _local7; } else { _local8 = _local8 + _local7; _local5 = _textField.text; } } while (_local7); } _textField.text = _local6; return(_local5); } static function getLongestString(stringArray) { var _local3 = stringArray.length; var _local4 = ""; var _local5 = 0; for ( ; _local5 < _local3 ; _local5++) { if (stringArray[_local5].length > _local4.length) { _local4 = stringArray[_local5]; } } return(_local4); } }
Symbol 20519 MovieClip [__Packages.com.google.youtube.tv.controller.ScrollHistory] Frame 0
class com.google.youtube.tv.controller.ScrollHistory { var intervals; function ScrollHistory () { super(); intervals = []; } function recordScroll() { var _local2 = getTimer() - lastScrollTime; lastScrollTime = getTimer(); if (_local2 >= DROP_INTERVAL) { intervals.splice(0); } intervals.push(_local2); if (intervals.length > SCROLL_HISTORY_LENGTH) { intervals.shift(); } } function isScrollingFast() { if (intervals.length < SCROLL_HISTORY_LENGTH) { return(false); } var _local2 = 0; var _local3 = intervals.length; var _local4 = 0; for ( ; _local4 < _local3 ; _local4++) { _local2 = _local2 + (intervals[_local4] / _local3); } return(_local2 <= FAST_SCROLL_INTERVAL); } static var FAST_SCROLL_INTERVAL = 750; static var DROP_INTERVAL = 1200; static var SCROLL_HISTORY_LENGTH = 4; var lastScrollTime = 0; }
Symbol 20520 MovieClip [__Packages.com.google.youtube.tv.util.Aes] Frame 0
class com.google.youtube.tv.util.Aes { var key, nk, nr, nb, state, temp, testKeySchedule, w, testStartRound, testAfterSubBytes, testAfterShiftRows, testAfterMixColumns, testAfterAddRoundKey; function Aes (key) { if ((key.length != 16) && ((key.length != 24) && (key.length != 32))) { throw new Error("Key must have length 16, 24, or 32."); } this.key = key; nk = key.length / 4; nr = nk + 6; nb = 4; state = [[], [], [], []]; temp = [[], [], [], []]; keyExpansion(); } function encrypt(input, opt_inputStart, opt_outputStart) { var _local5 = []; if (_global.isNaN(opt_inputStart)) { opt_inputStart = 0; } if (_global.isNaN(opt_outputStart)) { opt_outputStart = 0; } if (testMode) { testKeySchedule(0, w, 0); } copyInput(input, opt_inputStart); addRoundKey(0); var _local6 = 1; for ( ; _local6 < nr ; _local6++) { if (testMode) { testKeySchedule(_local6, w, _local6); testStartRound(_local6, state); } subBytes(SBOX); if (testMode) { testAfterSubBytes(_local6, state); } shiftRows(); if (testMode) { testAfterShiftRows(_local6, state); } mixColumns(); if (testMode) { testAfterMixColumns(_local6, state); } addRoundKey(_local6); } subBytes(SBOX); if (testMode) { testAfterSubBytes(_local6, state); } shiftRows(); if (testMode) { testAfterShiftRows(_local6, state); } addRoundKey(nr); copyOutput(_local5, opt_outputStart); return(_local5); } function decrypt(input, opt_inputStart, opt_outputStart) { var _local5 = []; if (_global.isNaN(opt_inputStart)) { opt_inputStart = 0; } if (_global.isNaN(opt_outputStart)) { opt_outputStart = 0; } if (testMode) { testKeySchedule(0, w, nr); } copyInput(input, opt_inputStart); addRoundKey(nr); var _local6 = 1; for ( ; _local6 < nr ; _local6++) { if (testMode) { testKeySchedule(_local6, w, nr - _local6); testStartRound(_local6, state); } invShiftRows(); if (testMode) { testAfterShiftRows(_local6, state); } subBytes(INV_SBOX); if (testMode) { testAfterSubBytes(_local6, state); } addRoundKey(nr - _local6); if (testMode) { testAfterAddRoundKey(_local6, state); } invMixColumns(); } invShiftRows(); if (testMode) { testAfterShiftRows(_local6, state); } subBytes(INV_SBOX); if (testMode) { testAfterSubBytes(nr, state); } if (testMode) { testKeySchedule(nr, w, 0); } addRoundKey(0); copyOutput(_local5, opt_outputStart); return(_local5); } function copyInput(input, startAt) { var _local6 = 0; for ( ; _local6 < nb ; _local6++) { var _local7 = 0; for ( ; _local7 < 4 ; _local7++) { var _local5 = ((_local7 * 4) + _local6) + startAt; var _local4 = input[_local5]; if ((typeof(_local4) != "number") || ((_local4 > 255) || (_local4 < 0))) { throw new Error(((("Invalid input. Value " + _local4) + " at position ") + _local5) + " is not a byte."); } state[_local6][_local7] = _local4; } } } function copyOutput(output, startAt) { var _local4 = 0; for ( ; _local4 < nb ; _local4++) { var _local5 = 0; for ( ; _local5 < 4 ; _local5++) { output[((_local5 * 4) + _local4) + startAt] = state[_local4][_local5]; } } } function addRoundKey(round) { var _local3 = 0; for ( ; _local3 < 4 ; _local3++) { var _local4 = 0; for ( ; _local4 < 4 ; _local4++) { state[_local3][_local4] = state[_local3][_local4] ^ w[(round * 4) + _local4][_local3]; } } } function subBytes(box) { var _local3 = 0; for ( ; _local3 < 4 ; _local3++) { var _local4 = 0; for ( ; _local4 < 4 ; _local4++) { state[_local3][_local4] = box[state[_local3][_local4]]; } } } function shiftRows() { var _local2 = 1; for ( ; _local2 < 4 ; _local2++) { var _local3 = 0; for ( ; _local3 < 4 ; _local3++) { temp[_local2][_local3] = state[_local2][_local3]; } } var _local4 = 1; for ( ; _local4 < 4 ; _local4++) { var _local5 = 0; for ( ; _local5 < 4 ; _local5++) { state[_local4][_local5] = temp[_local4][(_local5 + _local4) % nb]; } } } function invShiftRows() { var _local2 = 1; for ( ; _local2 < 4 ; _local2++) { var _local3 = 0; for ( ; _local3 < 4 ; _local3++) { temp[_local2][(_local3 + _local2) % nb] = state[_local2][_local3]; } } var _local4 = 1; for ( ; _local4 < 4 ; _local4++) { var _local5 = 0; for ( ; _local5 < 4 ; _local5++) { state[_local4][_local5] = temp[_local4][_local5]; } } } function mixColumns() { var _local2 = state; var _local3 = temp[0]; var _local4 = 0; for ( ; _local4 < 4 ; _local4++) { _local3[0] = _local2[0][_local4]; _local3[1] = _local2[1][_local4]; _local3[2] = _local2[2][_local4]; _local3[3] = _local2[3][_local4]; _local2[0][_local4] = ((MULT_2[_local3[0]] ^ MULT_3[_local3[1]]) ^ _local3[2]) ^ _local3[3]; _local2[1][_local4] = ((_local3[0] ^ MULT_2[_local3[1]]) ^ MULT_3[_local3[2]]) ^ _local3[3]; _local2[2][_local4] = ((_local3[0] ^ _local3[1]) ^ MULT_2[_local3[2]]) ^ MULT_3[_local3[3]]; _local2[3][_local4] = ((MULT_3[_local3[0]] ^ _local3[1]) ^ _local3[2]) ^ MULT_2[_local3[3]]; } } function invMixColumns() { var _local2 = state; var _local3 = temp[0]; var _local4 = 0; for ( ; _local4 < 4 ; _local4++) { _local3[0] = _local2[0][_local4]; _local3[1] = _local2[1][_local4]; _local3[2] = _local2[2][_local4]; _local3[3] = _local2[3][_local4]; _local2[0][_local4] = ((MULT_E[_local3[0]] ^ MULT_B[_local3[1]]) ^ MULT_D[_local3[2]]) ^ MULT_9[_local3[3]]; _local2[1][_local4] = ((MULT_9[_local3[0]] ^ MULT_E[_local3[1]]) ^ MULT_B[_local3[2]]) ^ MULT_D[_local3[3]]; _local2[2][_local4] = ((MULT_D[_local3[0]] ^ MULT_9[_local3[1]]) ^ MULT_E[_local3[2]]) ^ MULT_B[_local3[3]]; _local2[3][_local4] = ((MULT_B[_local3[0]] ^ MULT_D[_local3[1]]) ^ MULT_9[_local3[2]]) ^ MULT_E[_local3[3]]; } } function keyExpansion() { w = new Array(nb * (nr + 1)); var _local2 = 0; for ( ; _local2 < nk ; _local2++) { w[_local2] = [key[4 * _local2], key[(4 * _local2) + 1], key[(4 * _local2) + 2], key[(4 * _local2) + 3]]; } var _local3 = new Array(4); var _local4 = nk; for ( ; _local4 < (nb * (nr + 1)) ; _local4++) { _local3[0] = w[_local4 - 1][0]; _local3[1] = w[_local4 - 1][1]; _local3[2] = w[_local4 - 1][2]; _local3[3] = w[_local4 - 1][3]; if ((_local4 % nk) == 0) { rotWord(_local3); subWord(_local3); _local3[0] = _local3[0] ^ RCON[_local4 / nk][0]; _local3[1] = _local3[1] ^ RCON[_local4 / nk][1]; _local3[2] = _local3[2] ^ RCON[_local4 / nk][2]; _local3[3] = _local3[3] ^ RCON[_local4 / nk][3]; } else if ((nk > 6) && ((_local4 % nk) == 4)) { subWord(_local3); } w[_local4] = new Array(4); w[_local4][0] = w[_local4 - nk][0] ^ _local3[0]; w[_local4][1] = w[_local4 - nk][1] ^ _local3[1]; w[_local4][2] = w[_local4 - nk][2] ^ _local3[2]; w[_local4][3] = w[_local4 - nk][3] ^ _local3[3]; } } function subWord(w) { w[0] = SBOX[w[0]]; w[1] = SBOX[w[1]]; w[2] = SBOX[w[2]]; w[3] = SBOX[w[3]]; return(w); } function rotWord(w) { var _local3 = w[0]; w[0] = w[1]; w[1] = w[2]; w[2] = w[3]; w[3] = _local3; return(w); } var testMode = false; static var SBOX = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22]; static var INV_SBOX = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125]; static var RCON = [[0, 0, 0, 0], [1, 0, 0, 0], [2, 0, 0, 0], [4, 0, 0, 0], [8, 0, 0, 0], [16, 0, 0, 0], [32, 0, 0, 0], [64, 0, 0, 0], [128, 0, 0, 0], [27, 0, 0, 0], [54, 0, 0, 0]]; static var MULT_2 = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 27, 25, 31, 29, 19, 17, 23, 21, 11, 9, 15, 13, 3, 1, 7, 5, 59, 57, 63, 61, 51, 49, 55, 53, 43, 41, 47, 45, 35, 33, 39, 37, 91, 89, 95, 93, 83, 81, 87, 85, 75, 73, 79, 77, 67, 65, 71, 69, 123, 121, 127, 125, 115, 113, 119, 117, 107, 105, 111, 109, 99, 97, 103, 101, 155, 153, 159, 157, 147, 145, 151, 149, 139, 137, 143, 141, 131, 129, 135, 133, 187, 185, 191, 189, 179, 177, 183, 181, 171, 169, 175, 173, 163, 161, 167, 165, 219, 217, 223, 221, 211, 209, 215, 213, 203, 201, 207, 205, 195, 193, 199, 197, 251, 249, 255, 253, 243, 241, 247, 245, 235, 233, 239, 237, 227, 225, 231, 229]; static var MULT_3 = [0, 3, 6, 5, 12, 15, 10, 9, 24, 27, 30, 29, 20, 23, 18, 17, 48, 51, 54, 53, 60, 63, 58, 57, 40, 43, 46, 45, 36, 39, 34, 33, 96, 99, 102, 101, 108, 111, 106, 105, 120, 123, 126, 125, 116, 119, 114, 113, 80, 83, 86, 85, 92, 95, 90, 89, 72, 75, 78, 77, 68, 71, 66, 65, 192, 195, 198, 197, 204, 207, 202, 201, 216, 219, 222, 221, 212, 215, 210, 209, 240, 243, 246, 245, 252, 255, 250, 249, 232, 235, 238, 237, 228, 231, 226, 225, 160, 163, 166, 165, 172, 175, 170, 169, 184, 187, 190, 189, 180, 183, 178, 177, 144, 147, 150, 149, 156, 159, 154, 153, 136, 139, 142, 141, 132, 135, 130, 129, 155, 152, 157, 158, 151, 148, 145, 146, 131, 128, 133, 134, 143, 140, 137, 138, 171, 168, 173, 174, 167, 164, 161, 162, 179, 176, 181, 182, 191, 188, 185, 186, 251, 248, 253, 254, 247, 244, 241, 242, 227, 224, 229, 230, 239, 236, 233, 234, 203, 200, 205, 206, 199, 196, 193, 194, 211, 208, 213, 214, 223, 220, 217, 218, 91, 88, 93, 94, 87, 84, 81, 82, 67, 64, 69, 70, 79, 76, 73, 74, 107, 104, 109, 110, 103, 100, 97, 98, 115, 112, 117, 118, 127, 124, 121, 122, 59, 56, 61, 62, 55, 52, 49, 50, 35, 32, 37, 38, 47, 44, 41, 42, 11, 8, 13, 14, 7, 4, 1, 2, 19, 16, 21, 22, 31, 28, 25, 26]; static var MULT_9 = [0, 9, 18, 27, 36, 45, 54, 63, 72, 65, 90, 83, 108, 101, 126, 119, 144, 153, 130, 139, 180, 189, 166, 175, 216, 209, 202, 195, 252, 245, 238, 231, 59, 50, 41, 32, 31, 22, 13, 4, 115, 122, 97, 104, 87, 94, 69, 76, 171, 162, 185, 176, 143, 134, 157, 148, 227, 234, 241, 248, 199, 206, 213, 220, 118, 127, 100, 109, 82, 91, 64, 73, 62, 55, 44, 37, 26, 19, 8, 1, 230, 239, 244, 253, 194, 203, 208, 217, 174, 167, 188, 181, 138, 131, 152, 145, 77, 68, 95, 86, 105, 96, 123, 114, 5, 12, 23, 30, 33, 40, 51, 58, 221, 212, 207, 198, 249, 240, 235, 226, 149, 156, 135, 142, 177, 184, 163, 170, 236, 229, 254, 247, 200, 193, 218, 211, 164, 173, 182, 191, 128, 137, 146, 155, 124, 117, 110, 103, 88, 81, 74, 67, 52, 61, 38, 47, 16, 25, 2, 11, 215, 222, 197, 204, 243, 250, 225, 232, 159, 150, 141, 132, 187, 178, 169, 160, 71, 78, 85, 92, 99, 106, 113, 120, 15, 6, 29, 20, 43, 34, 57, 48, 154, 147, 136, 129, 190, 183, 172, 165, 210, 219, 192, 201, 246, 255, 228, 237, 10, 3, 24, 17, 46, 39, 60, 53, 66, 75, 80, 89, 102, 111, 116, 125, 161, 168, 179, 186, 133, 140, 151, 158, 233, 224, 251, 242, 205, 196, 223, 214, 49, 56, 35, 42, 21, 28, 7, 14, 121, 112, 107, 98, 93, 84, 79, 70]; static var MULT_B = [0, 11, 22, 29, 44, 39, 58, 49, 88, 83, 78, 69, 116, 127, 98, 105, 176, 187, 166, 173, 156, 151, 138, 129, 232, 227, 254, 245, 196, 207, 210, 217, 123, 112, 109, 102, 87, 92, 65, 74, 35, 40, 53, 62, 15, 4, 25, 18, 203, 192, 221, 214, 231, 236, 241, 250, 147, 152, 133, 142, 191, 180, 169, 162, 246, 253, 224, 235, 218, 209, 204, 199, 174, 165, 184, 179, 130, 137, 148, 159, 70, 77, 80, 91, 106, 97, 124, 119, 30, 21, 8, 3, 50, 57, 36, 47, 141, 134, 155, 144, 161, 170, 183, 188, 213, 222, 195, 200, 249, 242, 239, 228, 61, 54, 43, 32, 17, 26, 7, 12, 101, 110, 115, 120, 73, 66, 95, 84, 247, 252, 225, 234, 219, 208, 205, 198, 175, 164, 185, 178, 131, 136, 149, 158, 71, 76, 81, 90, 107, 96, 125, 118, 31, 20, 9, 2, 51, 56, 37, 46, 140, 135, 154, 145, 160, 171, 182, 189, 212, 223, 194, 201, 248, 243, 238, 229, 60, 55, 42, 33, 16, 27, 6, 13, 100, 111, 114, 121, 72, 67, 94, 85, 1, 10, 23, 28, 45, 38, 59, 48, 89, 82, 79, 68, 117, 126, 99, 104, 177, 186, 167, 172, 157, 150, 139, 128, 233, 226, 255, 244, 197, 206, 211, 216, 122, 113, 108, 103, 86, 93, 64, 75, 34, 41, 52, 63, 14, 5, 24, 19, 202, 193, 220, 215, 230, 237, 240, 251, 146, 153, 132, 143, 190, 181, 168, 163]; static var MULT_D = [0, 13, 26, 23, 52, 57, 46, 35, 104, 101, 114, 127, 92, 81, 70, 75, 208, 221, 202, 199, 228, 233, 254, 243, 184, 181, 162, 175, 140, 129, 150, 155, 187, 182, 161, 172, 143, 130, 149, 152, 211, 222, 201, 196, 231, 234, 253, 240, 107, 102, 113, 124, 95, 82, 69, 72, 3, 14, 25, 20, 55, 58, 45, 32, 109, 96, 119, 122, 89, 84, 67, 78, 5, 8, 31, 18, 49, 60, 43, 38, 189, 176, 167, 170, 137, 132, 147, 158, 213, 216, 207, 194, 225, 236, 251, 246, 214, 219, 204, 193, 226, 239, 248, 245, 190, 179, 164, 169, 138, 135, 144, 157, 6, 11, 28, 17, 50, 63, 40, 37, 110, 99, 116, 121, 90, 87, 64, 77, 218, 215, 192, 205, 238, 227, 244, 249, 178, 191, 168, 165, 134, 139, 156, 145, 10, 7, 16, 29, 62, 51, 36, 41, 98, 111, 120, 117, 86, 91, 76, 65, 97, 108, 123, 118, 85, 88, 79, 66, 9, 4, 19, 30, 61, 48, 39, 42, 177, 188, 171, 166, 133, 136, 159, 146, 217, 212, 195, 206, 237, 224, 247, 250, 183, 186, 173, 160, 131, 142, 153, 148, 223, 210, 197, 200, 235, 230, 241, 252, 103, 106, 125, 112, 83, 94, 73, 68, 15, 2, 21, 24, 59, 54, 33, 44, 12, 1, 22, 27, 56, 53, 34, 47, 100, 105, 126, 115, 80, 93, 74, 71, 220, 209, 198, 203, 232, 229, 242, 255, 180, 185, 174, 163, 128, 141, 154, 151]; static var MULT_E = [0, 14, 28, 18, 56, 54, 36, 42, 112, 126, 108, 98, 72, 70, 84, 90, 224, 238, 252, 242, 216, 214, 196, 202, 144, 158, 140, 130, 168, 166, 180, 186, 219, 213, 199, 201, 227, 237, 255, 241, 171, 165, 183, 185, 147, 157, 143, 129, 59, 53, 39, 41, 3, 13, 31, 17, 75, 69, 87, 89, 115, 125, 111, 97, 173, 163, 177, 191, 149, 155, 137, 135, 221, 211, 193, 207, 229, 235, 249, 247, 77, 67, 81, 95, 117, 123, 105, 103, 61, 51, 33, 47, 5, 11, 25, 23, 118, 120, 106, 100, 78, 64, 82, 92, 6, 8, 26, 20, 62, 48, 34, 44, 150, 152, 138, 132, 174, 160, 178, 188, 230, 232, 250, 244, 222, 208, 194, 204, 65, 79, 93, 83, 121, 119, 101, 107, 49, 63, 45, 35, 9, 7, 21, 27, 161, 175, 189, 179, 153, 151, 133, 139, 209, 223, 205, 195, 233, 231, 245, 251, 154, 148, 134, 136, 162, 172, 190, 176, 234, 228, 246, 248, 210, 220, 206, 192, 122, 116, 102, 104, 66, 76, 94, 80, 10, 4, 22, 24, 50, 60, 46, 32, 236, 226, 240, 254, 212, 218, 200, 198, 156, 146, 128, 142, 164, 170, 184, 182, 12, 2, 16, 30, 52, 58, 40, 38, 124, 114, 96, 110, 68, 74, 88, 86, 55, 57, 43, 37, 15, 1, 19, 29, 71, 73, 91, 85, 127, 113, 99, 109, 215, 217, 203, 197, 239, 225, 243, 253, 167, 169, 187, 181, 159, 145, 131, 141]; }
Symbol 20521 MovieClip [__Packages.com.google.youtube.tv.experiments.Experiment] Frame 0
class com.google.youtube.tv.experiments.Experiment { var id, start, end, mask, active; function Experiment (id, start, end, opt_mask) { this.id = id; this.start = start; this.end = end; mask = opt_mask; } function setActive(value) { if (!(active === undefined)) { return(active); } active = value; if (active && (mask)) { for (var name in mask) { if (_root[name.toLowerCase()] != mask[name].toLowerCase()) { active = false; break; } } } return(active); } function isActive() { if ((active === undefined) && (failOnAccess)) { active = false; } return(active); } function isInitialized() { return(active != undefined); } function getStart() { return(start); } function getEnd() { return(end); } function toString() { return(id); } static var EXP_SEQUENCIAL_IMAGE_LOAD = new com.google.youtube.tv.experiments.Experiment("920505", 0, 15); static var EXP_RICH_CAPTIONS = new com.google.youtube.tv.experiments.Experiment("945710", 0, 0); var failOnAccess = true; }
Symbol 20522 MovieClip [__Packages.com.google.youtube.tv.experiments.VariantExperiment] Frame 0
class com.google.youtube.tv.experiments.VariantExperiment extends com.google.youtube.tv.experiments.Experiment { var id, variant, failOnAccess; function VariantExperiment (id, variant, opt_failOnAccess) { super(); this.id = id; this.variant = variant; failOnAccess = ((opt_failOnAccess === undefined) ? (failOnAccess) : (opt_failOnAccess)); } function getStart() { return(0); } function getEnd() { return(Number(com.google.youtube.tv.app.Environment.getOverridenFlashVar(variant)) || 0); } static var EXP_REMOTES = new com.google.youtube.tv.experiments.VariantExperiment("920590", "remotes_percentage", false); static var EXP_COOKIES = new com.google.youtube.tv.experiments.VariantExperiment("920591", "cookies_percentage", false); }
Symbol 20523 MovieClip [__Packages.com.google.youtube.tv.osk.layout.ILayout] Frame 0
class com.google.youtube.tv.osk.layout.ILayout { function ILayout () { } }
Symbol 20524 MovieClip [__Packages.com.google.youtube.tv.osk.layout.EnglishLayout] Frame 0
class com.google.youtube.tv.osk.layout.EnglishLayout implements com.google.youtube.tv.osk.layout.ILayout { function EnglishLayout () { } function getKeys() { return(EN); } function getLangCode() { return("en"); } function toString() { return("<EnglishLayout />"); } static var EN = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; }
Symbol 20525 MovieClip [__Packages.com.google.youtube.tv.osk.layout.ChineseLayout] Frame 0
class com.google.youtube.tv.osk.layout.ChineseLayout extends com.google.youtube.tv.osk.layout.EnglishLayout { function ChineseLayout () { super(); } function getLangCode() { return("zh"); } function toString() { return("<ChineseLayout />"); } }
Symbol 20526 MovieClip [__Packages.com.adobe.serialization.json.JSONParseError] Frame 0
class com.adobe.serialization.json.JSONParseError extends Error { var _location, _text; function JSONParseError (message, location, text) { super(message || ""); _location = location || 0; _text = text || ""; } function get location() { return(_location); } function get text() { return(_text); } }
Symbol 20527 MovieClip [__Packages.com.google.youtube.tv.ui.Text] Frame 0
class com.google.youtube.tv.ui.Text extends com.google.youtube.tv.ui.View { var box, scaledSize, field, clip, setPos, format, size, unadoptedSize, text, tuncatedLength; function Text (parent, opt_box, opt_size, opt_color, opt_bold, opt_align, opt_wrap, opt_leading, opt_multiline, opt_autoSize) { super(parent); box = opt_box || (new flash.geom.Rectangle(0, 0, 10, 10)); scaleAndStoreFontSize(opt_size || (DEFAULT_FONT_SIZE)); var _local13 = com.google.youtube.tv.ui.Font.getFontInfoDiff().leftPaddingsDiff[scaledSize]; var _local14 = com.google.youtube.tv.ui.Font.getFontInfoDiff().rightPaddingsDiff[scaledSize]; var _local15 = com.google.youtube.tv.ui.Font.getFontInfoDiff().topPaddingsDiff[scaledSize]; field = clip.createTextField("field", clip.getNextHighestDepth(), _local13, _local15, box.width - _local14, box.height); setPos(box.x, box.y); field.autoSize = opt_autoSize || (opt_align || ((opt_box ? "none" : "left"))); field.selectable = false; field.wordWrap = opt_wrap; field.multiline = opt_multiline || (opt_wrap); format = new TextFormat(com.google.youtube.tv.ui.Font.DEFAULT_FONT_NAME); format.align = opt_align || "left"; format.color = opt_color || (com.google.youtube.tv.ui.Colors.WHITE); format.size = size; format.bold = com.google.youtube.tv.platform.Box.hasBold() && (opt_bold); format.leading = opt_leading; com.google.youtube.tv.platform.Box.setFont(field, format); } function setAlign(value) { format.align = value; com.google.youtube.tv.platform.Box.setFont(field, format); } function setBackground(color) { field.background = !_global.isNaN(color); field.backgroundColor = color; } function getFormat() { return(format); } function getFontSize() { return(unadoptedSize); } function getAdoptedFontSize() { return(size); } function setFontSize(value) { if (value == unadoptedSize) { return(undefined); } scaleAndStoreFontSize(value); format.size = size; com.google.youtube.tv.platform.Box.setFont(field, format); updateWidth(); } function setText(value) { text = value || ""; field.text = text; truncated = false; if (autoTruncate) { truncateWithEllipsis(); } } function getText() { return(text); } function setHtmlText(text) { field.html = true; field.htmlText = text; } function getHtmlText() { return(field.htmlText); } function setMultiline(value) { field.wordWrap = value; field.multiline = value; } function setAutoTruncate(value) { autoTruncate = value; if (autoTruncate) { truncateWithEllipsis(); } } function setTruncationEllipsis(value) { ellipsis = value || ""; if (autoTruncate) { truncateWithEllipsis(); } } function setTextColor(color) { format.color = color; com.google.youtube.tv.platform.Box.setFont(field, format); } function setLeading(value) { if (format.leading == value) { return(undefined); } format.leading = value; com.google.youtube.tv.platform.Box.setFont(field, format); if (autoTruncate) { truncateWithEllipsis(); } } function setAutoSize(value) { field.autoSize = value; } function setBold(value) { if ((format.bold == value) || (!com.google.youtube.tv.platform.Box.hasBold())) { return(undefined); } format.bold = value; com.google.youtube.tv.platform.Box.setFont(field, format); if (autoTruncate) { truncateWithEllipsis(); } } function getWidth() { return((field.textWidth + 4) + com.google.youtube.tv.ui.Font.getFontInfoDiff().rightPaddingsDiff[scaledSize]); } function setWidth(value) { if (box.width == value) { return(undefined); } box.width = value; updateWidth(); } function getHeight() { if (field.multiline) { return(field.textHeight + 8); } var _local2 = com.google.youtube.tv.ui.Font.getCanonicalFontInfo(); return((_local2.topPaddings[scaledSize] * 2) + _local2.heights[scaledSize]); } function setHeight(height) { if (box.height == height) { return(undefined); } field._height = height; box.height = height; if (autoTruncate) { truncateWithEllipsis(); } } function isTruncated() { return(truncated); } function getTruncatedLength() { return(tuncatedLength); } function getBox() { return(box); } function remove() { field.removeTextField(); super.remove(); } function toString() { return(("<Text " + getText()) + ">"); } function truncateWithEllipsis() { if (field.html) { tuncatedLength = _global.NaN; truncated = false; return(undefined); } if ((!truncated) && ((field.multiline || (getWidth() <= box.width)) && ((!field.multiline) || (getHeight() <= box.height)))) { tuncatedLength = _global.NaN; truncated = false; return(undefined); } var _local2 = 0; var _local3 = text.length; var _local4 = 0; var _local5 = _local3 - _local2; var _local8 = ""; var _local9 = Math.log(text.length) + 10; do { if (_local3 < _local2) { break; } var _local6 = Math.floor((_local3 / 2) + (_local2 / 2)); var _local7 = text.substring(0, _local6); field.text = ((_local7 == text) ? (text) : (_local7 + ellipsis)); if (field.multiline) { var _local10 = (box.height - field.textHeight) - 4; } else { var _local10 = (box.width - field.textWidth) - 4; } if (_local10 < 0) { _local3 = _local6 - 1; } else if (_local10 >= 0) { _local8 = _local7; _local2 = _local6 + 1; } _local4++; } while (_local4 <= _local9); if (_local8 == text) { field.text = text; } else { if (field.multiline) { var _local11 = _local8.length; while ((_local11 > 0) && (com.google.youtube.tv.util.StringUtil.trim(text.charAt(_local11)))) { _local11--; } if ((_local11 > 0) && ((_local8.length - _local11) < MAX_WORD_LENGTH)) { _local8 = _local8.substr(0, _local11); } } field.text = _local8 + ellipsis; } truncated = _local8 != text; tuncatedLength = (truncated ? (_local8.length) : (_global.NaN)); } function updateWidth() { field._width = box.width - com.google.youtube.tv.ui.Font.getFontInfoDiff().rightPaddingsDiff[scaledSize]; if (autoTruncate) { truncateWithEllipsis(); } } function scaleAndStoreFontSize(fontSize) { unadoptedSize = fontSize; var _local3 = Math.round(com.google.youtube.tv.ui.Font.getCanonicalFontInfo().heights[unadoptedSize] * com.google.youtube.tv.app.Config.SCALE); scaledSize = com.google.youtube.tv.ui.Font.getFontSizeForHeight(_local3, com.google.youtube.tv.ui.Font.getCanonicalFontInfo()); size = com.google.youtube.tv.ui.Font.adaptFontSize(unadoptedSize); } static var ELLIPSIS = "..."; static var DEFAULT_FONT_SIZE = 20; static var MAX_WORD_LENGTH = 30; var autoTruncate = false; var truncated = false; var ellipsis = ELLIPSIS; }
Symbol 20528 MovieClip [__Packages.com.google.youtube.tv.components.DialogWithButtons] Frame 0
class com.google.youtube.tv.components.DialogWithButtons extends com.google.youtube.tv.components.DialogBase { var initialized, buttons, buttonActivityDelegate, buttonClickDelegate, backButton, clip, selectedButtonId, enabled, content, broadcast, pop; function DialogWithButtons (parent) { super(parent); } function build() { if (initialized) { return(undefined); } super.build(); buttons = []; buttonActivityDelegate = com.google.chianti.event.EventDelegate.create(this, onButtonActivity); buttonClickDelegate = com.google.chianti.event.EventDelegate.create(this, onButtonClick); backButton.data = BACK_ID; registerButton(backButton); setSelectedButtonId(BACK_ID); } function addButton(label, opt_id, opt_default) { build(); var _local5 = new com.google.youtube.tv.view.ui.DialogButton(clip, BUTTON_WIDTH, BUTTON_HEIGHT); _local5.data = opt_id || (String(buttons.length)); _local5.initText(label); registerButton(_local5, opt_default); alignContent(); return(_local5); } function registerButton(button, opt_default) { button.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.USER_ACTIVITY, buttonActivityDelegate); button.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, buttonClickDelegate); buttons.push(button); if (opt_default || ((buttons.length == 1) && (!com.google.youtube.tv.platform.Box.isMouseOn()))) { setSelectedButtonId(String(button.data)); } } function unregisterButton(button) { button.unregisterEvent(com.google.youtube.tv.view.ui.UIComponentBase.USER_ACTIVITY, buttonActivityDelegate); button.unregisterEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, buttonClickDelegate); } function getSelectedButtonId() { return(selectedButtonId); } function setSelectedButtonId(value) { selectedButtonId = value; updateActiveButton(); } function getSelectedButtonIndex() { var _local2 = 0; for ( ; _local2 < buttons.length ; _local2++) { if (buttons[_local2].data == selectedButtonId) { return(_local2); } } return(-1); } function setSelectedButtonIndex(value) { selectedButtonId = buttons[value].data; updateActiveButton(); } function enable(value) { if (enabled == value) { return(undefined); } super.enable(value); updateActiveButton(); } function setAutoClose(value) { autoClose = value; } function addOKButton() { addButton(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.OK_BTN), OK_ID); } function handleKey(keyCode) { if ((keyCode == Key.LEFT) || ((keyCode == Key.RIGHT) || ((keyCode == Key.UP) || (keyCode == Key.DOWN)))) { var _local4 = (((keyCode == Key.LEFT) || (keyCode == Key.UP)) ? -1 : 1); setSelectedButtonIndex(((getSelectedButtonIndex() + buttons.length) + _local4) % buttons.length); return(true); } return(super.handleKey(keyCode)); } function clear() { var _local3 = 1; for ( ; _local3 < buttons.length ; _local3++) { var _local4 = buttons[_local3]; unregisterButton(_local4); _local4.remove(); } buttons.splice(1); setSelectedButtonId(BACK_ID); super.clear(); } function remove() { if (!buttons) { return(undefined); } if (content) { content.remove(); content = null; } var _local3 = 0; for ( ; _local3 < buttons.length ; _local3++) { var _local4 = buttons[_local3]; _local4.unregisterAll(); _local4.remove(); } buttons = null; super.remove(); } function alignContent() { content.setPos(com.google.youtube.tv.components.DialogBase.CONTENT_X, com.google.youtube.tv.components.DialogBase.CONTENT_Y); content.setWidth(com.google.youtube.tv.components.DialogBase.CONTENT_WIDTH); content.setHeight(content.getHeight()); alignButtons(com.google.youtube.tv.components.DialogBase.CONTENT_X, (com.google.youtube.tv.components.DialogBase.CONTENT_Y + content.getHeight()) + GAP); } function alignButtons(x, y) { var _local4 = 1; for ( ; _local4 < buttons.length ; _local4++) { com.google.youtube.tv.view.ui.Button(buttons[_local4]).setPos(x, y); x = x + (GAP + BUTTON_WIDTH); } } function updateActiveButton() { var _local2 = 0; for ( ; _local2 < buttons.length ; _local2++) { var _local3 = buttons[_local2]; _local3.setIsActive(enabled && ((selectedButtonId) && (_local3.data == selectedButtonId))); } } function getButtonIndex(button) { var _local3 = 0; for ( ; _local3 < buttons.length ; _local3++) { if (button == buttons[_local3]) { return(_local3); } } return(-1); } function getMinHeight() { return(((2 * GAP) + (buttons.length ? (BUTTON_HEIGHT) : 0)) + (content ? (content.getHeight() + GAP) : 0)); } function onButtonActivity(event) { setSelectedButtonId(String(com.google.youtube.tv.view.ui.Button(event.target).data)); } function onButtonClick(event) { var _local3 = event.target; broadcast({type:BUTTON_CLICK, id:_local3.data, index:getButtonIndex(_local3)}); if (autoClose) { pop(); } } static var BUTTON_CLICK = "BUTTON_CLICK"; static var OK_ID = "OK"; static var BACK_ID = "BACK"; static var GAP = 30 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_HEIGHT = 40 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_WIDTH = 140 * com.google.youtube.tv.app.Config.SCALE; var autoClose = true; }
Symbol 20529 MovieClip [__Packages.com.google.youtube.tv.components.Dialog] Frame 0
class com.google.youtube.tv.components.Dialog extends com.google.youtube.tv.components.DialogWithButtons { var title, message, htmlMessage, text, build, clip, content, alignContent; function Dialog (parent) { super(parent); } static function showDialog(container, message) { var _local4 = new com.google.youtube.tv.components.Dialog(container); _local4.setMessage(message); _local4.registerEvent(com.google.youtube.tv.components.DialogBase.CLOSE, com.google.chianti.event.EventDelegate.create(_local4, _local4.remove)); _local4.show(); return(_local4); } function getTitle() { return(title); } function setTitle(value) { title = value; updateText(); } function getMessage() { return(message); } function setMessage(value) { message = value; htmlMessage = null; updateText(); } function setMessageAlign(value) { updateText(); text.setAlign(value); } function getHtmlMessage() { return(htmlMessage); } function setHtmlMessage(value) { htmlMessage = value; message = null; updateText(); } function clear() { title = null; message = null; htmlMessage = null; updateText(); super.clear(); } function updateText() { build(); if (!text) { text = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(0, 0, com.google.youtube.tv.components.DialogBase.CONTENT_WIDTH, com.google.youtube.tv.components.DialogBase.CONTENT_MAX_HEIGHT), com.google.youtube.tv.ui.Text.DEFAULT_FONT_SIZE, com.google.youtube.tv.ui.Colors.WHITE); text.setMultiline(true); content = text; } var _local2 = ""; if (title) { _local2 = ((("<font size='" + com.google.youtube.tv.ui.Font.getFontSizeForHeight(TITLE_LINE_HEIGHT)) + "'>") + title) + "</font><br><br>"; } _local2 = _local2 + (message || (htmlMessage || "")); text.setHtmlText(_local2); alignContent(); } static var TITLE_LINE_HEIGHT = 29 * com.google.youtube.tv.app.Config.SCALE; }
Symbol 20530 MovieClip [__Packages.com.google.chianti.event.EventDelegate] Frame 0
class com.google.chianti.event.EventDelegate extends Object { function EventDelegate () { super(); } static function create(scope, handler, data) { var _local2 = function () { if (data != undefined) { arguments.push(data); } return(handler.apply(scope, arguments)); }; _local2.scope = scope; return(_local2); } }
Symbol 20531 MovieClip [__Packages.com.google.youtube.tv.controller.Switcher] Frame 0
class com.google.youtube.tv.controller.Switcher { static var instance; var stack, fallback, background, currentComponent, dialog; function Switcher () { stack = []; Key.addListener(this); Mouse.addListener(this); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.MOUSE_WHEEL, com.google.chianti.event.EventDelegate.create(this, onMouseWheel)); } function setFallback(value) { fallback = value; } function setBackground(value) { background = value; } function switchTo(selectedComponent) { if (selectedComponent == currentComponent) { if (dialog) { setDialog(null); } return(undefined); } if (currentComponent) { stack.push(currentComponent); } switchComponent(selectedComponent); } function getDialog() { return(dialog); } function setDialog(value, opt_enableCurrentComponent) { if (dialog == value) { return(undefined); } if (dialog) { dialog.enable(false); dialog.setVisible(false); } dialog = value; if ((opt_enableCurrentComponent == undefined) || (opt_enableCurrentComponent)) { currentComponent.enable(dialog == null); } if (dialog) { dialog.setVisible(true); dialog.enable(true); } else { dialogRemoveTime = getTimer(); } } function onKeyDown() { if (isDialogJustRemoved()) { return(undefined); } var _local2 = com.google.youtube.tv.platform.Box.selectRemote().mapKeyCode(-Key.getCode()); if (!_local2) { return(undefined); } var _local3 = dialog || (currentComponent); if (!_local3.handleNavigationKey(_local2)) { _local3.handleKey(_local2); } } function onKeyUp() { if (isDialogJustRemoved()) { return(undefined); } var _local2 = com.google.youtube.tv.platform.Box.selectRemote().mapKeyCode(Key.getCode()); if (!_local2) { return(undefined); } var _local3 = dialog || (currentComponent); if (!_local3.handleNavigationKey(_local2)) { _local3.handleKey(_local2); } } function onMouseMove() { if (isDialogJustRemoved()) { return(undefined); } var _local2 = dialog || (currentComponent); _local2.handleMouseMove(); } static function getSwitcher() { if (!instance) { instance = new com.google.youtube.tv.controller.Switcher(); } return(instance); } function getTos() { return(currentComponent); } function reset() { currentComponent.setVisible(false); currentComponent.enable(false); currentComponent = null; stack = []; } function resetUntil(component) { var _local3 = 0; for ( ; _local3 < stack.length ; _local3++) { if (stack[_local3] == component) { currentComponent.setVisible(false); currentComponent.enable(false); currentComponent = null; stack.splice(_local3); } } } function pop() { if (dialog) { setDialog(null); } else if (stack.length) { do { var _local2 = com.google.youtube.tv.components.BaseComponent(stack.pop()); } while (_local2 && (_local2.isRemoved())); switchComponent(_local2); } } function onMouseWheel(e) { currentComponent.handleWheel(e.delta); } function toString() { return(("<Switcher stack: " + stack) + " />"); } function switchComponent(selectedComponent) { if (dialog) { setDialog(null, false); } if (currentComponent) { currentComponent.enable(false); currentComponent.setVisible(false); } currentComponent = selectedComponent || (fallback); if (currentComponent) { currentComponent.setVisible(true); currentComponent.enable(); } if (background) { background.setVisible(currentComponent.needsBackground()); } com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.SWITCHED_TO_COMPONENT)); } function isDialogJustRemoved() { return((getTimer() - dialogRemoveTime) <= DIALOG_SILENCE_PERIOD); } static var DIALOG_SILENCE_PERIOD = 100; var dialogRemoveTime = 0; }
Symbol 20532 MovieClip [__Packages.com.google.youtube.tv.view.TransportHeaderView] Frame 0
class com.google.youtube.tv.view.TransportHeaderView extends com.google.youtube.tv.ui.View { var clip, logo, image, title, subtitle, videoNode; function TransportHeaderView (parent) { super(parent, "header"); com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, Stage.width, HEIGHT, 0, 0, 0, com.google.youtube.tv.ui.Colors.BLACK, 50); com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, HEIGHT - 1, Stage.width, 1, 0, 0, 0, com.google.youtube.tv.ui.Colors.WHITE, 20); logo = new com.google.youtube.tv.ui.Symbol(clip, "logoWhite", false); logo.setPos((Stage.width - MARGIN_H) - logo.getWidth(), (HEIGHT / 2) - (logo.getHeight() / 2)); logo.setAlpha(60); image = new com.google.youtube.tv.ui.Image(clip, new flash.geom.Rectangle(MARGIN_H, MARGIN_V, IMAGE_SIZE, IMAGE_SIZE)); TITLE_BOX.height = com.google.youtube.tv.ui.Font.getComponentHeight(TITLE_LINE_HEIGHT); title = new com.google.youtube.tv.ui.Text(clip, TITLE_BOX, com.google.youtube.tv.ui.Font.getFontSizeForHeight(TITLE_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); title.setAutoTruncate(true); SUBTITLE_BOX.height = com.google.youtube.tv.ui.Font.getComponentHeight(SUBTITLE_LINE_HEIGHT); subtitle = new com.google.youtube.tv.ui.Text(clip, SUBTITLE_BOX, com.google.youtube.tv.ui.Font.getFontSizeForHeight(SUBTITLE_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); subtitle.setAutoTruncate(true); } function setVideoNode(value) { if (videoNode == value) { return(undefined); } videoNode = value; if (videoNode) { update(); } } function update() { image.setImage(com.google.youtube.tv.util.YTUtil.getImageUrl(videoNode.getUploaderId())); title.setText(videoNode.getTitle()); subtitle.setText(getSubtitleText()); } function getSubtitleText() { var _local2 = []; if (videoNode.getAuthor()) { _local2.push(videoNode.getAuthor()); } if (videoNode.getPublished()) { _local2.push(videoNode.getPublished()); } if (videoNode.getViewCount() && (videoNode.getViewCount() != "0")) { _local2.push(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.N_VIEWS, {VIEWS:videoNode.getViewCount()})); } return(_local2.join(" ")); } static var MARGIN_V = 44 * com.google.youtube.tv.app.Config.SCALE; static var MARGIN_H = 65 * com.google.youtube.tv.app.Config.SCALE; static var IMAGE_SIZE = 88 * com.google.youtube.tv.app.Config.SCALE; static var HEIGHT = IMAGE_SIZE + (2 * MARGIN_V); static var IMAGE_GAP = 20 * com.google.youtube.tv.app.Config.SCALE; static var LOGO_MAX_WIDTH = 140; static var TEXT_WIDTH = (((Stage.width - (2 * MARGIN_H)) - IMAGE_SIZE) - IMAGE_GAP) - LOGO_MAX_WIDTH; static var TITLE_LINE_HEIGHT = 28; static var TITLE_BOX = new flash.geom.Rectangle((MARGIN_H + IMAGE_SIZE) + IMAGE_GAP, MARGIN_V, TEXT_WIDTH, 0); static var SUBTITLE_LINE_HEIGHT = 17; static var SUBTITLE_BOX = new flash.geom.Rectangle((MARGIN_H + IMAGE_SIZE) + IMAGE_GAP, MARGIN_V + (50 * com.google.youtube.tv.app.Config.SCALE), TEXT_WIDTH, 0); }
Symbol 20533 MovieClip [__Packages.com.google.youtube.tv.views.BaseThumbnail] Frame 0
class com.google.youtube.tv.views.BaseThumbnail extends com.google.youtube.tv.ui.View { var hasBackground, hasGlow, width, height, clip, highlightInitialized; function BaseThumbnail (parent, description, opt_width, opt_height, opt_hasBackground) { super(parent, description); hasBackground = ((opt_hasBackground == undefined) ? true : (opt_hasBackground)); hasGlow = hasBackground; setSize(opt_width || (THUMBNAIL_WIDTH), opt_height || (THUMBNAIL_HEIGHT)); } function setSize(width, height) { if ((this.width == width) && (this.height == height)) { return(undefined); } this.width = width; this.height = height; redrawGraphics(); } function redrawGraphics() { clip.clear(); if (hasGlow) { com.google.youtube.tv.util.DrawUtil.drawGlow(clip, 0, 0, width, height, SHADOW_SIZE, 0, com.google.youtube.tv.ui.Colors.BLACK, 20); } drawBackground(); } function drawBackground() { if (hasBackground) { var _local2 = (isSelected ? (com.google.youtube.tv.ui.Colors.WHITE) : (com.google.youtube.tv.ui.Colors.BLACK)); var _local3 = 100; if (isButton && (isSelected)) { _local3 = 50; } else if (!isSelected) { _local3 = 70; } com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, width, height, 0, 0, 0, _local2, _local3); } } function setHighlight(value) { if ((isSelected == value) && (highlightInitialized)) { return(undefined); } isSelected = value; highlightInitialized = true; redrawGraphics(); } function getWidth() { return(width); } function getHeight() { return(height); } function getClassName() { return(BASE_THUMBNAIL); } function toString() { return(" < BaseThumbnail > "); } static var BASE_THUMBNAIL = "com.google.youtube.tv.views.BaseThumbnail"; static var THUMBNAIL_WIDTH = 320 * com.google.youtube.tv.app.Config.SCALE; static var THUMBNAIL_HEIGHT = 310 * com.google.youtube.tv.app.Config.SCALE; static var HIGHLIGHT_HEIGHT = 5 * com.google.youtube.tv.app.Config.SCALE; static var SHADOW_SIZE = 3 * com.google.youtube.tv.app.Config.SCALE; var isSelected = false; var isButton = false; }
Symbol 20534 MovieClip [__Packages.com.google.youtube.tv.views.TextThumbnail] Frame 0
class com.google.youtube.tv.views.TextThumbnail extends com.google.youtube.tv.views.BaseThumbnail { var textView, clip, width, isSelected, height; function TextThumbnail (parent, opt_description, opt_width, opt_height, opt_hasBackground) { super(parent, opt_description || "textThumbnail", opt_width, opt_height, opt_hasBackground); textView = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(TEXT_MARGIN, TEXT_MARGIN, width - (TEXT_MARGIN * 2), getMaxTextHeight()), FONT_SIZE, com.google.youtube.tv.ui.Colors.MID_GRAY, false, "center"); textView.setMultiline(true); textView.setAutoTruncate(true); } function setSize(width, height) { super.setSize(width, height); if (textView) { align(); } } function redrawGraphics() { super.redrawGraphics(); textView.setTextColor((isSelected ? (com.google.youtube.tv.ui.Colors.BLACK) : (com.google.youtube.tv.ui.Colors.WHITE))); } function setText(value) { textView.setHeight(getMaxTextHeight()); textView.setText(value); align(); } function setHtmlText(value) { textView.setHeight(getMaxTextHeight()); textView.setHtmlText(value); align(); } function getClassName() { return(TEXT_THUMBNAIL); } function cleanBeforeRecycle(keepImage) { super.cleanBeforeRecycle(keepImage); setText(""); } function toString() { return("<TextThumbnail>"); } function getMaxTextHeight() { return(height - (TEXT_MARGIN * 2)); } function align() { var _local2 = textView.getHeight() > (height / 3); if (!textView.field.html) { textView.setAlign((_local2 ? "left" : "center")); textView.setTextColor((_local2 ? (com.google.youtube.tv.ui.Colors.WHITE) : (com.google.youtube.tv.ui.Colors.MID_GRAY))); textView.setFontSize((textView.isTruncated() ? (FALLBACK_FONT_SIZE) : (FONT_SIZE))); } textView.setHeight(textView.getHeight()); textView.setPos(textView.getPos().x, (height / 2) - (textView.getHeight() / 2)); } static var TEXT_THUMBNAIL = "com.google.youtube.tv.views.TextThumbnail"; static var FONT_SIZE = 24; static var FALLBACK_FONT_SIZE = 20; static var TEXT_MARGIN = 15 * com.google.youtube.tv.app.Config.SCALE; }
Symbol 20535 MovieClip [__Packages.com.google.youtube.tv.services.PairService] Frame 0
class com.google.youtube.tv.services.PairService extends com.google.chianti.event.EventBroadcaster { static var instance; var playlistUpdateHandler, loader, playlistLocation, currentVideoIndex, currentPlayerState, storage, isUIOpen, isConnected, broadcast, pairedList, screenId, pairCodeRefreshInterval, browserChannel, wasPaired, currentAction, request, loungeToken, pairCode, currentVideoTime, currentVideoId, lastNowPlayingSentFor, currentPlaylist, playlistNode, playlistVmap, videoStartSeconds; function PairService () { super(); com.google.chianti.event.EventBroadcaster.initialize(this); playlistUpdateHandler = com.google.chianti.event.EventDelegate.create(this, onPlaylistNodeUpdate); loader = new LoadVars(); loader.onData = com.google.chianti.event.EventDelegate.create(this, processApiResponse); } static function getInstance() { if (instance == null) { instance = new com.google.youtube.tv.services.PairService(); } return(instance); } function init(location, isPlayerReady) { playlistLocation = location; currentVideoIndex = -1; currentPlayerState = -1; storage = com.google.youtube.tv.services.StorageService.get(); if (storage.isReady()) { connect(); } else { storage.registerEvent(com.google.youtube.tv.services.StorageService.STORAGE_READY, com.google.chianti.event.EventDelegate.create(this, connect)); } if (isPlayerReady) { onPlayerReady(); } else { com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_READY, com.google.chianti.event.EventDelegate.create(this, onPlayerReady)); } } function generatePairCode() { isUIOpen = true; if (!isConnected) { connect(); return(undefined); } broadcast({type:PAIRED_LIST_UPDATE, devices:buildArrayFromObject(pairedList)}); getPairCode(); } function resetPairingSettings() { disconnect(); storage.setValueWithoutFlush(com.google.youtube.tv.services.StorageService.SCREEN_ID, null); storage.setValue(com.google.youtube.tv.services.StorageService.WAS_PAIRED, "false"); pairedList = null; screenId = null; clearPlaylist(); broadcast({type:PAIRED_LIST_UPDATE, devices:[]}); com.google.youtube.tv.services.StatsLoggerService.getInstance().sendPairResetSettings(); generatePairCode(); } function stopTryingToPair() { if (pairCodeRefreshInterval) { pairCodeRefreshInterval.stop(); pairCodeRefreshInterval = null; } } function disconnect() { if (browserChannel && (isConnected)) { isConnected = false; sendDisconnectedMessage(); browserChannel.disconnect(); } } function connect() { screenId = storage.getValue(com.google.youtube.tv.services.StorageService.SCREEN_ID); wasPaired = storage.getValue(com.google.youtube.tv.services.StorageService.WAS_PAIRED) == "true"; var _local2 = com.google.youtube.tv.platform.Box.getPairingCode(); if ((!wasPaired) && ((!isUIOpen) && (!_local2))) { return(undefined); } if ((screenId == undefined) || (!screenId.length)) { getScreenId(); return(undefined); } getLoungeToken(); } function getScreenId() { currentAction = ACTION_SCREEN_ID; request = new LoadVars(); sendRequest(request, PAIRING_BASE_URL + currentAction); } function getLoungeToken() { currentAction = ACTION_LOUNGE_TOKEN; request = new LoadVars(); request.screen_id = screenId; sendRequest(request, PAIRING_BASE_URL + currentAction); } function getPairCode() { currentAction = ACTION_PAIRING_CODE; request = new LoadVars(); request.access_type = "permanent"; request.lounge_token = loungeToken; sendRequest(request, PAIRING_BASE_URL + currentAction); if (!pairCodeRefreshInterval) { pairCodeRefreshInterval = com.google.youtube.util.Scheduler.setInterval(PAIR_CODE_LIFETIME, com.google.chianti.event.EventDelegate.create(this, getPairCode)); } } function isPaired() { for (var p in pairedList) { if (pairedList[p]) { return(true); } } return(false); } function registerPairingCode() { var _local2 = com.google.youtube.tv.platform.Box.getPairingCode(); if (!_local2) { return(undefined); } feature = FEATURE_DIAL; currentAction = ACTION_REGISTER_PAIRING_CODE; request = new LoadVars(); request.pairing_code = _local2; request.screen_id = screenId; request.access_type = "permanent"; request.screen_name = com.google.youtube.tv.platform.Box.getVendor(); sendRequest(request, PAIRING_BASE_URL + currentAction); } function sendRequest(request, url) { if (!request.sendAndLoad(url, loader, "POST")) { onDataError(); } } function processApiResponse(src) { if (!src) { onDataError(); return(undefined); } switch (currentAction) { case ACTION_SCREEN_ID : screenId = src; storage.setValue(com.google.youtube.tv.services.StorageService.SCREEN_ID, screenId); getLoungeToken(); break; case ACTION_LOUNGE_TOKEN : isConnected = true; loungeToken = src; initBrowserChannel(); initApplicationListeners(); if (isUIOpen) { getPairCode(); } break; case ACTION_PAIRING_CODE : pairCode = src; broadcast({type:PAIR_CODE_RETRIEVED, code:pairCode}); } } function onDataError() { } function initApplicationListeners() { com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_STATE_CHANGE, com.google.chianti.event.EventDelegate.create(this, onPlayerStateChange)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_PROGRESS, com.google.chianti.event.EventDelegate.create(this, onPlayerProgress)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_EXIT_ON_BACK, com.google.chianti.event.EventDelegate.create(this, onAppExitEvent)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SEEK_TO, com.google.chianti.event.EventDelegate.create(this, onPlayerVideoSeek)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_WATCH_PLAYLIST, com.google.chianti.event.EventDelegate.create(this, onPlayerPlaylistChanged)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_ERROR, com.google.chianti.event.EventDelegate.create(this, onPlayerError)); com.google.youtube.tv.ads.AdsService.getInstance().adState.vmap(com.google.chianti.event.EventDelegate.create(this, onAdState)); } function onAdState(state) { if (!isPaired()) { return(undefined); } if (state == com.google.youtube.tv.ads.AdsService.AD_STATE_LOAD) { sendCurrentState(com.google.youtube.tv.model.PlayerState.AD_PLAYING); } else if ((state == com.google.youtube.tv.ads.AdsService.AD_STATE_COMPLETE) || (state == com.google.youtube.tv.ads.AdsService.AD_STATE_ERROR)) { sendCurrentState(); } } function onAppExitEvent(event) { disconnect(); } function onPlayerReady() { apiplayerReady = true; onPlaylistNodeUpdate(); } function onPlayerPlaylistChanged(event) { } function onPlayerVideoSeek(event) { currentPlayerState = event.playerState; currentVideoTime = event.seekToTime; if (isPaired()) { sendCurrentState(); } } function onPlayerProgress(event) { var _local3 = currentVideoTime; currentVideoTime = event.currentTime || 0; if ((Math.abs(currentVideoTime - _local3) > SEEK_DETECTION_TOLERANCE) && (isPaired())) { sendCurrentState(); } } function onPlayerStateChange(event) { currentPlayerState = ((event.playerState == com.google.youtube.tv.model.PlayerState.VIDEO_CUED) ? (com.google.youtube.tv.model.PlayerState.ENDED) : (event.playerState)); currentVideoTime = event.currentTime; if (event.videoId && ((currentVideoId != "undefined") && ((currentPlayerState != com.google.youtube.tv.model.PlayerState.ENDED) && ((currentVideoId != event.videoId) || (lastNowPlayingSentFor != currentVideoId))))) { currentVideoId = event.videoId; currentVideoIndex = getVideoIdx(currentVideoId, currentPlaylist.split(",")); if (currentVideoId && ((currentVideoIndex == -1) && (isPaired()))) { includeCurrentVideoInPlaylist(); sendCurrentPlaylist(); } else if (isPaired()) { sendNowPlaying(); onPlaylistNodeUpdate(); } } else if ((currentVideoId == event.videoId) && (isPaired())) { sendCurrentState(); } if (currentPlayerState == com.google.youtube.tv.model.PlayerState.ENDED) { currentVideoId = ""; currentVideoIndex = -1; } } function includeCurrentVideoInPlaylist() { if (currentPlaylist) { currentPlaylist = currentPlaylist + ("," + currentVideoId); } else { currentPlaylist = currentVideoId; } currentVideoIndex = currentPlaylist.split(",").length - 1; playlistNode.addVideosToLoad([currentVideoId]); } function onPlayerError(event) { if ((currentVideoId == event.videoId) && (isPaired())) { sendPlaybackError(currentVideoId, event.error); } } function initBrowserChannel() { if (browserChannel) { browserChannel.disconnect(); } var _local2 = {id:"flashlite", name:"flashlite", device:"LOUNGE_SCREEN", loungeIdToken:loungeToken, v:"2"}; browserChannel = createBrowserChannel(BIND_BASE_URL, _local2, null); browserChannel.registerEvent(com.google.chianti.event.EventBroadcaster.ALL, com.google.chianti.event.EventDelegate.create(this, onBCCommands)); browserChannel.registerEvent(com.google.net.browserchannel.BrowserChannel.EVENT_CONNECTED, com.google.chianti.event.EventDelegate.create(this, onBCConnected)); browserChannel.registerEvent(com.google.net.browserchannel.BrowserChannel.EVENT_RECONNECTED, com.google.chianti.event.EventDelegate.create(this, onBCReconnected)); browserChannel.registerEvent(com.google.net.browserchannel.BrowserChannel.EVENT_NETWORK_FAILURE, com.google.chianti.event.EventDelegate.create(this, onBCNetworkFail)); browserChannel.registerEvent(com.google.net.browserchannel.BrowserChannel.EVENT_FORWARD_CHANNEL_DATA, com.google.chianti.event.EventDelegate.create(this, onBCForwardChannelData)); browserChannel.registerEvent(com.google.net.browserchannel.BrowserChannel.EVENT_BACK_CHANNEL_DATA, com.google.chianti.event.EventDelegate.create(this, onBCBackChannelData)); browserChannel.connect(); } function createBrowserChannel(baseUrl, params, headers) { return(new com.google.net.browserchannel.BrowserChannel(baseUrl, params, headers)); } function onBCConnected(event) { if (com.google.youtube.tv.view.DebugView.isEnabled() && (SHOW_DEBUG_MESSAGES)) { com.google.youtube.tv.view.DebugView.log("BC connected"); } registerPairingCode(); } function onBCReconnected(event) { if (com.google.youtube.tv.view.DebugView.isEnabled() && (SHOW_DEBUG_MESSAGES)) { com.google.youtube.tv.view.DebugView.log("BC reconnected"); } } function onBCNetworkFail(event) { if (com.google.youtube.tv.view.DebugView.isEnabled() && (SHOW_DEBUG_MESSAGES)) { com.google.youtube.tv.view.DebugView.log("BC network failure"); } } function onBCForwardChannelData(event) { if (com.google.youtube.tv.view.DebugView.isEnabled() && (SHOW_DEBUG_MESSAGES)) { com.google.youtube.tv.view.DebugView.log((("forw BC data (state=" + event.state) + "): ") + event.data); } } function onBCBackChannelData(event) { if (com.google.youtube.tv.view.DebugView.isEnabled() && (SHOW_DEBUG_MESSAGES)) { com.google.youtube.tv.view.DebugView.log((("back BC data (state=" + event.state) + "): ") + event.data); } } function onBCCommands(event) { var _local3 = event.payload[0]; var _local4 = event.payload[1]; switch (_local3) { case CMD_LOUNGE_STATUS : processLoungeDeviceList(_local4); com.google.youtube.tv.services.StatsLoggerService.getInstance().sendPairedDevicesListUpdate(buildArrayFromObject(pairedList).length, true); break; case CMD_REMOTE_CONNECTED : case CMD_REMOTE_DISCONNECTED : managePairedRemote(_local4, _local3 == CMD_REMOTE_CONNECTED); com.google.youtube.tv.services.StatsLoggerService.getInstance().sendPairedDevicesListUpdate(buildArrayFromObject(pairedList).length); break; case CMD_GET_PLAYLIST : sendCurrentPlaylist(); break; case CMD_GET_NOW_PLAYING : sendNowPlaying(_local4.recipientDevice); break; case CMD_SET_PLAYLIST : setPlaylist(_local4); com.google.youtube.tv.services.StatsLoggerService.getInstance().sendPairedPlaylistUpdate(playlistNode.getChildrenCountWithPending(), playlistNode.generation); break; case CMD_UPDATE_PLAYLIST : updateCurrentPlaylist(_local4); com.google.youtube.tv.services.StatsLoggerService.getInstance().sendPairedPlaylistUpdate(playlistNode.getChildrenCountWithPending(), playlistNode.generation); break; case CMD_SET_VIDEO : setPlaylistVideo(_local4); break; case CMD_STOP_VIDEO : if ((currentPlayerState == 1) || (currentPlayerState == 3)) { broadcastVideoPlayerAction("PLAY_PAUSE"); } com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SHOW_GUIDE)); break; case CMD_PLAY : case CMD_PAUSE : case CMD_PREV : case CMD_NEXT : case CMD_SEEK_TO : if (((_local3 == CMD_PLAY) && ((currentPlayerState == com.google.youtube.tv.model.PlayerState.PLAYING) || (currentPlayerState == com.google.youtube.tv.model.PlayerState.BUFFERING))) || ((_local3 == CMD_PAUSE) && (currentPlayerState == com.google.youtube.tv.model.PlayerState.PAUSED))) { return(undefined); } var _local5 = Number(_local4.newTime) || 0; var _local6 = _local3.toUpperCase(); if ((_local3 == CMD_PLAY) || (_local3 == CMD_PAUSE)) { _local6 = "PLAY_PAUSE"; } broadcastVideoPlayerAction(_local6, _local5); if (_local3 != CMD_PLAY) { break; } sendNowPlaying(); } } function managePairedRemote(description, add) { if (!pairedList) { pairedList = {}; } if (add) { pairedList[description.id] = {user:description.user, name:description.name, app:description.app}; if (!wasPaired) { storage.setValue(com.google.youtube.tv.services.StorageService.WAS_PAIRED, "true"); wasPaired = true; } if (currentVideoId && (currentVideoIndex == -1)) { includeCurrentVideoInPlaylist(); } if (currentVideoId) { sendCurrentPlaylist(); } } else { delete pairedList[description.id]; } saveAndUpdateDevicesList(); } function processLoungeDeviceList(loungeInfo) { if (!pairedList) { pairedList = {}; } var _local3 = Array(com.adobe.serialization.json.JSON.decode(loungeInfo.devices)); var _local4 = 0; for ( ; _local4 < _local3.length ; _local4++) { var _local5 = _local3[_local4]; if (_local5.type == "REMOTE_CONTROL") { pairedList[_local5.id] = {user:_local5.user, name:_local5.name, app:_local5.app}; } } if (isPaired()) { storage.setValue(com.google.youtube.tv.services.StorageService.WAS_PAIRED, "true"); wasPaired = true; } saveAndUpdateDevicesList(); } function updateCurrentPlaylist(updatedPlaylist) { if ((!currentPlaylist) || (!playlistNode)) { initPlaylistNode(updatedPlaylist); } var _local3 = sanitizePlaylistCSV(updatedPlaylist.videoIds); var _local4 = com.google.youtube.tv.util.StringUtil.getSerializedListsDiff(currentPlaylist, _local3); if (_local4.removed.join(",") == currentPlaylist) { clearPlaylist(); sendPlaylistUpdateConfirmation(true); return(undefined); } if (_local4.added.length) { var _local5 = _local4.added.join(","); if (_local3.indexOf(_local5) == (_local3.length - _local5.length)) { playlistNode.addVideosToLoad(_local4.added); } else { initPlaylistNode(updatedPlaylist); } } if (_local4.removed.length) { var _local6 = 0; for ( ; _local6 < _local4.removed.length ; _local6++) { playlistNode.removeVideoById(_local4.removed[_local6]); } } currentPlaylist = _local3; sendPlaylistUpdateConfirmation(true); } function clearPlaylist() { playlistNode = null; playlistVmap = null; currentVideoIndex = -1; currentVideoId = ""; currentPlaylist = ""; } function setPlaylist(playlistInfo) { currentVideoIndex = _global.parseInt(playlistInfo.currentIndex) || 0; videoStartSeconds = _global.parseFloat(playlistInfo.currentTime) || null; initPlaylistNode(playlistInfo); playlistNode.loadToIndex(currentVideoIndex); playCurrentVideo(); } function initPlaylistNode(playlistInfo) { var _local3 = sanitizePlaylistCSV(playlistInfo.videoIds); var _local4 = _local3.split(","); currentPlaylist = _local3; currentVideoId = _local4[currentVideoIndex]; if ((!_local4.length) && (!currentPlaylist.length)) { return(undefined); } var _local6 = []; var _local7 = 0; for ( ; _local7 < _local4.length ; _local7++) { var _local8 = com.google.youtube.tv.util.StringUtil.replacePlaceholders(com.google.youtube.tv.tree.ContentTree.FEED_VIDEO_INFO_TEMPLATE, {videoId:_local4[_local7], fields:com.google.youtube.tv.tree.ContentTree.FEED_VIDEO_INFO_FIELDS}); var _local5 = {url:_local8, xtractor:com.google.youtube.tv.tree.ContentTree.FEED_VIDEO_INFO_XTRACTOR, needLoadMore:false, videoId:_local4[_local7]}; _local6.push(_local5); } if (playlistNode) { playlistNode = null; playlistVmap = null; } playlistNode = createPlaylistNode(_local6); updateTrackingFeatures(); playlistVmap = playlistNode.getValueStream().vmap(playlistUpdateHandler); } function createPlaylistNode(videosList) { return(new com.google.youtube.tv.tree.ComplexFeedNode(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.TV_QUEUE), videosList)); } function onPlaylistNodeUpdate() { if (playlistNode.hasErrors()) { sendPlaybackError(currentVideoId, "privateVideo"); playlistNode.setLoaded(true, false); return(undefined); } if ((!apiplayerReady) || (!playlistNode.getChildren()[currentVideoIndex])) { return(undefined); } if (videoStartSeconds) { com.google.youtube.tv.tree.VideoNode(playlistNode.getChildren()[currentVideoIndex]).setStartSeconds(videoStartSeconds); videoStartSeconds = null; } if (isUIOpen) { stopTryingToPair(); isUIOpen = false; broadcast({type:CLOSE_PAIRING_UI}); } if (com.google.youtube.tv.platform.Box.isWii()) { playCurrentVideo(); } else { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_WATCH_PLAYLIST, {playlist:playlistNode, index:currentVideoIndex})); } } function setPlaylistVideo(videoInfo) { if (!currentPlaylist.length) { return(undefined); } if (currentVideoId == videoInfo.videoId) { sendNowPlaying(); onPlaylistNodeUpdate(); return(undefined); } var _local3 = playlistNode.getAllVideosSeparatedByStatus(); var _local4 = getVideoIdx(videoInfo.videoId, _local3[0].concat(_local3[1])); currentVideoId = videoInfo.videoId; currentVideoTime = 0; if (_local4 == -1) { return(undefined); } currentVideoIndex = _local4; playCurrentVideo(); sendNowPlaying(); onPlaylistNodeUpdate(); } function playCurrentVideo() { if (com.google.youtube.tv.platform.Box.isWii()) { playlistLocation.moveTo(playlistNode.getChildren()[currentVideoIndex], 0); } else { playlistLocation.moveTo(playlistNode, currentVideoIndex); } } function sendNowPlaying(opt_recipientDevice) { lastNowPlayingSentFor = currentVideoId; var _local3 = {_sc:SC_NOW_PLAYING}; if (currentVideoId) { _local3 = com.google.youtube.tv.util.ObjectUtil.merge(_local3, {video_id:currentVideoId, current_time:currentVideoTime || 0, state:currentPlayerState || -1}); } if (opt_recipientDevice) { _local3.recipientDevice = opt_recipientDevice; } sendBCData([_local3]); } function sendCurrentState(opt_state) { sendBCData([{_sc:SC_ON_STATE_CHANGE, state:opt_state || (currentPlayerState), currentTime:currentVideoTime || 0}]); } function sendCurrentPlaylist() { var _local2 = {_sc:SC_NOW_PLAYING_PLAYLIST}; if (currentPlaylist.length && (currentVideoId)) { _local2 = com.google.youtube.tv.util.ObjectUtil.merge(_local2, {video_ids:currentPlaylist, video_id:currentVideoId, state:currentPlayerState, current_time:currentVideoTime || 0}); } sendBCData([_local2]); } function sendPlaylistUpdateConfirmation(isUpdated) { sendBCData([{_sc:SC_CONFIRM_UPDATE, updated:isUpdated}]); } function sendDisconnectedMessage() { sendBCData([{_sc:SC_LOUNGE_DISCONNECTED, video_id:currentVideoId, current_time:currentVideoTime || 0, state:currentPlayerState}]); } function sendBCData(data) { if (browserChannel) { browserChannel.sendData(data); } } function sendPlaybackError(videoId, code) { sendBCData([{_sc:SC_ON_ERROR, errors:(((((("[{" + "\"videoId\":\"") + videoId) + "\",") + "\"reason\":\"") + code) + "\",") + "\"error\":\"NOT_PLAYABLE\"}]"}]); } function broadcastVideoPlayerAction(action, seekTime) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_REMOTE_PLAYER_CONTROL, {playerAction:action, seekToTime:seekTime})); } function saveAndUpdateDevicesList() { var _local2 = buildArrayFromObject(pairedList); if (!_local2.length) { pairedList = null; } else { updateTrackingFeatures(); } broadcast({type:PAIRED_LIST_UPDATE, devices:_local2}); } function sanitizePlaylistCSV(input) { var _local3 = input.split(","); var _local4 = []; var _local5 = 0; for ( ; _local5 < _local3.length ; _local5++) { if (_local3[_local5].length && (_local3[_local5] != "undefined")) { _local4.push(_local3[_local5]); } } return(_local4.join(",")); } function updateTrackingFeatures() { if (!playlistNode) { return(undefined); } var _local2 = []; for (var i in pairedList) { _local2.push(pairedList[i].app); } playlistNode.setFeatureType(feature, {ytr:_local2.join()}); playlistNode.setTrackingType((com.google.youtube.tv.platform.Box.getPairingCode() ? (com.google.youtube.tv.tree.TreeNode.TRACKING_TYPE_REMOTE_DIAL) : (com.google.youtube.tv.tree.TreeNode.TRACKING_TYPE_REMOTE_REGULAR))); } static function getVideoIdx(id, playlist) { var _local4 = 0; for ( ; _local4 < playlist.length ; _local4++) { if (playlist[_local4] == id) { return(_local4); } } return(-1); } static function buildArrayFromObject(obj) { var _local3 = []; for (var key in obj) { _local3.push(obj[key]); } return(_local3); } static var CLOSE_PAIRING_UI = "CLOSE_PAIRING_UI"; static var PAIR_CODE_RETRIEVED = "PAIR_CODE_RETRIEVED"; static var PAIRED_LIST_UPDATE = "PAIRED_LIST_UPDATE"; static var UNSTARTED = -1; static var ENDED = 0; static var PLAYING = 1; static var PAUSED = 2; static var BUFFERING = 3; static var VIDEO_CUED = 5; static var SHOW_DEBUG_MESSAGES = false; static var CMD_LOUNGE_STATUS = "loungeStatus"; static var CMD_GET_NOW_PLAYING = "getNowPlaying"; static var CMD_GET_PLAYLIST = "getPlaylist"; static var CMD_REMOTE_CONNECTED = "remoteConnected"; static var CMD_REMOTE_DISCONNECTED = "remoteDisconnected"; static var CMD_UPDATE_PLAYLIST = "updatePlaylist"; static var CMD_SET_PLAYLIST = "setPlaylist"; static var CMD_SET_VIDEO = "setVideo"; static var CMD_STOP_VIDEO = "stopVideo"; static var CMD_NEXT = "next"; static var CMD_PAUSE = "pause"; static var CMD_PLAY = "play"; static var CMD_PREV = "prev"; static var CMD_SEEK_TO = "seekTo"; static var SC_NOW_PLAYING = "nowPlaying"; static var SC_NOW_PLAYING_PLAYLIST = "nowPlayingPlaylist"; static var SC_ON_STATE_CHANGE = "onStateChange"; static var SC_CONFIRM_UPDATE = "confirmPlaylistUpdate"; static var SC_LOUNGE_DISCONNECTED = "loungeScreenDisconnected"; static var SC_GET_LOUNGE_STATUS = "getLoungeStatus"; static var SC_ON_ERROR = "onError"; static var PAIRING_BASE_URL = "https://www.youtube.com/api/lounge/pairing/"; static var BIND_BASE_URL = "https://www.youtube.com/api/lounge/bc/bind"; static var ACTION_LOUNGE_TOKEN = "get_lounge_token"; static var ACTION_PAIRING_CODE = "get_pairing_code"; static var ACTION_SCREEN_ID = "generate_screen_id"; static var ACTION_REGISTER_PAIRING_CODE = "register_pairing_code"; static var PAIR_CODE_LIFETIME = (3 * 60) * 1000; static var SEEK_DETECTION_TOLERANCE = 3; static var FEATURE_DEFAULT = "ytremote"; static var FEATURE_DIAL = "ytremote_d"; var apiplayerReady = false; var feature = FEATURE_DEFAULT; }
Symbol 20536 MovieClip [__Packages.com.google.youtube.tv.util.Xtract] Frame 0
class com.google.youtube.tv.util.Xtract { static var instance; function Xtract () { } static function getInstance() { if (instance == null) { instance = new com.google.youtube.tv.util.Xtract(); } return(instance); } static function getValue(xml, selector) { var _local4 = getInstance(); var _local5 = _local4.parseSelector(selector); var _local6 = _local4.selectNodesByParsed(xml, _local5); var _local7 = _local4.getNodeValue(_local6[0], _local5.pop()); return(_local7); } static function getValues(xml, selector) { var _local4 = getInstance(); var _local5 = _local4.parseSelector(selector); var _local6 = _local4.selectValuesByParsed(xml, _local5); return(_local6); } static function getComplexValues(xml, selector) { return(getInstance().getComplexValuesDirect(xml, selector)); } function getComplexValuesDirect(xml, selector) { var _local4 = [xml]; for ( ; selector.indexOf(ITERATE_MODIFIER) != -1 ; for ( ; _local7 < _local4.length ; _local7++) { _local5 = _local5.concat(selectNodesByParsed(XMLNode(_local4[_local7]), parseSelector(_local6)))} , _local4 = _local5) { var _local5 = []; var _local6 = selector.substring(0, selector.indexOf(ITERATE_MODIFIER) + ITERATE_MODIFIER.length); selector = selector.substring(_local6.length); var _local7 = 0; } selector = openBrackets(selector); var _local8 = selector.split(MULTIPLE_SELECTORS_SEPARATOR); var _local9 = []; var _local10 = 0; for ( ; _local10 < _local4.length ; _local10++) { xml = _local4[_local10]; var _local11 = {}; var _local12 = 0; for ( ; _local12 < _local8.length ; _local12++) { var _local13 = parseSelector(_local8[_local12]); var _local14 = selectNodesByParsed(xml, _local13)[0]; var _local15 = _local13.pop(); var _local16 = _local15.asName || (_local15.attrName || (_local14.nodeName)); _local11[_local16] = getNodeValue(_local14, _local15); } _local9.push(_local11); } cleanSelectorsCache(); return(_local9); } static function getNodes(node, selector) { var _local4 = getInstance(); return(_local4.selectNodesByParsed(node, _local4.parseSelector(selector))); } function getNodeValue(node, parsedSelector) { if (parsedSelector.attrName) { return(node.attributes[parsedSelector.attrName]); } if (node.nodeType == TEXT_NODE_TYPE) { return(com.google.youtube.tv.util.StringUtil.decodeXmlEntities(node.nodeValue)); } if (node.nodeType == ELEMENT_NODE_TYPE) { return((node.firstChild ? (com.google.youtube.tv.util.StringUtil.decodeXmlEntities(node.firstChild.nodeValue)) : "")); } } function selectNodesByParsed(xml, path) { var _local4 = path[0]; var _local5 = _local4.numFilter; var _local6 = []; if (_local4.attrName) { _local6 = _local6.concat(xml); } else { var _local7 = xml.firstChild; for ( ; _local7 ; _local7 = _local7.nextSibling) { if (_local7.nodeName == _local4.nodeName) { if (_local5) { _local5--; } else if ((_local4.attrFilterName == null) || (_local7.attributes[_local4.attrFilterName] == _local4.attrFilterValue)) { _local6 = ((path.length > 1) ? (_local6.concat(selectNodesByParsed(_local7, path.slice(1)))) : (_local6.concat(_local7))); if (!_local4.iterate) { break; } } } } } return(_local6); } function selectValuesByParsed(xml, path) { var _local4 = selectNodesByParsed(xml, path); var _local5 = path.pop(); var _local6 = []; while (_local4.length) { _local6.push(getNodeValue(XMLNode(_local4.shift()), _local5)); } return(_local6); } function parseSelector(selector) { if (selectorsCache[selector]) { selectorsCacheAge[selector] = getTimer(); return(selectorsCache[selector].slice()); } var _local3 = splitBySlashes(selector); var _local4 = []; var _local5 = 0; for ( ; _local5 < _local3.length ; _local5++) { var _local6 = _local3[_local5]; for ( ; !_local6.length ; _local5++) { } var _local7 = 0; var _local8 = null; var _local9 = null; var _local10 = null; var _local11 = null; var _local12 = false; var _local13 = null; if (_local6.indexOf(FILTER_START) > 0) { var _local15 = _local6.substring(_local6.indexOf(FILTER_START) + FILTER_START.length, _local6.lastIndexOf(FILTER_END)); _local6 = _local6.substring(0, _local6.indexOf(FILTER_START)) + _local6.substring(_local6.lastIndexOf(FILTER_END) + FILTER_END.length); if (((FILTER_START + _local15) + FILTER_END) == ITERATE_MODIFIER) { _local12 = true; } else { _local7 = Number(_local15) - 1; if (_global.isNaN(_local7)) { _local7 = 0; var _local14 = _local15.split(FILTER_NAME_VALUE_SEPARATOR); _local9 = _global.unescape(_local14[1].substring(_local14[1].indexOf(FILTER_VALUE_DELIMITER) + FILTER_VALUE_DELIMITER.length, _local14[1].lastIndexOf(FILTER_VALUE_DELIMITER))); _local8 = _local14[0].substring(FILTER_PREFIX.length); } } } if (_local6.indexOf(ALIAS) != -1) { _local13 = _local6.substring(_local6.lastIndexOf(ALIAS) + ALIAS.length); _local6 = _local6.substring(0, _local6.lastIndexOf(ALIAS)); } if (_local6.charAt(0) == FILTER_PREFIX) { _local11 = _local6.substring(FILTER_PREFIX.length); } else { _local10 = _local6; } _local4.push({nodeName:_local10, attrName:_local11, numFilter:_local7, attrFilterValue:_local9, attrFilterName:_local8, iterate:_local12, asName:_local13}); } selectorsCache[selector] = _local4.slice(); selectorsCacheAge[selector] = getTimer(); return(_local4); } function splitBySlashes(selector) { if (selector.charAt(selector.length - 1) != SELECTOR_SEPARATOR) { selector = selector + SELECTOR_SEPARATOR; } var _local3 = []; var _local4 = false; var _local5 = _global.NaN; var _local6 = 0; for ( ; _local6 < selector.length ; _local6++) { var _local7 = selector.charAt(_local6); switch (selector.charAt(_local6)) { case FILTER_VALUE_DELIMITER : _local4 = !_local4; break; case SELECTOR_SEPARATOR : if (_local4) { break; } if (!_global.isNaN(_local5)) { _local3.push(selector.substring(_local5 + SELECTOR_SEPARATOR.length, _local6)); } _local5 = _local6; } } return(_local3); } function openBrackets(selector) { var _local3 = selector; var _local4 = []; for ( ; _local3.indexOf(MULTIPLE_SELECTORS_START) != -1 ; for ( ; _local11 < _local8.length ; _local11++) { _local8[_local11] = (_local10 + SELECTOR_SEPARATOR) + _local8[_local11]} , _local3 = (_local3.substring(0, _local9) + _local8.join(MULTIPLE_SELECTORS_SEPARATOR)) + _local3.substring(_local5 + MULTIPLE_SELECTORS_END.length)) { var _local5 = _local3.indexOf(MULTIPLE_SELECTORS_END); var _local6 = _local3.lastIndexOf(MULTIPLE_SELECTORS_START, _local5); var _local7 = _local3.substring(_local6 + MULTIPLE_SELECTORS_START.length, _local5); var _local8 = _local7.split(MULTIPLE_SELECTORS_SEPARATOR); var _local9 = Math.max(_local3.lastIndexOf(MULTIPLE_SELECTORS_START, _local6 - MULTIPLE_SELECTORS_START.length) + MULTIPLE_SELECTORS_START.length, _local3.lastIndexOf(MULTIPLE_SELECTORS_SEPARATOR, _local6) + MULTIPLE_SELECTORS_SEPARATOR.length, 0); var _local10 = _local3.substring(_local9, _local6); var _local11 = 0; } return(_local3); } function cleanSelectorsCache() { var _local2 = getTimer(); for (var selector in selectorsCacheAge) { if ((getTimer() - selectorsCacheAge[selector]) > MAX_SELECTOR_AGE) { delete selectorsCacheAge[selector]; delete selectorsCache[selector]; } } } var SELECTOR_SEPARATOR = "/"; var MULTIPLE_SELECTORS_START = "("; var MULTIPLE_SELECTORS_SEPARATOR = ","; var MULTIPLE_SELECTORS_END = ")"; var FILTER_PREFIX = "@"; var FILTER_START = "["; var FILTER_END = "]"; var FILTER_VALUE_DELIMITER = "\""; var FILTER_NAME_VALUE_SEPARATOR = "="; var ITERATE_MODIFIER = "[*]"; var ALIAS = " as "; var TEXT_NODE_TYPE = 3; var ELEMENT_NODE_TYPE = 1; var MAX_SELECTOR_AGE = 1000 * 60; var selectorsCache = {}; var selectorsCacheAge = {}; }
Symbol 20537 MovieClip [__Packages.com.google.youtube.tv.ui.Font] Frame 0
class com.google.youtube.tv.ui.Font { static var canonicalFontInfo, currentFontInfo, fontInfoDiff; function Font () { } static function getCanonicalFontInfo() { init(); return(canonicalFontInfo); } static function getCurrentFontInfo() { init(); return(currentFontInfo); } static function getFontInfoDiff() { init(); return(fontInfoDiff); } static function getFontSizeForHeight(height, fontInfo) { init(); if (!fontInfo) { fontInfo = currentFontInfo; } if (fontInfo.fontSizeForHeights[height]) { return(fontInfo.fontSizeForHeights[height]); } var _local4 = MAX_FONT_SIZE; var _local5 = fontInfo.heights; var _local6 = 0; for ( ; _local6 <= _local4 ; _local6++) { if (_local5[_local6] >= height) { fontInfo.fontSizeForHeights[height] = _local6; return(_local6); } } return(height); } static function getComponentHeight(lineHeight) { init(); var _local3 = getFontSizeForHeight(lineHeight); var _local4 = currentFontInfo.topPaddings[_local3]; return((lineHeight + (2 * _local4)) + 2); } static function adaptFontSize(fontSize) { init(); var _local3 = canonicalFontInfo.heights[int(fontSize)] * com.google.youtube.tv.app.Config.SCALE; _local3 = Math.round(_local3); var _local4 = getFontSizeForHeight(_local3); return(_local4); } static function init() { if (currentFontInfo) { return(undefined); } currentFontInfo = createFontInfo(); canonicalFontInfo = createCanonicalFontInfo(); fontInfoDiff = com.google.youtube.tv.ui.FontInfo.diff(canonicalFontInfo, currentFontInfo); } static function createCanonicalFontInfo() { var _local2 = new com.google.youtube.tv.ui.FontInfo(); _local2.fill(5, 2, -3, 3, 4); _local2.fill(15, 3, -2, 6, 11); _local2.fill(30, 4, -1, 8, 22); _local2.fill(45, 6, 1, 13, 33); _local2.fill(60, 7, 2, 16, 44); _local2.fill(90, 10, 5, 23, 66); _local2.fill(127, 13, 8, 32, 92); return(_local2); } static function createFontInfo() { var _local2 = new com.google.youtube.tv.ui.FontInfo(); var _local3 = System.capabilities.os; if (com.google.youtube.tv.platform.Box.isFontEmbedded()) { if (com.google.youtube.tv.platform.Box.getInternationalFontName() == "Droid Sans Japanese") { _local2.fill(5, 2, -3, 4, 4); _local2.fill(10, 3, -1, 6, 8); _local2.fill(15, 4, -1, 9, 12); _local2.fill(20, 4, -1, 11, 16); _local2.fill(25, 5, 0, 14, 20); _local2.fill(30, 5, 1, 16, 23); _local2.fill(45, 7, 2, 24, 34); _local2.fill(60, 8, 4, 32, 44); _local2.fill(90, 11, 6, 47, 65); _local2.fill(127, 15, 9, 66, 92); } else { _local2.fill(5, 2, -3, 4, 3); _local2.fill(15, 3, -2, 7, 11); _local2.fill(30, 5, 0, 12, 21); _local2.fill(45, 7, 1, 17, 32); _local2.fill(60, 8, 3, 22, 43); _local2.fill(90, 11, 6, 31, 65); _local2.fill(127, 15, 9, 44, 90); } } else if (_local3.indexOf("Mac") >= 0) { _local2 = createCanonicalFontInfo(); } else if (_local3.indexOf("Linux") >= 0) { _local2.fill(5, 3, -2, 3, 4); _local2.fill(15, 3, -1, 5, 11); _local2.fill(30, 5, 1, 8, 22); _local2.fill(45, 6, 3, 11, 33); _local2.fill(60, 8, 4, 14, 44); _local2.fill(90, 10, 8, 20, 66); _local2.fill(127, 14, 11, 27, 92); } else if (com.google.youtube.tv.platform.Box.getVendor() == com.google.youtube.tv.platform.Box.VENDOR_LG) { _local2.fill(5, 2, -2, 2, 4); _local2.fill(15, 3, -2, 5, 11); _local2.fill(30, 4, -1, 10, 22); _local2.fill(45, 5, 1, 14, 33); _local2.fill(60, 6, 2, 17, 44); _local2.fill(90, 9, 4, 26, 66); _local2.fill(127, 12, 7, 35, 92); } else if (com.google.youtube.tv.platform.Box.getVendor() == com.google.youtube.tv.platform.Box.VENDOR_SAMSUNG) { _local2.fill(5, 2, -2, 2, 4); _local2.fill(15, 3, -1, 3, 11); _local2.fill(30, 3, -2, 5, 22); _local2.fill(45, 4, -4, 6, 33); _local2.fill(60, 4, -5, 7, 44); _local2.fill(90, 7, -6, 9, 66); _local2.fill(127, 9, -8, 12, 92); } else if (com.google.youtube.tv.platform.Box.getVendor() == com.google.youtube.tv.platform.Box.VENDOR_PHILIPS) { _local2.fill(5, 2, -3, 4, 5); _local2.fill(10, 3, -1, 7, 6); _local2.fill(15, 3, -1, 8, 10); _local2.fill(20, 4, 0, 8, 14); _local2.fill(25, 4, 0, 10, 17); _local2.fill(30, 4, 0, 11, 21); _local2.fill(45, 5, 1, 15, 31); _local2.fill(60, 7, 3, 19, 41); _local2.fill(90, 9, 5, 27, 61); _local2.fill(127, 12, 8, 38, 87); } else { _local2 = createCanonicalFontInfo(); } return(_local2); } static var DEFAULT_FONT_NAME = "_sans"; static var MAX_FONT_SIZE = 127; static var sizes = {}; }
Symbol 20538 MovieClip [__Packages.com.google.youtube.tv.osk.layout.LayoutController] Frame 0
class com.google.youtube.tv.osk.layout.LayoutController extends com.google.chianti.event.EventBroadcaster { static var instance; var layouts, keysCache; function LayoutController () { super(); com.google.chianti.event.EventBroadcaster.initialize(this); layouts = []; keysCache = {}; if (com.google.youtube.tv.platform.Box.getLang() != com.google.youtube.tv.platform.Box.DEFAULT_LANG) { var _local3 = createLayout(com.google.youtube.tv.platform.Box.getLang()); if (_local3) { layouts.push(_local3); } } layouts.push(createLayout(com.google.youtube.tv.platform.Box.DEFAULT_LANG)); } static function getInstance() { if (!instance) { instance = new com.google.youtube.tv.osk.layout.LayoutController(); } return(instance); } static function isInSpecLayout(char) { return(SPECIAL_CHARACTERS.join().indexOf(char) != -1); } static function createLayout(lang) { lang = lang.toLowerCase(); switch (lang) { case "en" : return(new com.google.youtube.tv.osk.layout.EnglishLayout()); case "ja" : return(new com.google.youtube.tv.osk.layout.HiraganaLayout()); case "ko" : return(new com.google.youtube.tv.osk.layout.HangulLayout()); case "ru" : case "uk" : return(new com.google.youtube.tv.osk.layout.RussianLayout()); case "zh" : return(new com.google.youtube.tv.osk.layout.ChineseLayout()); } return(null); } function switchToByLang(lang) { var _local3 = 0; for ( ; _local3 < layouts.length ; _local3++) { if (com.google.youtube.tv.osk.layout.ILayout(layouts[_local3]).getLangCode() == lang) { currentLayoutIndex = _local3; return(undefined); } } } function getCurerntLangCode() { return(getCurrentLayout().getLangCode()); } function decorateCurrentLayoutForKeyboard() { var _local2 = getCurrentLayoutId(); if (!keysCache[_local2]) { var _local3 = getCurrentLayoutKeys(); var _local4 = []; var _local5 = 0; for ( ; _local5 < _local3.length ; _local5++) { _local4.push(new com.google.youtube.tv.osk.OskInfo(_local3[_local5])); } keysCache[_local2] = _local4; } return(keysCache[_local2]); } function decorateLayoutsForToggle() { var _local2 = []; var _local3 = 0; for ( ; _local3 < layouts.length ; _local3++) { var _local4 = layouts[_local3].getLangCode(); var _local5 = {label:_local4.toUpperCase(), id:_local4}; if (com.google.youtube.tv.platform.Box.getLang() == "ja") { if (_local4 == "ja") { _local5.label = "\u65E5\u672C\u8A9E"; } else if (_local4 == "en") { _local5.label = "\u82F1\u8A9E"; } } _local2.push(_local5); } return(_local2); } function getCurrentLayout() { return(layouts[currentLayoutIndex]); } function getCurrentLayoutId() { return(getCurerntLangCode()); } function getCurrentLayoutKeys() { return(convertUnicodeToString(getCurrentLayout().getKeys().concat(SPECIAL_CHARACTERS))); } function convertUnicodeToString(arr) { var _local3 = 0; for ( ; _local3 < arr.length ; _local3++) { if (typeof(arr[_local3]) == "number") { arr[_local3] = String.fromCharCode(arr[_local3]); } else { if (arr[_local3].sub && (typeof(arr[_local3].sub) == "number")) { arr[_local3].sub = String.fromCharCode(arr[_local3].sub); } if (arr[_local3].modifiers) { convertUnicodeToString(arr[_local3].modifiers); } if (arr[_local3].values) { convertUnicodeToString(arr[_local3].values); } } } return(arr); } static var SPECIAL_CHARACTERS = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", ",", "_", "-", "'", "\"", "/", "&", "@"]; var currentLayoutIndex = 0; var modificationActive = false; }
Symbol 20539 MovieClip [__Packages.com.google.youtube.tv.view.ui.list.ListItem] Frame 0
class com.google.youtube.tv.view.ui.list.ListItem extends com.google.youtube.tv.ui.View { var itemRendererIndex, width, height, data, clip; function ListItem (parent) { super(parent, "itemRenderer"); } function build(width, height, itemRendererIndex) { this.itemRendererIndex = itemRendererIndex; this.width = width; this.height = height; createChildren(); drawState(); } function setItemIndex(value) { itemIndex = value; } function setData(value) { if (data == value) { return(undefined); } super.setData(value); updateChildren(); } function setSelected(value) { if (selected == value) { return(undefined); } selected = value; drawState(); } function getEnabled() { return(enabled); } function setEnabled(value) { if (enabled == value) { return(undefined); } enabled = value; drawState(); } function getStateTextColor() { return((selected ? (com.google.youtube.tv.ui.Colors.BLACK) : (com.google.youtube.tv.ui.Colors.WHITE))); } function createChildren() { } function updateChildren() { } function drawState() { clip._alpha = (enabled ? 100 : 30); } var itemIndex = -1; var selected = false; var enabled = true; }
Symbol 20540 MovieClip [__Packages.com.google.youtube.tv.view.ui.list.PlaylistListItem] Frame 0
class com.google.youtube.tv.view.ui.list.PlaylistListItem extends com.google.youtube.tv.view.ui.list.ListItem { var image, clip, title, subtitle, data, width, height, selected, getStateTextColor; function PlaylistListItem (parent) { super(parent); } function createChildren() { super.createChildren(); image = new com.google.youtube.tv.ui.Image(clip, IMAGE_RECT); title = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(TITLE_X, TITLE_Y, TITLE_WIDTH, com.google.youtube.tv.ui.Font.getComponentHeight(TITLE_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(TITLE_LINE_HEIGHT)); title.setAutoTruncate(true); subtitle = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(SUBTITLE_X, SUBTITLE_Y, SUBTITLE_WIDTH, com.google.youtube.tv.ui.Font.getComponentHeight(SUBTITLE_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(SUBTITLE_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.BADGE_BG); subtitle.setAutoTruncate(true); } function updateChildren() { super.updateChildren(); var _local3 = com.google.youtube.tv.tree.PlaylistFeedNode(data); if (_local3) { image.setImage(_local3.getThumbnailUrl()); title.setText(_local3.getTitle()); subtitle.setText(((_local3.getVideosCount() && (_local3.getVideosCount() != "0")) ? (com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.NUMBER_OF_VIDEOS, {VIDEO_COUNT_1:_local3.getVideosCount()})) : "")); } } function drawState() { super.drawState(); clip.clear(); com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, width, height, 1, com.google.youtube.tv.ui.Colors.WHITE, 30, (selected ? (com.google.youtube.tv.ui.Colors.WHITE) : (com.google.youtube.tv.ui.Colors.BLACK)), 100); title.setTextColor(getStateTextColor()); } static var IMAGE_RECT = new flash.geom.Rectangle(0, 0, 150 * com.google.youtube.tv.app.Config.SCALE, 85 * com.google.youtube.tv.app.Config.SCALE); static var TITLE_X = 158 * com.google.youtube.tv.app.Config.SCALE; static var TITLE_Y = 18 * com.google.youtube.tv.app.Config.SCALE; static var TITLE_WIDTH = 600 * com.google.youtube.tv.app.Config.SCALE; static var TITLE_LINE_HEIGHT = 18 * com.google.youtube.tv.app.Config.SCALE; static var SUBTITLE_X = 158 * com.google.youtube.tv.app.Config.SCALE; static var SUBTITLE_Y = 48 * com.google.youtube.tv.app.Config.SCALE; static var SUBTITLE_WIDTH = 600 * com.google.youtube.tv.app.Config.SCALE; static var SUBTITLE_LINE_HEIGHT = 14 * com.google.youtube.tv.app.Config.SCALE; }
Symbol 20541 MovieClip [__Packages.com.google.youtube.tv.view.DebugView] Frame 0
class com.google.youtube.tv.view.DebugView extends com.google.youtube.tv.ui.View { static var instance, traceTf; var clip, setVisible; function DebugView (parent) { super(parent, "debugView"); build(); } static function get(parent) { if (!instance) { var _local3 = new com.google.youtube.tv.view.DebugView(parent); } return(instance); } function build() { drawBg(); drawTraceBg(); var _local2 = new TextFormat(); _local2.size = 12; _local2.color = 55585; _local2.font = "_sans"; traceTf = clip.createTextField("traceTf", 1, 17, 6, width - 17, height - 10); traceTf.selectable = false; traceTf.setNewTextFormat(_local2); traceTf.multiline = true; traceTf.wordWrap = true; traceTf.text = cachedLines.join(newline); instance = this; setVisible(false); } static function isEnabled() { return(com.google.youtube.tv.platform.Box.isDebugViewVisible()); } static function addTraceLine(value) { if (!instance) { cachedLines.push(value); return(undefined); } var _local3 = ((traceTf.text.length > 0) ? (traceTf.text.split(String.fromCharCode(13))) : ([])); if (_local3.length >= 24) { _local3.splice(0, _local3.length - 24); } _local3.push(value); traceTf.text = _local3.join(newline); instance.bringToFront(); } static function log(str) { if (isEnabled() && (instance)) { instance.bringToFront(); addTraceLine((("[" + new Date().getTime()) + "] ") + str); } } function drawBg() { with (clip) { lineStyle(1, 0, 100); beginFill(backgroundColor, 70); } drawRectangle(clip, 15, 0, width, height); } function drawTraceBg() { with (clip) { lineStyle(1, 0, 100); beginFill(0, 70); } drawRectangle(clip, 18, 4, width - 8, height - 8); } function drawRectangle(canvas, x, y, width, height) { with (canvas) { moveTo(x, y); lineTo(x + width, y); lineTo(x + width, y + height); lineTo(x, y + height); lineTo(x, y); endFill(); } } static var cachedLines = []; var backgroundColor = 14606046; var height = 650; var width = 1250; }
Symbol 20542 MovieClip [__Packages.com.google.youtube.tv.ui.Tile] Frame 0
class com.google.youtube.tv.ui.Tile extends com.google.youtube.tv.ui.View { var clip; function Tile (parent, symbolName, repeat, r, matrix, horizontalAnchorY) { super(parent, "tile") if (!r) { r = new flash.geom.Rectangle(0, 0, Stage.width, Stage.height); } var _local9 = flash.display.BitmapData.loadBitmap(symbolName); if (!matrix) { matrix = new flash.geom.Matrix(); var _local10 = 0; var _local11 = 0; if (_local9.width > Stage.width) { _local10 = (Stage.width / 2) - (_local9.width / 2); } if (_local9.height > Stage.height) { if (_global.isNaN(horizontalAnchorY)) { _local11 = (Stage.height / 2) - (_local9.height / 2); } else { _local11 = horizontalAnchorY * (com.google.youtube.tv.app.Config.SCALE - 1); } } matrix.translate(Math.round(_local10), Math.round(_local11)); } var _local12 = false; clip.beginBitmapFill(_local9, matrix, repeat); clip.moveTo(r.x, r.y); clip.lineTo(r.x, r.bottom); clip.lineTo(r.right, r.bottom); clip.lineTo(r.right, r.y); clip.lineTo(r.x, r.y); clip.endFill(); clip._xscale = 100; clip._yscale = 100; } }
Symbol 20543 MovieClip [__Packages.com.google.utils.UrlConstructor] Frame 0
class com.google.utils.UrlConstructor { var baseUrl_, hasParameter_; function UrlConstructor (baseUrl) { baseUrl_ = baseUrl; hasParameter_ = true; if (baseUrl_.indexOf("?") < 0) { hasParameter_ = false; baseUrl_ = baseUrl_ + "?"; } } function addGlobalParameters(args) { baseUrl_ = makeUrl(args); hasParameter_ = true; } function get url() { return(baseUrl_); } function makeUrl(args) { var _local3 = baseUrl_; var _local4 = hasParameter_; for (var key in args) { if (_local4) { _local3 = _local3 + "&"; } _local3 = _local3 + ((key + "=") + args[key]); _local4 = true; } return(_local3); } }
Symbol 20544 MovieClip [__Packages.com.google.youtube.event.MessagesEvent] Frame 0
class com.google.youtube.event.MessagesEvent { function MessagesEvent () { } static var UPDATE = "onUpdate"; }
Symbol 20545 MovieClip [__Packages.com.google.youtube.tv.view.SearchComponentView] Frame 0
class com.google.youtube.tv.view.SearchComponentView extends com.google.youtube.tv.view.ui.UIComponentBase { var keyboard, searchText, resultsList, suggestionsList, hdToggle, infoText, pairingUpsell, searchTip, caretControl, suggestions, transliterationHelp, clip, lastActiveComponent, keyboardClip, searchTextClip, buttonDown, buttonUp, suggestionsUp, suggestionsDown, drawRectangle, caret; function SearchComponentView (container) { super(container, Stage.width, Stage.height); build(); } function getKeyboard() { return(keyboard); } function getSearchField() { return(searchText); } function getResultList() { return(resultsList); } function getSuggestionsList() { return(suggestionsList); } function getHDToggle() { return(hdToggle); } function getInfoText() { return(infoText); } function getPairingUpsell() { return(pairingUpsell); } function setText(text, opt_force) { if ((!opt_force) && (text == getText())) { return(undefined); } searchTip.setVisible(!text); if (!text) { resultsList.clear(); clearSuggestionsList(); } if (searchText.html) { searchText.htmlText = ((("<font face = '" + com.google.youtube.tv.platform.Box.getInternationalFontName()) + "'>") + text) + "</font>"; } else { searchText.text = text; } updateCaret(); } function getText() { return(searchText.text); } function updateCaret() { caretControl.updatePosition(); } function updateSuggestionsList(data) { suggestions._visible = true; suggestionsList.show(); suggestionsList.setData(data); } function clearSuggestionsList() { suggestions._visible = false; suggestionsList.hide(); suggestionsList.clear(); } function setHelpVisible(value, noMultiLine) { if (transliterationHelp) { transliterationHelp._visible = value; return(undefined); } if (!value) { return(undefined); } transliterationHelp = clip.createEmptyMovieClip("transliterationHelp", clip.getNextHighestDepth()); transliterationHelp._x = HELP_X; var _local4 = com.google.youtube.tv.services.MessagesService.get().getMsg(com.google.youtube.tv.services.MessagesService.TRANSLITERATION_INSTRUCTIONS, {START_H:"", END_H:"|", START_P:"", END_P:"", START_BR:"|"}).split("|"); var _local5 = new com.google.youtube.tv.ui.Text(transliterationHelp, new flash.geom.Rectangle(HELP_PADDING, HELP_PADDING, HELP_WIDTH - (HELP_PADDING * 2), com.google.youtube.tv.ui.Font.getComponentHeight(HELP_TITLE_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(HELP_TITLE_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); _local5.setText(String(_local4.shift())); if (noMultiLine) { _local4.splice(1, 1); } var _local6 = new com.google.youtube.tv.ui.Text(transliterationHelp, new flash.geom.Rectangle(HELP_PADDING, (_local5.getPos().y + _local5.getHeight()) + (HELP_PADDING / 2), HELP_WIDTH - (HELP_PADDING * 2), HELP_INSTRUCTIONS_HEIGHT), com.google.youtube.tv.ui.Font.getFontSizeForHeight(HELP_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); _local6.setLeading(10); _local6.setText(_local4.join(newline)); _local6.setAutoSize(true); com.google.youtube.tv.util.DrawUtil.drawRectangle(transliterationHelp, 0, 0, HELP_WIDTH, transliterationHelp._height + (2 * HELP_PADDING), 0, 0, 0, com.google.youtube.tv.ui.Colors.BLACK, HELP_BACKGROUND_ALPHA); transliterationHelp._y = (Stage.height / 2) - (transliterationHelp._height / 2); } function setPairingUpsellVisible(value) { if (pairingUpsell) { pairingUpsell.setVisible(value); return(undefined); } if (!value) { return(undefined); } pairingUpsell = new com.google.youtube.tv.view.ui.PairingUpsell(clip, PAIRING_UPSELL_WIDTH); pairingUpsell.setPos(PAIRING_UPSELL_X, (Stage.height / 2) - (pairingUpsell.getHeight() / 2)); } function getPairingUpsellVisible() { return((pairingUpsell) && (pairingUpsell.isVisible())); } function activateComponent(target) { if (target) { lastActiveComponent = target; } resultsList.setIsActive(target == resultsList); suggestionsList.setIsActive(target == suggestionsList); keyboard.setIsActive(target == keyboard); hdToggle.setIsActive(target == hdToggle); if (pairingUpsell) { pairingUpsell.setIsActive(target == pairingUpsell); } } function show() { super.show(); activateComponent(lastActiveComponent || (keyboard)); Selection.setFocus(searchText); Selection.setSelection(searchText.length, searchText.length); } function hide() { super.hide(); activateComponent(null); } function setIsActive(value) { } function build() { com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, LEFT_PANEL_WIDTH, Stage.height, 0, 0, 0, com.google.youtube.tv.ui.Colors.BLACK, 50); clip.lineStyle(1, com.google.youtube.tv.ui.Colors.WHITE, 30); clip.moveTo(LEFT_PANEL_WIDTH, -1); clip.lineTo(LEFT_PANEL_WIDTH, Stage.height + 1); keyboardClip = clip.createEmptyMovieClip("keyboardClip", clip.getNextHighestDepth()); keyboardClip._x = MARGIN_H; keyboardClip._y = KEYBOARD_TOP; keyboard = new com.google.youtube.tv.osk.OnScreenKeyboard(keyboardClip); keyboard.setIsActive(false); buildSearchQuerryField(); infoText = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(INFO_TEXT_X, INFO_TEXT_Y, INFO_TEXT_WIDTH, com.google.youtube.tv.ui.Font.getComponentHeight(INFO_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(INFO_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); infoText.setAutoTruncate(true); buildHDToggle(); searchTextClip.swapDepths(keyboardClip); com.google.youtube.tv.ui.View.disableFocusRect(keyboardClip); com.google.youtube.tv.ui.View.disableFocusRect(searchTextClip); } function buildResultsList() { if (resultsList) { return(false); } resultsList = new com.google.youtube.tv.view.ui.list.List(clip, RESULTS_WIDTH, RESULTS_HEIGHT, 4, com.google.youtube.tv.view.ui.list.VideoListItem, RESULT_ITEM_HEIGHT, RESULTS_GAP); resultsList.setPos(RESULTS_X, RESULTS_Y); resultsList.enableMouseWheel(com.google.youtube.tv.view.ui.UIComponentBase.MOUSE_WHEEL_MODE_ALWAYS); buildResultsListScrollButtons(); resultsList.bindScrollButtons(buttonDown, buttonUp); resultsList.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.USER_ACTIVITY, com.google.chianti.event.EventDelegate.create(this, onResultsListActivity)); return(true); } function buildTransliterationView() { if (suggestionsList) { return(false); } suggestions = clip.createEmptyMovieClip("suggestions", clip.getNextHighestDepth()); com.google.youtube.tv.util.DrawUtil.drawRectangle(suggestions, SUGGESTIONS_X, SUGGESTIONS_Y, SUGGESTIONS_WIDTH, SUGGESTIONS_HEIGHT, SUGGESTIONS_BORDER_THICKNESS, com.google.youtube.tv.ui.Colors.WHITE, SUGGESTIONS_BORDER_ALPHA, 0, 0); suggestionsList = new com.google.youtube.tv.view.ui.list.List(suggestions, SUGGESTIONS_LIST_WIDTH, SUGGESTIONS_LIST_HEIGHT, 4, com.google.youtube.tv.view.ui.list.SuggestionListItem, BLOCK_SIZE, PADDING); suggestionsList.setPos(SUGGESTIONS_LIST_X, SUGGESTIONS_LIST_Y); suggestionsList.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.USER_ACTIVITY, com.google.chianti.event.EventDelegate.create(this, onSuggestionListActivity)); suggestionsUp = new com.google.youtube.tv.view.ui.PageNavigationButton(suggestions, com.google.youtube.tv.view.ui.PageNavigationButton.UP); suggestionsUp.setPos(SUGGESTIONS_SCROLL_X, SUGGESTIONS_LIST_Y); suggestionsDown = new com.google.youtube.tv.view.ui.PageNavigationButton(suggestions, com.google.youtube.tv.view.ui.PageNavigationButton.DOWN); suggestionsDown.setPos(SUGGESTIONS_SCROLL_X, (SUGGESTIONS_LIST_Y + SUGGESTIONS_LIST_HEIGHT) - BLOCK_SIZE); suggestionsList.bindScrollButtons(suggestionsDown, suggestionsUp); return(true); } function buildSearchQuerryField() { searchTextClip = clip.createEmptyMovieClip("searchTextClip", clip.getNextHighestDepth()); drawRectangle(searchTextClip, SEARCH_RECT_X, SEARCH_RECT_Y, SEARCH_RECT_WIDTH, SEARCH_RECT_HEIGHT, 0, 0, 0, com.google.youtube.tv.ui.Colors.WHITE, 100); searchTip = new com.google.youtube.tv.ui.Text(searchTextClip, new flash.geom.Rectangle(SEARCH_FIELD_X, SEARCH_FIELD_Y, SEARCH_FIELD_WIDTH, SEARCH_FIELD_HEIGHT), INPUT_FONT_SIZE, com.google.youtube.tv.ui.Colors.MENU_GRAY); searchTip.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.SEARCH_INPUT_TIP)); searchText = searchTextClip.createTextField("searchText", searchTextClip.getNextHighestDepth(), SEARCH_FIELD_X, SEARCH_FIELD_Y, SEARCH_FIELD_WIDTH, SEARCH_FIELD_HEIGHT); searchText._focusrect = false; searchText.focusEnabled = false; searchText.tabEnabled = false; var _local2 = new TextFormat(com.google.youtube.tv.ui.Font.DEFAULT_FONT_NAME); _local2.color = com.google.youtube.tv.ui.Colors.BLACK; _local2.size = com.google.youtube.tv.ui.Font.adaptFontSize(INPUT_FONT_SIZE); _local2.align = "left"; _local2.letterSpacing = 1; com.google.youtube.tv.platform.Box.setFont(searchText, _local2); searchText.tabEnabled = false; searchText.tabIndex = null; searchText.selectable = false; searchText.html = true; caret = searchTextClip.createEmptyMovieClip("caret", searchTextClip.getNextHighestDepth()); caret._x = searchText._x; caret._y = searchText._y - 1; caret._visible = false; drawRectangle(caret, 0, 0, 1, searchText._height + 2, 0, 0, 0, 15461090, 100, 0); caretControl = new com.google.youtube.tv.view.caret.FixedSizeTextCaret(searchText, caret); } function buildResultsListScrollButtons() { buttonDown = new com.google.youtube.tv.view.ui.PageNavigationButton(clip, com.google.youtube.tv.view.ui.PageNavigationButton.DOWN); buttonDown.setPos((Stage.width - buttonDown.getWidth()) - MARGIN_H, (RESULTS_Y + RESULTS_HEIGHT) - buttonDown.getHeight()); buttonUp = new com.google.youtube.tv.view.ui.PageNavigationButton(clip, com.google.youtube.tv.view.ui.PageNavigationButton.UP); buttonUp.setPos((Stage.width - buttonUp.getWidth()) - MARGIN_H, RESULTS_Y); } function buildHDToggle() { HD_TOGGLE_ALL.label = com.google.youtube.tv.services.MessagesService.get().getMsg(com.google.youtube.tv.services.MessagesService.SEARCH_QUALITY_SELECTOR_ALL); hdToggle = new com.google.youtube.tv.view.ui.Toggle(clip, [HD_TOGGLE_ALL, HD_TOGGLE_HD], TOGGLE_BUTTON_WIDTH); hdToggle.setPos(RESULTS_X, MARGIN_V); hdToggle.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.USER_ACTIVITY, com.google.chianti.event.EventDelegate.create(this, onHDToggleActivity)); } function onResultsListActivity(event) { if (!resultsList.getIsActive()) { activateComponent(resultsList); } } function onSuggestionListActivity(event) { if (!suggestionsList.getIsActive()) { activateComponent(suggestionsList); } } function onHDToggleActivity(event) { if (!hdToggle.getIsActive()) { activateComponent(hdToggle); } } static var HD_TOGGLE_ALL = {label:"ALL", id:"all"}; static var HD_TOGGLE_HD = {label:"HD", id:"HD"}; static var SCROLL_DOWN = "SCROLL_DOWN"; static var SCROLL_UP = "SCROLL_UP"; static var MARGIN_V = 44 * com.google.youtube.tv.app.Config.SCALE; static var MARGIN_H = 65 * com.google.youtube.tv.app.Config.SCALE; static var PADDING = 4 * com.google.youtube.tv.app.Config.SCALE; static var BLOCK_SIZE = 44 * com.google.youtube.tv.app.Config.SCALE; static var LEFT_PANEL_WIDTH = 465 * com.google.youtube.tv.app.Config.SCALE; static var SEARCH_RECT_X = MARGIN_H; static var SEARCH_RECT_Y = MARGIN_V; static var SEARCH_RECT_WIDTH = 380 * com.google.youtube.tv.app.Config.SCALE; static var SEARCH_RECT_HEIGHT = BLOCK_SIZE; static var SEARCH_FIELD_X = SEARCH_RECT_X + (8 * com.google.youtube.tv.app.Config.SCALE); static var SEARCH_FIELD_Y = SEARCH_RECT_Y + (7 * com.google.youtube.tv.app.Config.SCALE); static var SEARCH_FIELD_WIDTH = 370 * com.google.youtube.tv.app.Config.SCALE; static var SEARCH_FIELD_HEIGHT = 40 * com.google.youtube.tv.app.Config.SCALE; static var INPUT_FONT_SIZE = 22; static var KEYBOARD_TOP = (SEARCH_RECT_Y + SEARCH_RECT_HEIGHT) + PADDING; static var SUGGESTIONS_X = MARGIN_H; static var SUGGESTIONS_Y = 476 * com.google.youtube.tv.app.Config.SCALE; static var SUGGESTIONS_WIDTH = 380 * com.google.youtube.tv.app.Config.SCALE; static var SUGGESTIONS_HEIGHT = 198 * com.google.youtube.tv.app.Config.SCALE; static var SUGGESTIONS_BORDER_THICKNESS = 1; static var SUGGESTIONS_BORDER_ALPHA = 50; static var SUGGESTIONS_LIST_X = (SUGGESTIONS_X + SUGGESTIONS_BORDER_THICKNESS) + PADDING; static var SUGGESTIONS_LIST_Y = (SUGGESTIONS_Y + SUGGESTIONS_BORDER_THICKNESS) + PADDING; static var SUGGESTIONS_LIST_WIDTH = ((SUGGESTIONS_WIDTH - (2 * SUGGESTIONS_BORDER_THICKNESS)) - (3 * PADDING)) - BLOCK_SIZE; static var SUGGESTIONS_LIST_HEIGHT = (SUGGESTIONS_HEIGHT - (2 * SUGGESTIONS_BORDER_THICKNESS)) - (2 * PADDING); static var SUGGESTIONS_SCROLL_X = (SUGGESTIONS_LIST_X + SUGGESTIONS_LIST_WIDTH) + PADDING; static var TOGGLE_BUTTON_WIDTH = 188 * com.google.youtube.tv.app.Config.SCALE; static var RESULTS_X = 486 * com.google.youtube.tv.app.Config.SCALE; static var RESULTS_Y = 142 * com.google.youtube.tv.app.Config.SCALE; static var RESULTS_WIDTH = ((Stage.width - MARGIN_H) - (49 * com.google.youtube.tv.app.Config.SCALE)) - RESULTS_X; static var RESULTS_HEIGHT = 531 * com.google.youtube.tv.app.Config.SCALE; static var RESULT_ITEM_HEIGHT = 129 * com.google.youtube.tv.app.Config.SCALE; static var RESULTS_GAP = Math.round(5 * com.google.youtube.tv.app.Config.SCALE); static var INFO_TEXT_X = RESULTS_X; static var INFO_TEXT_Y = 100 * com.google.youtube.tv.app.Config.SCALE; static var INFO_TEXT_WIDTH = RESULTS_WIDTH; static var INFO_LINE_HEIGHT = 15; static var INFO_WIDTH = RESULTS_WIDTH; static var HELP_BACKGROUND_ALPHA = 50; static var HELP_X = RESULTS_X; static var HELP_WIDTH = ((Stage.width - LEFT_PANEL_WIDTH) - MARGIN_H) - (20 * com.google.youtube.tv.app.Config.SCALE); static var HELP_PADDING = 40 * com.google.youtube.tv.app.Config.SCALE; static var HELP_INSTRUCTIONS_HEIGHT = 200 * com.google.youtube.tv.app.Config.SCALE; static var HELP_TITLE_LINE_HEIGHT = 29; static var HELP_LINE_HEIGHT = 16; static var PAIRING_UPSELL_X = HELP_X; static var PAIRING_UPSELL_WIDTH = HELP_WIDTH; }
Symbol 20546 MovieClip [__Packages.com.google.youtube.tv.view.ui.VideoInfo] Frame 0
class com.google.youtube.tv.view.ui.VideoInfo extends com.google.youtube.tv.view.ui.UIComponentBase { var titleText, infoText, hdText, thumbnail, videoNode, durationText, componentBackground, isActive, drawRectangle, clip, broadcast; function VideoInfo (container) { super(container, WIDTH, HEIGHT); build(); } function remove() { titleText.remove(); infoText.remove(); hdText.remove(); thumbnail.remove(); super.remove(); } function setData(data) { if (videoNode == data) { return(undefined); } videoNode = com.google.youtube.tv.tree.VideoNode(data); thumbnail.setImage(videoNode.getThumbnailUrl()); durationText.setText(videoNode.getDuration()); durationText.setPos((THUMB_WIDTH - SPACING) - durationText.clip._width, (HEIGHT - DURATION_BOTTOM) - durationText.clip._height); titleText.setText(videoNode.getTitle()); var _local3 = []; if (videoNode.getAuthor()) { _local3.push(videoNode.getAuthor()); } if (videoNode.getPublished()) { _local3.push(videoNode.getPublished()); } if (videoNode.getViewCount() && (videoNode.getViewCount() != "0")) { _local3.push(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.N_VIEWS, {VIEWS:videoNode.getViewCount()})); } infoText.setText(_local3.join(" | ")); hdText.setVisible(videoNode.isHd()); } function highlight(value) { setIsActive(value); } function onLoadInit(target) { target._width = THUMB_WIDTH; target._height = THUMB_HEIGHT; } function drawBg() { componentBackground.clear(); var _local2 = (isActive ? (com.google.youtube.tv.ui.Colors.WHITE) : (com.google.youtube.tv.ui.Colors.BLACK)); var _local3 = (isActive ? 100 : 70); drawRectangle(componentBackground, 0, 0, WIDTH, HEIGHT, 0, 0, 0, _local2, _local3); } function setIsActive(value) { super.setIsActive(value); drawBg(); titleText.field.textColor = (isActive ? (com.google.youtube.tv.ui.Colors.BLACK) : (com.google.youtube.tv.ui.Colors.WHITE)); } function getTitleColor() { return((isActive ? (com.google.youtube.tv.ui.Colors.BLACK) : (com.google.youtube.tv.ui.Colors.WHITE))); } function getTextColor() { return(com.google.youtube.tv.ui.Colors.MID_GRAY); } function build() { drawBg(); thumbnail = new com.google.youtube.tv.ui.Image(clip, new flash.geom.Rectangle(0, 0, THUMB_WIDTH, THUMB_HEIGHT)); durationText = new com.google.youtube.tv.ui.Text(clip, null, com.google.youtube.tv.ui.Font.getFontSizeForHeight(DURATION_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.BADGE2_TEXT); durationText.setBackground(com.google.youtube.tv.ui.Colors.BADGE2_BG); titleText = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(TITLE_X, TITLE_Y, TITLE_WIDTH, TITLE_HEIGHT), com.google.youtube.tv.ui.Font.getFontSizeForHeight(TITLE_LINE_HEIGHT), getTitleColor()); titleText.setMultiline(true); titleText.setAutoTruncate(true); infoText = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(INFO_X, INFO_Y, INFO_WIDTH, com.google.youtube.tv.ui.Font.getComponentHeight(INFO_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(INFO_LINE_HEIGHT), getTextColor()); infoText.setAutoTruncate(true); hdText = new com.google.youtube.tv.ui.Text(clip, null, com.google.youtube.tv.ui.Font.getFontSizeForHeight(HD_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.BADGE_TEXT); hdText.setText("HD"); hdText.setBackground(com.google.youtube.tv.ui.Colors.BADGE_BG); hdText.setPos(HD_X, (HEIGHT - HD_BOTTOM) - hdText.clip._height); } function onKeyUp() { switch (Key.getCode()) { case Key.DOWN : super.dispatchOutbound(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_BOTTOM); break; case Key.ENTER : broadcast({type:com.google.youtube.tv.view.ui.UIComponentBase.CHANGE}); } } static var WIDTH = com.google.youtube.tv.view.SearchComponentView.RESULTS_WIDTH; static var HEIGHT = com.google.youtube.tv.view.SearchComponentView.RESULT_ITEM_HEIGHT; static var THUMB_WIDTH = 230 * com.google.youtube.tv.app.Config.SCALE; static var THUMB_HEIGHT = HEIGHT; static var SPACING = 10 * com.google.youtube.tv.app.Config.SCALE; static var DURATION_BOTTOM = SPACING; static var DURATION_LINE_HEIGHT = 13; static var TITLE_X = THUMB_WIDTH + (8 * com.google.youtube.tv.app.Config.SCALE); static var TITLE_Y = 7 * com.google.youtube.tv.app.Config.SCALE; static var TITLE_WIDTH = (WIDTH - THUMB_WIDTH) - (2 * SPACING); static var TITLE_HEIGHT = 70 * com.google.youtube.tv.app.Config.SCALE; static var TITLE_LINE_HEIGHT = 16; static var INFO_X = TITLE_X; static var INFO_Y = 64 * com.google.youtube.tv.app.Config.SCALE; static var INFO_WIDTH = TITLE_WIDTH; static var INFO_LINE_HEIGHT = 13; static var HD_X = THUMB_WIDTH + SPACING; static var HD_BOTTOM = DURATION_BOTTOM; static var HD_LINE_HEIGHT = 13; }
Symbol 20547 MovieClip [__Packages.com.google.youtube.tv.osk.language.Language] Frame 0
class com.google.youtube.tv.osk.language.Language { function Language () { } static function populateUnicodeRanges() { var _local2 = {}; _local2.arabic = []; _local2.arabic.push([1536, 1791]); _local2.arabic.push([1872, 1919]); _local2.arabic.push([64336, 65023]); _local2.arabic.push([65136, 65279]); _local2.hebrew = []; _local2.hebrew.push([1424, 1535]); _local2.hebrew.push([64256, 64335]); return(_local2); } static function populateRTLUnicodeRanges() { var _local2 = []; var _local3 = 0; for ( ; _local3 < RTL_CHARSETS.length ; _local3++) { for ( ; !UNICODE_RANGES[RTL_CHARSETS[_local3]] ; _local3++) { } var _local4 = 0; for ( ; _local4 < UNICODE_RANGES[RTL_CHARSETS[_local3]].length ; _local4++) { _local2.push(UNICODE_RANGES[RTL_CHARSETS[_local3]][_local4]); } } return(_local2); } static function removeRTLCharacters(input) { var _local3 = ""; var _local4 = 0; for ( ; _local4 < input.length ; _local4++) { var _local5 = input.charCodeAt(_local4); var _local6 = 0; // unexpected jump do { _local6++; if (_local6 >= RTL_UNICODE_RANGES.length) { break; } } while (!((_local5 >= RTL_UNICODE_RANGES[_local6][0]) && (_local5 <= RTL_UNICODE_RANGES[_local6][1]))); if (_local6 == RTL_UNICODE_RANGES.length) { _local3 = _local3 + input.charAt(_local4); } } return(_local3); } function keyboardTransform(query) { return(query); } var LANG_CODE = "en"; static var UNICODE_RANGES = populateUnicodeRanges(); static var RTL_CHARSETS = ["arabic", "hebrew"]; static var RTL_UNICODE_RANGES = populateRTLUnicodeRanges(); }
Symbol 20548 MovieClip [__Packages.com.google.youtube.tv.services.TransliterationService] Frame 0
class com.google.youtube.tv.services.TransliterationService extends com.google.chianti.event.EventBroadcaster { var loader, broadcast; function TransliterationService (ssl) { super(); com.google.chianti.event.EventBroadcaster.initialize(this); loader = new LoadVars(); loader.onData = com.google.chianti.event.EventDelegate.create(this, onDataLoaded); loader.onHTTPStatus = com.google.chianti.event.EventDelegate.create(this, onHTTPStatus); if (ssl) { SERVICE_URL = com.google.youtube.tv.util.StringUtil.applyProtocol(SERVICE_URL, ssl); } } function getTransliteration(lang, text, optionsNumber) { var _local5 = new LoadVars(); _local5.langpair = langPairs[lang]; _local5.num = (_global.isNaN(optionsNumber) ? 10 : (optionsNumber)); _local5.text = text; _local5.tl_app = 3; _local5.tlqt = 1; _local5.uv = ""; _local5.version = 2; if (!_local5.sendAndLoad(SERVICE_URL, loader, "POST")) { onDataError(); } } function onDataLoaded(src) { if (!src) { onDataError(); return(undefined); } var _local3 = Array(com.adobe.serialization.json.JSON.decode(src)); var _local4 = []; var _local7 = 0; for ( ; _local7 < _local3.length ; _local7++) { var _local5 = {text:_local3[_local7][0], suggestions:[]}; var _local8 = _local3[_local7][1]; for ( ; (_local8.length == 1) && (_local5.text == _local8[0]) ; _local7++) { } var _local9 = 0; for ( ; _local9 < _local8.length ; _local9++) { var _local6 = {text:_local8[_local9], size:((_local3[_local7][2] && (_local3[_local7][2][_local9])) ? (_local3[_local7][2][_local9]) : -1)}; _local6.toString = function () { return((this.text + ":") + this.size); }; _local5.suggestions.push(_local6); } _local5.toString = function () { return((this.text + ":") + this.suggestions.length); }; _local4.push(_local5); } broadcast({target:this, type:COMPLETE, data:_local4, status:httpStatus}); } function onDataError() { broadcast({target:this, type:ERROR, status:httpStatus}); } function onHTTPStatus(status) { httpStatus = status; broadcast({target:this, type:HTTP_STATUS, status:httpStatus}); } static var ERROR = "ERROR"; static var COMPLETE = "COMPLETE"; static var HTTP_STATUS = "HTTP_STATUS"; static var PAIR_EN_ZH = "en|zh"; static var PAIR_JA_HIRA_JA = "ja-Hira|ja"; static var SERVICE_URL = "http://www.youtube.com/api/transliterate"; var httpStatus = -1; var langPairs = {zh:PAIR_EN_ZH, ja:PAIR_JA_HIRA_JA}; }
Symbol 20549 MovieClip [__Packages.com.google.utils.MathUtils] Frame 0
class com.google.utils.MathUtils { function MathUtils () { } static function maxN() { var _local2 = arguments[0]; var _local3 = 1; for ( ; _local3 < arguments.length ; _local3++) { _local2 = ((arguments[_local3] > _local2) ? (arguments[_local3]) : (_local2)); } return(_local2); } static function minN() { var _local2 = arguments[0]; var _local3 = 1; for ( ; _local3 < arguments.length ; _local3++) { _local2 = ((arguments[_local3] < _local2) ? (arguments[_local3]) : (_local2)); } return(_local2); } }
Symbol 20550 MovieClip [__Packages.com.google.youtube.IBroadcaster] Frame 0
class com.google.youtube.IBroadcaster { function IBroadcaster () { } }
Symbol 20551 MovieClip [__Packages.com.google.youtube.AbstractBroadcaster] Frame 0
class com.google.youtube.AbstractBroadcaster implements com.google.youtube.IBroadcaster { function AbstractBroadcaster () { com.google.chianti.event.EventBroadcaster.initialize(this); } function broadcast(evt) { } function disableBroadcast() { } function enableBroadcast() { } function registerEvent(type, obj) { } function registerEvents() { } function unregisterEvent(type, obj) { } function unregisterEvents() { } function unregisterAll() { } }
Symbol 20552 MovieClip [__Packages.com.google.youtube.util.IMessages] Frame 0
class com.google.youtube.util.IMessages implements com.google.youtube.IBroadcaster { function IMessages () { } }
Symbol 20553 MovieClip [__Packages.com.google.youtube.tv.services.AbstractMessagesService] Frame 0
class com.google.youtube.tv.services.AbstractMessagesService extends com.google.youtube.AbstractBroadcaster implements com.google.youtube.util.IMessages { var messages, locale, xlbLoader, broadcast; function AbstractMessagesService (lang, country) { super(); messages = {}; locale = parseLocale(lang, country); xlbLoader = new XML(); xlbLoader.ignoreWhite = true; xlbLoader.onLoad = com.google.chianti.event.EventDelegate.create(this, onDataLoad); registerDefaultMessages(); } static function GET_MAP() { var _local2 = {am:"am_ET", ar:"ar_EG", bg:"bg_BG", ca:"ca_ES", cs:"cs_CZ", da:"da_DK", de:"de_DE", el:"el_GR", en:["en_US", "en_GB"], es:["es_ES", "es_MX"], fa:"fa_IR", fi:"fi_FI", fil:"fil_PH", fr:"fr_FR", hi:"hi_IN", hu:"hu_HU", hr:"hr_HR", id:"id_ID", it:"it_IT", iw:"iw_IL", ja:"ja_JP", ko:"ko_KR", lv:"lv_LV", ms:"ms_MY", nl:"nl_NL", nb:"nb_NO", no:"nb_NO", pl:"pl_PL", pt:["pt_PT", "pt_BR"], ro:"ro_RO", ru:"ru_RU", sk:"sk_SK", sl:"sl_SI", sr:"sr_RS", sv:"sv_SE", sw:"sw_TZ", th:"th_TH", tr:"tr_TR", uk:"uk_UA", vi:"vi_VN", zh:["zh_CN", "zh_HK", "zh_TW"]}; _local2.lt = "lt_LT"; return(_local2); } function getLocale() { return(locale); } function getXlbUrl() { return(com.google.youtube.tv.util.StringUtil.replacePlaceholders(BASE_URL, {locale:locale})); } function load() { if (locale == LOCALE_EN) { loaded = true; broadcast({type:com.google.youtube.event.MessagesEvent.UPDATE}); } else { xlbLoader.load(getXlbUrl()); } return(loaded); } function registerMsg(key, msg) { messages[key.toLowerCase()] = com.google.youtube.tv.util.StringUtil.decodeXmlEntities(msg); } function getMsg(key, placeholders) { var _local4 = messages[key.toLowerCase()]; _local4 = replacePlaceholders(removeExTag(_local4), placeholders); if ((_local4.indexOf("&lt;") > -1) || (_local4.indexOf("&gt;") > -1)) { _local4 = _local4.split("&lt;").join("<").split("&gt;").join(">"); } for (var x in placeholders) { if (_local4.indexOf(x) > -1) { _local4 = _local4.split(x).join(placeholders[x]); } } return(_local4); } function formatPrice(price, currency) { if (Math.round(price) == price) { var _local4 = String(price); } else { var _local4 = com.google.youtube.tv.util.StringUtil.formatDecimal(price); } var _local5 = CURRENCY_TEMPLATES[currency]; return((_local5 ? (replacePlaceholders(_local5, {value:_local4})) : ((currency + " ") + _local4))); } function isLoaded() { return(loaded); } function registerDefaultMessages() { } function registerCustomMessages() { } function parseLocale(lang, country) { var _local4 = (lang + "_") + country; if (lang) { if (LANGUAGE_MAP[lang] == _local4) { return(_local4); } if (LANGUAGE_MAP[lang].length) { var _local5 = 0; for ( ; _local5 < LANGUAGE_MAP[lang].length ; _local5++) { if (LANGUAGE_MAP[lang][_local5] == _local4) { return(_local4); } } } } return((LANGUAGE_MAP[lang] && (LANGUAGE_MAP[lang][0])) || (LANGUAGE_MAP[lang] || (LOCALE_EN))); } function onDataLoad(success) { if (!success) { broadcast({type:com.google.youtube.event.DataEvent.ERROR}); return(undefined); } var _local3 = com.google.youtube.tv.util.Xtract.getNodes(xlbLoader, "/localizationbundle/messages/msg[*]"); var _local4 = 0; for ( ; _local4 < _local3.length ; _local4++) { registerMsg(_local3[_local4].attributes.name, _local3[_local4].childNodes.join("")); } registerCustomMessages(); broadcast({type:com.google.youtube.event.MessagesEvent.UPDATE}); } function replacePlaceholders(str, dict) { if (!str) { return(""); } if (str.indexOf("<ph") < 0) { return(str); } var _local4 = str.indexOf("<ph"); var _local5 = str.indexOf("</ph>", _local4); if ((_local4 != -1) && (_local5 != -1)) { var _local6 = str.substring(str.indexOf("name=", _local4) + 6, str.indexOf(">", _local4) - 1); var _local7 = str.substring(_local4, _local5 + 5); var _local8 = dict[_local6].toString(); if (_local8 == undefined) { _local8 = str.substring(str.indexOf(">", _local4) + 1, _local5); } str = str.split(_local7).join(_local8); return(replacePlaceholders(str, dict)); } return(str); } function removeExTag(str) { if (!str) { return(""); } if (str.indexOf("<ex") < 0) { return(str); } var _local3 = str.indexOf("<ex"); var _local4 = str.indexOf("</ex>", _local3); if ((_local3 != -1) && (_local4 != -1)) { var _local5 = str.substring(_local3, _local4 + 5); str = str.split(_local5).join(""); return(removeExTag(str)); } return(str); } static var BASE_URL = "${baseUrl}/leanbacklite?" + "action_get_versioned_xlb&hl=${locale}&override_hl=1"; static var LOCALE_EN = "en_US"; static var LANGUAGE_MAP = GET_MAP(); static var CURRENCY_TEMPLATES = {AUD:"AU$<ph name='value'>1</ph>", BRL:"R$<ph name='value'>1</ph>", CAD:"C$<ph name='value'>1</ph>", EUR:"<ph name='value'>1</ph> \u20AC", GBP:"\u00A3<ph name='value'>1</ph>", JPY:"\u00A5<ph name='value'>1</ph>", KRW:"\u20A9<ph name='value'>1</ph>", RUB:"<ph name='value'>1</ph>\u0420\u0423\u0411", USD:"$<ph name='value'>1</ph>"}; var group = "leanback"; var loaded = false; }
Symbol 20554 MovieClip [__Packages.com.google.youtube.tv.services.MessagesService] Frame 0
class com.google.youtube.tv.services.MessagesService extends com.google.youtube.tv.services.AbstractMessagesService { static var instance; var registerMsg, getLocale; function MessagesService (lang, country) { super(lang, country); } static function get() { if (!instance) { instance = new com.google.youtube.tv.services.MessagesService(com.google.youtube.tv.platform.Box.getLang(), com.google.youtube.tv.platform.Box.getCountry()); } return(instance); } static function getMsg(key, placeholders) { return(get().getMsg(key, placeholders)); } function registerDefaultMessages() { registerMsg(ABOUT, "About"); registerMsg(ALREADY_SUBSCRIBED, "You are already subscribed to this channel"); registerMsg(CLAIM_FURTHER_DETAILS, "In order to process a legal claim we " + "need more information from you. Please visit this help center link:"); registerMsg(CLAIM_SUBMITTED, "Issue successfully submitted."); registerMsg(CONNECTION_FAILURE, ("YouTube on TV is having difficulty " + "contacting the YouTube servers.\n\nPlease check your internet ") + "connection."); registerMsg(CONNECTION_FAILURE_SIGN_OUT, "Tip: try signing out of your " + "account and restarting the app if this problem persists."); registerMsg(BROWSE_ACTION, "Press to browse"); registerMsg(ERROR, "Error"); registerMsg(ERROR_AUTOPLAY_MESSAGE, "Next video starts in <ph name=\"DIALO" + "G_TIMEOUT\"><ex>5</ex>%1</ph> seconds..."); registerMsg(ERROR_MESSAGE_TIMEOUT, "This message will go away in <ph name" + "=\"DIALOG_TIMEOUT\"><ex>5</ex>%1</ph> seconds."); registerMsg(ERROR_VIDEO_PLAYBACK, "This video is not available."); registerMsg(INFO_PANEL, "Info"); registerMsg(LOADING, "Loading"); registerMsg(META_AUTHOR, "by AUTHOR_NAME"); registerMsg(META_MINUTES, "<ph name=\"MINUTES\"><ex>???</ex>%1$s</ph> mins."); registerMsg(N_VIEWS, "<ph name=\"VIEWS\"><ex>301</ex>%1</ph> views"); registerMsg(NETWORK_CONNECTION_LOST, "Network connection is disabled. " + "Application will exit in 10 seconds."); registerMsg(NOW_PLAYING, "Now playing"); registerMsg(NOW_PLAYING_IN, "Now playing in <ph name=\"PLAYLIST\"><ex>" + "Recommended</ex></ph>"); registerMsg(NO_PLAYLISTS, "You have no playlists"); registerMsg(NO_CHANNEL_PLAYLISTS, "Channel has no playlists that are available on TV"); registerMsg(PLAYLISTS, "Playlists"); registerMsg(NO_RESULTS, "No results"); registerMsg(SEARCH_MENU_ITEM, "Search"); registerMsg(SEARCH_INPUT_TIP, "Search..."); registerMsg(SEARCH_QUALITY_SELECTOR_ALL, "All"); registerMsg(SEARCH_RESULT_FOR, "Results for \"<ph name=\"QUERY\"><ex>GAGA</ex></ph>\""); registerMsg(SIGN_IN_PROCESSING, "Please wait while the system is " + "processing your request."); registerMsg(SIGN_IN_INVITATION_2, ((((((((("<ph name=\"START_H2_1\">&lt;font size=\"2" + "8\"&gt;</ph>To sign in to your YouTube account<ph name=\"END_H\">&lt;/f") + "ont&gt;</ph><ph name=\"START_BR\">&lt;br&gt;</ph><ph name=\"START_H3_1\"") + ">&lt;font size=\"24\"&gt;</ph>1. Go to <ph name=\"OAUTH_FORM_URL\"><ex>h") + "ttp://www.google.com/device</ex>%1</ph><ph name=\"START_BR\">&lt;br&gt") + ";</ph>2. Type in the code <ph name=\"END_H\">&lt;/font&gt;</ph><ph nam") + "e=\"START_H1_1\">&lt;font color=\"#ffffff\" size=\"32\"&gt;</ph><ph name=\"") + "USER_CODE\"><ex>123qwe</ex>%1</ph><ph name=\"END_H\">&lt;/font&gt;</ph>") + "<ph name=\"START_BR\">&lt;br&gt;</ph><ph name=\"START_H3_2\">&lt;font co") + "lor=\"#727171\" size=\"28\"&gt;</ph>We'll do the rest and confirm on sc") + "reen shortly.<ph name=\"END_H\">&lt;/font&gt;</ph>"); registerMsg(SIGN_IN_FAIL, (("<ph name=\"START_H2_1\">&lt;font size=\"28\"&gt;</" + "ph>This functionality is temporarily unavailable.<ph name=\"START_BR\"") + ">&lt;br&gt;</ph>Please try again later.<ph name=\"END_H\">&lt;/font&gt") + ";</ph>"); registerMsg(SIGN_IN_REQUIRED, "You must be signed in to perform this oper" + "ation."); registerMsg(SIGN_OUT_CONFIRMATION, (("Signing out will remove access to you" + "r YouTube account. It is not necessary to sign out to exit the appli") + "cation. If you do sign out, you will need to sign in again to access") + " your YouTube account. Please click OK to confirm."); registerMsg(TIME, "time"); registerMsg(TRANSLITERATION_INSTRUCTIONS, (((((("<ph name=\"START_H\">&lt;font si" + "ze=\"22\"&gt;</ph>Transliteration input mode.<ph name=\"END_H\">&lt;/fon") + "t&gt;</ph><ph name=\"START_P\">&lt;font size=\"18\"&gt;</ph>Press SPACE ") + "to start transliterating a word.<ph name=\"START_BR\">&lt;br&gt;</ph>L") + "EFT, RIGHT - navigation between the word parts.<ph name=\"START_BR\">&") + "lt;br&gt;</ph>UP, DOWN - navigation and select the suggestion for un") + "derlined text.<ph name=\"START_BR\">&lt;br&gt;</ph>OK remote button / ") + "ENTER - submit changes.<ph name=\"END_P\">&lt;/font&gt;</ph>"); registerMsg(VIEWS, "views"); registerMsg(TV_QUEUE, "TV queue"); registerMsg(WATCH_ACTION, "Press to watch"); registerMsg(X_TOTAL_UPLOAD_VIEWS, "<ph name=\"COUNT\"><ex>1235</ex></ph> " + "total upload views"); registerMsg(OVERVIEW, "Overview"); registerMsg(PAIRING_UPSELL_TITLE, "Did you know?"); registerMsg(PAIRING_UPSELL_MESSAGE, "You can use your mobile device " + "or laptop to find and play videos on TV"); registerMsg(PAIRING_TRY, "Try it out now"); registerMsg(SUBSCRIBE_QUESTION, "Subscribe?"); registerMsg(SUBSCRIBE, "Subscribe"); registerMsg(SUBSCRIBED, "Subscribed"); registerMsg(LIKE_QUESTION, "Like?"); registerMsg(LIKED, "Liked"); registerMsg(DISLIKE_QUESTION, "Dislike?"); registerMsg(DISLIKED, "Disliked"); registerMsg(ADD_TO_PLAYLIST_QUESTION, "Add to playlist?"); registerMsg(ADDED_TO_PLAYLIST, "Added to playlist"); registerMsg(WILL_ASK_TO_SIGN_IN, "Will ask to sign in"); registerMsg(BADGE_CHANNEL, "Channel"); registerMsg(BADGE_CHANNELS, "Channels"); registerMsg(BADGE_PLAYLIST, "Playlist"); registerMsg(BADGE_VIDEO, "Video"); registerMsg(FEATURED_CHANNELS, "Featured"); registerMsg(VIDEOS, "Videos"); registerMsg(RECOMMENDED, "Recommended"); registerMsg(ACCOUNT, "Account"); registerMsg(WATCH_HISTORY, "Watch History"); registerMsg(SETTINGS, "Settings"); registerMsg(FAVORITES_CHANNEL, "Favorites"); registerMsg(SIGN_IN_CHANNEL, "Sign In"); registerMsg(SIGN_OUT_CHANNEL, "Sign Out"); registerMsg(SUBSCRIPTIONS_CHANNEL, "Subscriptions"); registerMsg(UPLOADS_CHANNEL, "Uploads"); registerMsg(EMPTY_CHANNEL, "Channel is not available on TV or has no content"); registerMsg(ACCEPT_BTN, "Accept"); registerMsg(BACK_BTN, "Back"); registerMsg(BACKSPACE_BTN, "BACKSPACE"); registerMsg(CANCEL_BTN, "Cancel"); registerMsg(CLEAR_BTN, "Clear"); registerMsg(CLOSE_BTN, "Close"); registerMsg(OK_BTN, "OK"); registerMsg(SPACE_BTN, "SPACE"); registerMsg(AD_NEXT_LABEL, "Next up..."); registerMsg(AD_TIMING, "Advertisement: <ph name=\"AD_TIME\"><ex>0:15</ex>%1" + "</ph>"); registerMsg(PRE_SKIP_AD, "You can skip this ad in <ph name=\"X_SECONDS\">1<" + "/ph>"); registerMsg(SKIP_AD, "Press <ph name=\"SKIP_ICON\"><ex>&gt;</ex>%1</ph> to " + "skip ad"); registerMsg(WATCH_LATER, "Watch Later"); registerMsg(WATCH_LATER_EMPTY, "Your Watch Later list is currently empty."); registerMsg(WATCH_LATER_INSTRUCTIONS, ("Save videos you find on " + "youtube.com and watch them later on your TV. Click the ") + "\"Watch Later\" button to add them to this list."); registerMsg(PAIR_MENU_TITLE, "Pair"); registerMsg(PAIR_MENU_SUBTITLE, "Pair your screen with a mobile device"); registerMsg(PAIR_CLEAR_DEVICES, "Clear paired devices"); registerMsg(PAIR_DEVICES, "Connected devices:"); registerMsg(PAIR_SCREEN_INSTRUCTIONS_PART1, "On your phone or tablet:"); registerMsg(PAIR_SCREEN_INSTRUCTIONS_PART2, "Go to <ph name=\"LINK\">youtub" + "e.com/pair</ph>"); registerMsg(PAIR_SCREEN_INSTRUCTIONS_PART3, "Enter <ph name=\"CODE\">1234</" + "ph>"); registerMsg(SCAN, "Scan"); registerMsg(OR, "OR"); registerMsg(IMPROVE_YOUTUBE_TITLE, "Improve YouTube"); registerMsg(IMPROVE_YOUTUBE_ENABLE, "Help improve YouTube by sending anonymous usage data"); registerMsg(CLEAR_COOKIES_TITLE, "Clear cookies"); registerMsg(CLEAR_COOKIES_TEXT, "Are you sure you want to clear cookies " + "on this device? You can't undo this."); registerMsg(NUMBER_OF_VIDEOS, "<ph name=\"VIDEO_COUNT_1\">$video_count</ph>" + " videos"); registerMsg(X_OF_Y_VIDEOS, "<ph name=\"VIDEO_COUNT_1\"><ex>1</ex>%1</ph> of" + " <ph name=\"VIDEO_COUNT_2\"><ex>12</ex>%2</ph> videos"); registerMsg(X_OF_Y_PLAYLISTS, "<ph name=\"COUNT_1\"><ex>1</ex>%1</ph> of" + " <ph name=\"COUNT_2\"><ex>12</ex>%2</ph> playlists"); registerMsg(X_PLAYLISTS, "<ph name=\"COUNT\"><ex>1</ex>%1</ph> playlists"); registerMsg(RELATED_VIDEOS, "Related videos"); registerMsg(VEVO_PROMOTED_VIDEOS, "Presented by VEVO"); registerMsg(CURRENT_PLAYLIST, "Current playlist"); registerMsg(CHANNEL_INFO_VIDEOS, "<ph name=\"NUMVIDEOS_1\">${numVideos}</ph" + "> total videos"); registerMsg(CHANNEL_INFO_LAST_ACTIVITY, "Latest Activity: <ph name=\"DATE_" + "1\">${date}</ph>"); registerMsg(CHANNEL_INFO_SUBSCRIBERS, "<ph name=\"NUMSUBSCRIBERS_1\">${numS" + "ubscribers}</ph> subscribers"); registerMsg(NUMBER_OF_CHANNELS, "<ph name=\"NUMCHANNELS_1\">${numChannels}<" + "/ph> channels"); registerMsg(USER_UPLOADS, "<ph name=\"USER_1\">${user}</ph> uploads"); registerMsg(USER_PLAYLISTS_TITLE, "My Playlists"); registerMsg(WHAT_TO_WATCH, "What to Watch"); registerMsg(SIGN_IN_SUBTITLE, "Sign in to your YouTube account"); registerMsg(SIGN_OUT_SUBTITLE, "Sign out of your YouTube account"); registerMsg(FLAG_WEB, "To Flag this video"); registerMsg(FLAG_WEB_DESC, "Visit this video on your computer or laptop " + "and click the flag icon to submit a claim:"); } function registerCustomMessages() { if (getLocale() == "ja_JP") { registerMsg(TRANSLITERATION_INSTRUCTIONS, (((((((((("<ph name=\"START_H\">&lt;font size=\"22\"&gt;</ph>" + "\u65E5\u672C\u8A9E\u5165\u529B\u30E2\u30FC\u30C9\u3067\u306E\u64CD\u4F5C\u65B9\u6CD5") + "<ph name=\"END_H\">&lt;/font&gt;</ph>") + "<ph name=\"START_P\">&lt;font size=\"18\"&gt;</ph>") + "\u5909\u63DB\uFF1A\u5909\u63DB\u5019\u88DC\u306E\u8868\u793A") + "<ph name=\"START_BR\">&lt;br&gt;</ph>") + "\u30EA\u30E2\u30B3\u30F3\u306E \u2190 \u2192\uFF1A\u5909\u63DB\u5BFE\u8C61\u306E\u6587\u5B57\u9078\u629E") + "<ph name=\"START_BR\">&lt;br&gt;</ph>") + "\u30EA\u30E2\u30B3\u30F3\u306E \u2191 \u2193\uFF1A\u5909\u63DB\u5019\u88DC\u306E\u9078\u629E") + "<ph name=\"START_BR\">&lt;br&gt;</ph>") + "\u30EA\u30E2\u30B3\u30F3\u306E \u6C7A\u5B9A\uFF1A\u78BA\u5B9A") + "<ph name=\"END_P\">&lt;/font&gt;</ph>"); } } static var ABOUT = "ABOUT"; static var ALREADY_SUBSCRIBED = "ALREADY_SUBSCRIBED"; static var CLAIM_FURTHER_DETAILS = "CLAIM_FURTHER_DETAILS"; static var CLAIM_SUBMITTED = "CLAIM_SUBMITTED"; static var CONNECTION_FAILURE = "CONNECTION_FAILURE"; static var CONNECTION_FAILURE_SIGN_OUT = "CONNECTION_FAILURE_SIGN_OUT"; static var BROWSE_ACTION = "BROWSE_ACTION"; static var ERROR = "ERROR"; static var ERROR_AUTOPLAY_MESSAGE = "ERROR_AUTOPLAY_MESSAGE"; static var ERROR_MESSAGE_TIMEOUT = "ERROR_MESSAGE_TIMEOUT"; static var ERROR_VIDEO_PLAYBACK = "ERROR_VIDEO_PLAYBACK"; static var INFO_PANEL = "VqojG-dKJ6IwOAUQluFwzA"; static var LOADING = "LOADING"; static var META_AUTHOR = "META_AUTHOR"; static var META_MINUTES = "META_MINUTES"; static var N_VIEWS = "N_VIEWS"; static var NETWORK_CONNECTION_LOST = "NETWORK_CONNECTION_LOST"; static var NOW_PLAYING = "NOW_PLAYING"; static var NOW_PLAYING_IN = "NOW_PLAYING_IN"; static var NO_CHANNEL_PLAYLISTS = "NO_CHANNEL_PLAYLISTS"; static var NO_PLAYLISTS = "NO_PLAYLISTS"; static var NO_RESULTS = "NO_RESULTS"; static var PLAYLISTS = "PLAYLISTS"; static var SEARCH_MENU_ITEM = "SEARCH_MENU_ITEM"; static var SEARCH_INPUT_TIP = "SEARCH_INPUT_TIP"; static var SEARCH_QUALITY_SELECTOR_ALL = "SEARCH_QUALITY_SELECTOR_ALL"; static var SEARCH_RESULT_FOR = "SEARCH_RESULTS_FOR"; static var SIGN_IN_PROCESSING = "SIGN_IN_PROCESSING"; static var SIGN_IN_INVITATION_2 = "SIGN_IN_INVITATION_2"; static var SIGN_IN_FAIL = "SIGN_IN_FAIL"; static var SIGN_IN_REQUIRED = "SIGN_IN_REQUIRED"; static var SIGN_OUT_CONFIRMATION = "SIGN_OUT_CONFIRMATION"; static var TIME = "TIME"; static var TRANSLITERATION_INSTRUCTIONS = "TRANSLITERATION_INSTRUCTIONS"; static var VIEWS = "VIEWS"; static var TV_QUEUE = "TV_QUEUE"; static var WATCH_ACTION = "WATCH_ACTION"; static var X_TOTAL_UPLOAD_VIEWS = "X_TOTAL_UPLOAD_VIEWS"; static var OVERVIEW = "eELGgvKjax9xUehU7TsdNw"; static var PAIRING_UPSELL_TITLE = "PAIRING_UPSELL_TITLE"; static var PAIRING_UPSELL_MESSAGE = "PAIRING_UPSELL_MESSAGE"; static var PAIRING_TRY = "PAIRING_TRY"; static var SUBSCRIBE_QUESTION = "SUBSCRIBE_QUESTION"; static var SUBSCRIBE = "SUBSCRIBE"; static var SUBSCRIBED = "SUBSCRIBED"; static var LIKE_QUESTION = "LIKE_QUESTION"; static var LIKED = "LIKED"; static var DISLIKE_QUESTION = "DISLIKE_QUESTION"; static var DISLIKED = "DISLIKED"; static var ADD_TO_PLAYLIST_QUESTION = "ADD_TO_PLAYLIST_QUESTION"; static var ADDED_TO_PLAYLIST = "ADDED_TO_PLAYLIST"; static var WILL_ASK_TO_SIGN_IN = "WILL_ASK_TO_SIGN_IN"; static var BADGE_CHANNEL = "BADGE_CHANNEL"; static var BADGE_CHANNELS = "BADGE_CHANNELS"; static var BADGE_PLAYLIST = "BADGE_PLAYLIST"; static var BADGE_VIDEO = "BADGE_VIDEO"; static var FEATURED_CHANNELS = "FEATURED_CHANNELS"; static var VIDEOS = "VUz6s5OOIdknC9a3WTH5bw"; static var RECOMMENDED = "8ccpGpAEYJptrDEU5Fgx1Q"; static var ACCOUNT = "NBIphJA8Vzc3b865Inr6SA"; static var WATCH_HISTORY = "O2-muZUoPJXaFe3HcnRiIQ"; static var SETTINGS = "fQQSV9ePgNn5vA593sfBGQ"; static var FAVORITES_CHANNEL = "FAVORITES_CHANNEL"; static var SIGN_IN_CHANNEL = "SIGN_IN_CHANNEL"; static var SIGN_OUT_CHANNEL = "SIGN_OUT_CHANNEL"; static var SUBSCRIPTIONS_CHANNEL = "SUBSCRIPTIONS_CHANNEL"; static var UPLOADS_CHANNEL = "UPLOADS_CHANNEL"; static var EMPTY_CHANNEL = "EMPTY_CHANNEL"; static var ACCEPT_BTN = "ACCEPT_BTN"; static var BACK_BTN = "cz86Ze1VedWJt6VTka2b9w"; static var BACKSPACE_BTN = "BACKSPACE_BTN"; static var CANCEL_BTN = "CANCEL_BTN"; static var CLEAR_BTN = "gwdpMcHRPMUpzw13-jBDxA"; static var CLOSE_BTN = "HTML5_CLOSE"; static var OK_BTN = "OK_BTN"; static var SPACE_BTN = "SPACE_BTN"; static var AD_NEXT_LABEL = "AD_NEXT_LABEL"; static var AD_TIMING = "AD_TIMING"; static var PRE_SKIP_AD = "PRE_SKIP_AD"; static var SKIP_AD = "SKIP_AD"; static var WATCH_LATER = "5n-OKqxVj5oaqauUK4BdoA"; static var WATCH_LATER_EMPTY = "yDyK8f2GXOezJ674kV0HYA"; static var WATCH_LATER_INSTRUCTIONS = "WATCH_LATER_INSTRUCTIONS"; static var PAIR_MENU_TITLE = "PAIR_MENU_TITLE"; static var PAIR_MENU_SUBTITLE = "PAIR_MENU_SUBTITLE"; static var PAIR_CLEAR_DEVICES = "PAIR_CLEAR_DEVICES"; static var PAIR_DEVICES = "PAIR_DEVICES"; static var PAIR_SCREEN_INSTRUCTIONS_PART1 = "PAIR_SCREEN_INSTRUCTIONS_PART1"; static var PAIR_SCREEN_INSTRUCTIONS_PART2 = "PAIR_SCREEN_INSTRUCTIONS_PART2"; static var PAIR_SCREEN_INSTRUCTIONS_PART3 = "PAIR_SCREEN_INSTRUCTIONS_PART3"; static var SCAN = "SCAN"; static var OR = "OR"; static var IMPROVE_YOUTUBE_TITLE = "IMPROVE_YOUTUBE_TITLE"; static var IMPROVE_YOUTUBE_ENABLE = "IMPROVE_YOUTUBE_ENABLE"; static var CLEAR_COOKIES_TITLE = "A button that clears the user cookies."; static var CLEAR_COOKIES_TEXT = ("Dialog title asking the " + "user to confirm whether they want to delete their cookies in this ") + "device or not, and warning them that this action can not be undone"; static var NUMBER_OF_VIDEOS = "80uIPYMR3RcxpLRv7hVlEw"; static var X_OF_Y_VIDEOS = "X_OF_Y_VIDEOS"; static var X_OF_Y_PLAYLISTS = "X_OF_Y_PLAYLISTS"; static var X_PLAYLISTS = "X_PLAYLISTS"; static var RELATED_VIDEOS = "ND8MBOA3QTlAk-qRj1_8ow"; static var VEVO_PROMOTED_VIDEOS = "VEVO_PROMOTED_VIDEOS"; static var CURRENT_PLAYLIST = "CURRENT_PLAYLIST"; static var CHANNEL_INFO_VIDEOS = "mZFHvCxpWSKPgpP-ynNeIg"; static var CHANNEL_INFO_LAST_ACTIVITY = "ReQ8Sv2ZYM-reKz8CPuJrg"; static var CHANNEL_INFO_SUBSCRIBERS = "iWk13Q2R4aqWW8Y1ujIBuw"; static var NUMBER_OF_CHANNELS = "1YJNVYvM0m3D7q5Q5UabMg"; static var USER_UPLOADS = "c4hVw0V9ZS0kpaADgVNzIQ"; static var USER_PLAYLISTS_TITLE = "7K4nWqck3MF0-9NrYpcq9g"; static var WHAT_TO_WATCH = "Title of a list of videos " + "which mix therecommendations and the subscriptions of a user."; static var SIGN_IN_SUBTITLE = "WcfDGZBf75-qocWRfgFj-w"; static var SIGN_OUT_SUBTITLE = "cdR1z834Blypgvr9fAsCrg"; static var FLAG_WEB = "FLAG_WEB"; static var FLAG_WEB_DESC = "FLAG_WEB_DESC"; }
Symbol 20555 MovieClip [__Packages.com.google.youtube.tv.view.ui.list.List] Frame 0
class com.google.youtube.tv.view.ui.list.List extends com.google.youtube.tv.view.ui.UIComponentBase { var enclosedNavigation, givenListSize, itemRendererClass, itemHeight, listData, maxFirstItemIdx, doScroll, itemsList, isActive, buttonDown, buttonUp, dispatchUserActivity, broadcast, clip; function List (container, listWidth, listHeight, visibleElements, itemRenderer, rowHeight, opt_gap) { super(container, listWidth, listHeight); enclosedNavigation = false; listSize = visibleElements || (listSize); givenListSize = listSize; itemRendererClass = itemRenderer || (com.google.youtube.tv.view.ui.list.ListItem); itemHeight = rowHeight || (height / listSize); gap = opt_gap || (gap); } function setData(data) { if (listData == data) { return(undefined); } clear(); listData = data; listSize = Math.min(listData.length, givenListSize); maxFirstItemIdx = Math.max(0, listData.length - listSize); doScroll = listData.length > listSize; manageScrollButtons(doScroll, false); populateList(); } function getData() { return(listData); } function clear() { var _local2 = 0; while (_local2 < listSize) { itemsList[_local2].remove(); itemsList[_local2] = null; _local2++; } itemsList = []; listData = []; firstVisibleItemIdx = 0; currentItemIdx = -1; clickedItemRenderer = null; clearSelection(); manageScrollButtons(false, false); } function getSelectedItem() { return(listData[getSelectedItemIndex()]); } function setSelectedIndex(index) { if (index == -1) { highlightItem(-1); return(undefined); } ensureIndexIsVisible(index); if (isActive) { highlightItem(index - firstVisibleItemIdx); } else { currentItemIdx = index - firstVisibleItemIdx; } checkScrollButtons(); } function getSelectedItemIndex() { return(((currentItemIdx == -1) ? -1 : (currentItemIdx + firstVisibleItemIdx))); } function getItemIndex(data) { var _local3 = 0; for ( ; _local3 < listData.length ; _local3++) { if (data == listData[_local3]) { return(_local3); } } return(-1); } function getItemIndexScrollFactor() { return(firstVisibleItemIdx); } function getItemAtVisibleIndex(index) { return(listData[firstVisibleItemIdx + index]); } function bindScrollButtons(downButton, upButton) { buttonDown = downButton; buttonUp = upButton; buttonDown.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, scrollDown)); buttonUp.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, scrollUp)); manageScrollButtons(false, false); } function setIsActive(value) { super.setIsActive(value); if (super.getIsActive()) { highlightItem(((currentItemIdx == -1) ? 0 : (currentItemIdx))); } else { clearSelection(); clickedItemRenderer = null; } } function scrollDown() { var _local3 = getSelectedItemIndex(); if (currentItemIdx < (listSize - 1)) { clearSelection(); currentItemIdx = findNearestEnabledItem(currentItemIdx, 1); highlightItem(currentItemIdx); } else if (firstVisibleItemIdx < maxFirstItemIdx) { firstVisibleItemIdx++; populateList(); } else if (firstVisibleItemIdx == maxFirstItemIdx) { if (!enclosedNavigation) { super.dispatchOutbound(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_BOTTOM); } } if (_local3 != getSelectedItemIndex()) { dispatchUserActivity(); } checkScrollButtons(); } function scrollUp() { var _local3 = getSelectedItemIndex(); if (currentItemIdx > 0) { clearSelection(); currentItemIdx = findNearestEnabledItem(currentItemIdx, -1); highlightItem(currentItemIdx); } else if (firstVisibleItemIdx > 0) { firstVisibleItemIdx--; populateList(); } else if (firstVisibleItemIdx == 0) { if (!enclosedNavigation) { super.dispatchOutbound(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_TOP); } } if (_local3 != getSelectedItemIndex()) { dispatchUserActivity(); } checkScrollButtons(); } function checkScrollButtons() { if (doScroll) { manageScrollButtons((currentItemIdx == -1) || ((firstVisibleItemIdx + currentItemIdx) < (listData.length - 1)), (firstVisibleItemIdx + currentItemIdx) > 0); } } function ensureIndexIsVisible(index) { if ((!doScroll) || (_global.isNaN(index) || ((index < 0) || (index > listData.length)))) { return(undefined); } highlightItem(-1); var _local3 = index - firstVisibleItemIdx; if ((_local3 >= 0) && (_local3 < listSize)) { return(undefined); } firstVisibleItemIdx = Math.min(maxFirstItemIdx, index); populateList(); } function setItemEnabledByIndex(index, value) { if (doScroll) { return(undefined); } if (itemsList[index]) { itemsList[index].setEnabled(value); } } function findNearestEnabledItem(currentIndex, direction) { if (doScroll) { return(currentIndex + direction); } var _local4 = currentIndex + direction; var _local5 = false; while (itemsList[_local4] && (!itemsList[_local4].getEnabled())) { _local4 = _local4 + direction; } if (itemsList[_local4]) { return(_local4); } return(currentIndex); } function manageScrollButtons(showDown, showUp) { if (buttonUp) { buttonUp.setVisible(showUp || (showDown)); buttonUp.setEnabled(showUp); if (!showUp) { buttonUp.setSelected(false); } } if (buttonDown) { buttonDown.setVisible(showUp || (showDown)); buttonDown.setEnabled(showDown); if (!showDown) { buttonDown.setSelected(false); } } } function onKeyUp(overridenCode) { switch (overridenCode || (Key.getCode())) { case Key.LEFT : super.dispatchOutbound(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_LEFT); break; case Key.RIGHT : super.dispatchOutbound(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_RIGHT); break; case Key.DOWN : scrollDown(); break; case Key.UP : scrollUp(); break; case Key.ENTER : setSelected(getSelectedItemIndex()); } } function populateList() { if (!itemsList.length) { build(); } var _local2 = 0; while (_local2 < listSize) { var _local3 = itemsList[_local2]; _local3.setItemIndex(_local2); _local3.setData(listData[firstVisibleItemIdx + _local2]); _local2++; } } function highlightItem(index) { if (_global.isNaN(index) || ((index >= listSize) || (index < -1))) { return(undefined); } if (currentItemIdx != -1) { itemsList[currentItemIdx].setSelected(false); } currentItemIdx = index; if (currentItemIdx != -1) { itemsList[currentItemIdx].setSelected(true); } } function setSelected(index) { broadcast({type:com.google.youtube.tv.view.ui.UIComponentBase.CHANGE, data:listData[index], index:index}); } function clearSelection() { if (currentItemIdx != -1) { itemsList[currentItemIdx].setSelected(false); } } function build() { itemsList = []; var _local2 = 0; for ( ; _local2 < listSize ; _local2++) { var _local3 = createListItem(); _local3.build(width, itemHeight, _local2); positionItem(_local3, _local2); _local3.clip.onPress = com.google.chianti.event.EventDelegate.create(this, onItemClick, _local3); _local3.clip.onRollOver = com.google.chianti.event.EventDelegate.create(this, onItemMouseOver, _local3); _local3.clip.onRollOut = com.google.chianti.event.EventDelegate.create(this, onItemMouseOut, _local3); itemsList.push(_local3); } } function createListItem() { var _local2 = {}; _local2.__proto__ = itemRendererClass.prototype; itemRendererClass.call(_local2, clip); return(com.google.youtube.tv.view.ui.list.ListItem(_local2)); } function positionItem(item, index) { item.setPos(0, (itemHeight * index) + (gap * index)); } function getRendererIndex(renderer) { var _local3 = 0; for ( ; _local3 < itemsList.length ; _local3++) { if (renderer == itemsList[_local3]) { return(_local3); } } return(-1); } function onItemClick(itemRenderer) { dispatchUserActivity(); clickedItemRenderer = itemRenderer; setSelected(getItemIndex(itemRenderer.getData())); } function onItemMouseOver(itemRenderer) { dispatchUserActivity(); if (itemRenderer.getEnabled()) { clearSelection(); currentItemIdx = getRendererIndex(itemRenderer); itemRenderer.setSelected(true); } } function onItemMouseOut(itemRenderer) { dispatchUserActivity(); if (clickedItemRenderer != itemRenderer) { clearSelection(); currentItemIdx = getRendererIndex(itemRenderer); itemRenderer.setSelected(false); } } var currentItemIdx = -1; var clickedItemRenderer = null; var firstVisibleItemIdx = 0; var listSize = 5; var height = 400; var width = 200; var gap = 2; }
Symbol 20556 MovieClip [__Packages.com.google.youtube.tv.tree.WatchLaterNode] Frame 0
class com.google.youtube.tv.tree.WatchLaterNode extends com.google.youtube.tv.tree.PlaylistFeedNode { var getChildrenCount, addItem; function WatchLaterNode (title) { super(title, WATCH_LATER_URL, false, null, true); } function createChildren() { super.createChildren(); if (!getChildrenCount()) { addItem(new com.google.youtube.tv.tree.StaticNode(com.google.youtube.tv.tree.StaticNode.TYPE_WATCH_LATER_UPSELL, com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.WATCH_LATER_EMPTY), com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.WATCH_LATER_INSTRUCTIONS))); } } static var WATCH_LATER_URL = "${gdataUrl}/feeds/api/users/default/watch_later"; }
Symbol 20557 MovieClip [__Packages.com.google.youtube.tv.components.ThumbstripInfoView] Frame 0
class com.google.youtube.tv.components.ThumbstripInfoView extends com.google.youtube.tv.ui.View { var thumbstripLocation, image, clip, titleText, indexText, width; function ThumbstripInfoView (parent, thumbstripLocation) { super(parent, "thumbInfo"); this.thumbstripLocation = thumbstripLocation; thumbstripLocation.addSinkFunction(com.google.chianti.event.EventDelegate.create(this, refresh)); image = new com.google.youtube.tv.ui.Image(clip, new flash.geom.Rectangle(0, 0, IMAGE_SIZE, IMAGE_SIZE)); titleText = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(0, 0, 100, com.google.youtube.tv.ui.Font.getComponentHeight(TITLE_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(TITLE_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); titleText.setAutoTruncate(true); indexText = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(0, INDEX_LINE_TOP, 100, com.google.youtube.tv.ui.Font.getComponentHeight(INDEX_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(INDEX_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); } function setWidth(value) { width = value; refresh(); } function refresh() { if (!width) { return(undefined); } var _local2 = com.google.youtube.tv.tree.ChannelNode(thumbstripLocation.getNode().parent) || (thumbstripLocation.getNode()); var _local3 = _local2 instanceof com.google.youtube.tv.tree.ChannelNode; image.setImage((_local3 ? (com.google.youtube.tv.app.Config.adjustThumbQuality(_local2.getThumbnailUrl(), com.google.youtube.tv.app.Config.CHANNEL_QUALITY_LOW)) : "")); titleText.setPos((_local3 ? (TITLE_X_WITH_IMAGE) : 0), 0); titleText.setText(_local2.getTitle()); var _local4 = com.google.youtube.tv.tree.PlaylistFeedNode(_local2); if (_local4 && ((thumbstripLocation.getValue() instanceof com.google.youtube.tv.tree.VideoNode) && ((thumbstripLocation.getIndex() < _local4.getVideosCount()) && ((_local4.getVideosCount() > 1) && (!_local3))))) { indexText.setVisible(true); indexText.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.X_OF_Y_VIDEOS, {VIDEO_COUNT_1:thumbstripLocation.getIndex() + 1, VIDEO_COUNT_2:_local4.getVideosCount()})); indexText.setWidth(indexText.getWidth()); indexText.setPos(width - indexText.getWidth()); titleText.setWidth(((width - titleText.getPos().y) - indexText.getWidth()) - TITLE_LINE_HEIGHT); } else { indexText.setVisible(false); titleText.setWidth(width - titleText.getPos().y); } image.setPos(0, (titleText.getHeight() / 2) - (IMAGE_SIZE / 2)); } static var IMAGE_SIZE = 44 * com.google.youtube.tv.app.Config.SCALE; static var TITLE_LINE_HEIGHT = 29; static var TITLE_X_WITH_IMAGE = IMAGE_SIZE + (7 * com.google.youtube.tv.app.Config.SCALE); static var INDEX_LINE_TOP = 19 * com.google.youtube.tv.app.Config.SCALE; static var INDEX_LINE_HEIGHT = 14; }
Symbol 20558 MovieClip [__Packages.com.google.utils.EventReporter] Frame 0
class com.google.utils.EventReporter extends com.google.utils.UrlConstructor { var makeUrl; function EventReporter (baseUrl) { super(baseUrl); } function send(args, altBaseUrl) { var _local4 = makeUrl(args); if (altBaseUrl != undefined) { _local4 = altBaseUrl + _local4.substr(_local4.indexOf("?")); } sendUrl(_local4); } function sendUrl(url) { var _local3 = new MovieClipLoader(); var _local4 = _root.createEmptyMovieClip("junkClip", 999999); _local3.loadClip(url, _local4); } }
Symbol 20559 MovieClip [__Packages.com.google.youtube.tv.tree.WatchHistoryNode] Frame 0
class com.google.youtube.tv.tree.WatchHistoryNode extends com.google.youtube.tv.tree.PlaylistFeedNode { var setDeduplicate, loadStarted, loaded, lastLoadTime, checkUpdate, setDataFetcher, fetcher, url, children, needsRefresh, dataChanged, getData, clear; function WatchHistoryNode (title) { super(title, WATCH_HISTORY_URL, false, null, true); setDeduplicate(true); } function loadUpdate() { if (loadStarted || ((!loaded) || ((getTimer() - lastLoadTime) < UPDATE_INTERVAL))) { return(undefined); } loadStarted = true; checkUpdate = true; setDataFetcher(); fetcher.fetch(com.google.youtube.tv.util.StringUtil.addParamsToRequest(url, ["start-index=1", "max-results=5"])); } function recordVideoPlayback(videoId) { if (videoId && (com.google.youtube.tv.tree.VideoNode(children[0]).getVideoId() != videoId)) { needsRefresh = true; } } function getVideosCount() { return(0); } function createChildren() { dataChanged = (!checkUpdate) || (hasDataChanged(getData())); if (dataChanged) { if (checkUpdate) { clear(); } super.createChildren(); } checkUpdate = false; lastLoadTime = getTimer(); } function hasDataChanged(data) { var _local3 = 0; var _local4 = 0; for ( ; (_local3 < children.length) && (_local4 < data.length) ; _local3++ , _local4++) { if (!(children[_local3] instanceof com.google.youtube.tv.tree.VideoNode)) { _local4--; } else if (com.google.youtube.tv.tree.VideoNode(children[_local3]).getVideoId() != data[_local4].videoId) { return(true); } } return(false); } function notify() { if (dataChanged) { super.notify(); } } static var UPDATE_INTERVAL = 2000; static var WATCH_HISTORY_URL = "${gdataUrl}/feeds/api/users/default/watch_history"; }
Symbol 20560 MovieClip [__Packages.com.google.youtube.tv.view.ui.list.SuggestionListItem] Frame 0
class com.google.youtube.tv.view.ui.list.SuggestionListItem extends com.google.youtube.tv.view.ui.list.ListItem { var button, clip, width, height, itemRendererIndex, data; function SuggestionListItem (parent) { super(parent); } function setSelected(value) { button.setIsActive(value); } function createChildren() { button = new com.google.youtube.tv.view.ui.SuggestionButton(clip, width, height); button.setUsingKeys(false); button.setTip(String(itemRendererIndex + 1)); } function updateChildren() { button.setText(data.text); } }
Symbol 20561 MovieClip [__Packages.com.google.youtube.tv.services.StrongAuthService] Frame 0
class com.google.youtube.tv.services.StrongAuthService extends com.google.chianti.event.EventBroadcaster { static var instance; var registerWhenPossible, canReset, storage, stats, fetchSuccesses, fetchErrors, broadcast, isReady, deviceId, deviceKey, errorCode, status, httpStatus, deadlineTimeout, deviceSerial, loader, sender; function StrongAuthService () { super(); com.google.chianti.event.EventBroadcaster.initialize(this); } function init() { registerWhenPossible = true; canReset = true; storage = com.google.youtube.tv.services.StorageService.get(); stats = com.google.youtube.tv.services.StatsLoggerService.getInstance(); start(); storage.registerEvent(com.google.youtube.tv.services.StorageService.STORAGE_READY, com.google.chianti.event.EventDelegate.create(this, onStorageReady)); } static function getInstance() { if (!instance) { instance = new com.google.youtube.tv.services.StrongAuthService(); } return(instance); } function addHeaders(lv, url) { lv.addRequestHeader(HEADER_NAME, getHeaderValue(url)); } function addHeadersToXml(xml, url) { xml.addRequestHeader(HEADER_NAME, getHeaderValue(url)); } function recordFetchResult(success) { if (success) { fetchSuccesses++; fetchErrors = 0; } else { fetchErrors++; if (fetchErrors == FETCH_ERRORS_THRESHOLD) { broadcast({type:CONNECTION_FAILURE}); if ((!fetchSuccesses) && (isReady)) { restart(); } } } } function restart() { if (canReset) { deviceId = null; deviceKey = null; storage.setValueWithoutFlush(com.google.youtube.tv.services.StorageService.DEVICE_ID, null); storage.setValueWithoutFlush(com.google.youtube.tv.services.StorageService.DEVICE_KEY, null); storage.setValue(com.google.youtube.tv.services.StorageService.DEVICE_KEY_NON_MONETIZABLE, null); start(); canReset = false; } } function start() { isReady = false; errorCode = NO_ERROR; status = NO_STATUS; httpStatus = 0; fetchSuccesses = 0; fetchErrors = 0; clearDeadlineTimeout(); deadlineTimeout = _global.setTimeout(com.google.chianti.event.EventDelegate.create(this, onDeadline), DEADLINE_TIME); initCrypto(); if (storage.isReady()) { onStorageReady(); } } function clearDeadlineTimeout() { if (deadlineTimeout) { _global.clearTimeout(deadlineTimeout); deadlineTimeout = 0; } } function getHeaderValue(url) { var _local3 = url.substring(url.indexOf(".com/") + 4); var _local4 = getHeaderDigest(_local3); return(((("device-id=\"" + deviceId) + "\", data=\"") + _local4) + "\""); } function getHeaderDigest(url) { return(com.google.youtube.tv.util.Crypto.hmacSha1Encrypt(deviceKey, url)); } function initCrypto() { com.google.youtube.tv.util.Crypto.setAesKey(com.google.youtube.tv.util.Crypto.decode(V0)); status = status | STATUS_CRYPTO_READY; } function onStorageReady() { if (status & STATUS_STORAGE_READY) { return(undefined); } status = status | STATUS_STORAGE_READY; deviceSerial = storage.getUuid(); if (!deviceSerial) { onFail(ERROR_UUID); } else { deviceId = storage.getValue(com.google.youtube.tv.services.StorageService.DEVICE_ID); deviceKey = storage.getValue(com.google.youtube.tv.services.StorageService.DEVICE_KEY).split("."); if (deviceId && (deviceKey && (storage.getValue(com.google.youtube.tv.services.StorageService.DEVICE_KEY_NON_MONETIZABLE)))) { restart(); } else { checkRegistration(); } } } function checkRegistration() { if (isReady) { return(undefined); } if (deviceId && (deviceKey)) { onAuthCompleted(); } else if (registerWhenPossible && (status & STATUS_STORAGE_READY)) { performDeviceRegistration(); } } function performDeviceRegistration() { status = status | STATUS_REGISTRATION_SENT; loader = new LoadVars(); loader.onHTTPStatus = com.google.chianti.event.EventDelegate.create(this, onHttpStatus); loader.onData = com.google.chianti.event.EventDelegate.create(this, onData); sender = new LoadVars(); sender.developer = com.google.youtube.tv.app.Config.DEV_KEY; sender.serialNumber = deviceSerial; sender.sendAndLoad(com.google.youtube.tv.util.StringUtil.replacePlaceholders("https://gdata.youtube.com/youtube/accounts/registerDevice?" + "model=${model}&vendor=${vendor}"), loader, "POST"); } function clearLoaders() { if (loader) { loader.onData = null; loader.onHTTPStatus = null; loader = null; } sender = null; } function onAuthCompleted() { clearLoaders(); clearDeadlineTimeout(); isReady = true; errorCode = NO_ERROR; broadcast({type:READY}); } function onFail(value) { if ((!errorCode) && (!isReady)) { clearLoaders(); clearDeadlineTimeout(); errorCode = value || (ERROR_UNKNOWN); broadcast({type:FAIL, errorCode:errorCode}); stats.sendStrongAuthError(errorCode, status, httpStatus); } } function onHttpStatus(httpStatus) { this.httpStatus = httpStatus; if (httpStatus >= 400) { onFail(ERROR_ACCESS); } } function onData(src) { status = status | STATUS_RESPONSE_RECEIVED; if (!src) { onFail(ERROR_REGISTRATION); return(undefined); } var _local3 = src.split(newline); var _local5 = 0; for ( ; _local5 < _local3.length ; _local5++) { var _local6 = _local3[_local5].substring(0, _local3[_local5].indexOf("=")); var _local7 = _local3[_local5].substring(_local6.length + 1); switch (_local6) { case "DeviceId" : deviceId = _local7; break; case "DeviceKey" : var _local4 = _local7; } } deviceKey = com.google.youtube.tv.util.Crypto.aesDecrypt(_local4).slice(0, 20); if ((!deviceId) || (deviceKey.length != 20)) { deviceId = null; deviceKey = null; onFail(ERROR_UNKNOWN); } else { storage.setValueWithoutFlush(com.google.youtube.tv.services.StorageService.DEVICE_ID, deviceId); storage.setValueWithoutFlush(com.google.youtube.tv.services.StorageService.DEVICE_KEY, deviceKey.join(".")); storage.setValue(com.google.youtube.tv.services.StorageService.DEVICE_KEY_NON_MONETIZABLE, null); onAuthCompleted(); } } function onDeadline() { onFail(ERROR_TIMEOUT); } static var CONNECTION_FAILURE = "CONNECTION_FAILURE"; static var FAIL = "FAIL"; static var READY = "READY"; static var NO_ERROR = 0; static var ERROR_UNKNOWN = 1; static var ERROR_TIMEOUT = 2; static var ERROR_ACCESS = 3; static var ERROR_REGISTRATION = 4; static var ERROR_UUID = 5; static var NO_STATUS = 0; static var STATUS_STORAGE_READY = 1 << 0; static var STATUS_CRYPTO_READY = 1 << 2; static var STATUS_REGISTRATION_SENT = 1 << 3; static var STATUS_RESPONSE_RECEIVED = 1 << 4; static var HEADER_NAME = "X-GData-Device"; static var FETCH_ERRORS_THRESHOLD = 3; static var V0 = "a6/wI=;i9mxX/X28+j:^Eh;@"; static var DEADLINE_TIME = 20 * 1000; }
Symbol 20562 MovieClip [__Packages.com.google.youtube.tv.views.WatchLaterThumbnail] Frame 0
class com.google.youtube.tv.views.WatchLaterThumbnail extends com.google.youtube.tv.views.BaseThumbnail { var titleView, clip, icon, subtitleView, scheduler, width, height, title, subtitle, setSize; function WatchLaterThumbnail (parent) { super(parent, "watchLaterThumbnail", WIDTH); titleView = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(PADDING, PADDING, TITLE_WIDTH, com.google.youtube.tv.ui.Font.getComponentHeight(TITLE_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(TITLE_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); titleView.setMultiline(true); titleView.setAutoSize(true); icon = new com.google.youtube.tv.ui.Symbol(clip, "watchLaterIcon", false); subtitleView = new com.google.youtube.tv.ui.Text(clip, null, com.google.youtube.tv.ui.Font.getFontSizeForHeight(SUBTITLE_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); subtitleView.setMultiline(true); scheduler = com.google.youtube.util.Scheduler.setTimeout(100, com.google.chianti.event.EventDelegate.create(this, align)); scheduler.stop(); } function drawBackground() { com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, width, height, 0, 0, 0, com.google.youtube.tv.ui.Colors.BLACK, BACKGROUND_ALPHA); } function setLabels(title, subtitle) { if ((this.title == title) && (this.subtitle == subtitle)) { return(undefined); } this.title = title; this.subtitle = subtitle; titleView.setText(title); subtitleView.setText(subtitle); titleView.setVisible(false); subtitleView.setVisible(false); icon.setVisible(false); scheduler.restart(); } function align() { titleView.setVisible(true); subtitleView.setVisible(true); icon.setVisible(true); clip._visible = true; icon.setPos(PADDING, (titleView.getPos().y + titleView.getHeight()) + ICON_TITLE_GAP); subtitleView.setPos((icon.getPos().x + icon.getWidth()) + PADDING, (titleView.getPos().y + titleView.getHeight()) + SUBTITLE_TITLE_GAP); subtitleView.setWidth((TITLE_WIDTH - icon.getWidth()) - PADDING); setSize(WIDTH, Math.max(icon.getPos().y + icon.getHeight(), subtitleView.getPos().y + subtitleView.getHeight()) + PADDING); } function getClassName() { return(WATCH_LATER_THUMBNAIL); } function toString() { return(" <WatchLaterThumbnail /> "); } static var WATCH_LATER_THUMBNAIL = "com.google.youtube.tv.views.WatchLaterThumbnail"; static var WIDTH = 850 * com.google.youtube.tv.app.Config.SCALE; static var PADDING = 40 * com.google.youtube.tv.app.Config.SCALE; static var BACKGROUND_ALPHA = 50; static var TITLE_WIDTH = WIDTH - (2 * PADDING); static var TITLE_LINE_HEIGHT = 27; static var SUBTITLE_LINE_HEIGHT = 17; static var ICON_TITLE_GAP = 15 * com.google.youtube.tv.app.Config.SCALE; static var SUBTITLE_TITLE_GAP = 20 * com.google.youtube.tv.app.Config.SCALE; }
Symbol 20563 MovieClip [__Packages.com.google.youtube.tv.osk.transliteration.ITransliterator] Frame 0
class com.google.youtube.tv.osk.transliteration.ITransliterator { function ITransliterator () { } }
Symbol 20564 MovieClip [__Packages.com.google.youtube.tv.osk.transliteration.SinglePartTransliterator] Frame 0
class com.google.youtube.tv.osk.transliteration.SinglePartTransliterator implements com.google.youtube.tv.osk.transliteration.ITransliterator { var field, suggestionIndex, item, offset, suggestion, startPosition, textToProcess, size, endPosition, selection; function SinglePartTransliterator () { } function highlight(sourceField, startFrom, item, suggestionIndex) { field = sourceField; this.suggestionIndex = suggestionIndex; this.item = item; offset = startFrom; suggestion = item.suggestions[suggestionIndex]; startPosition = factor + offset; textToProcess = field.text.substring(startPosition, field.text.length); size = ((suggestion.size == -1) ? (textToProcess.length) : (suggestion.size)); endPosition = size + startPosition; selection = textToProcess.substring(0, size); replaceTextInField(startPosition, endPosition, ("<u>" + selection) + "</u>"); } function apply() { if (!field) { return(false); } replaceTextInField(startPosition, endPosition, suggestion.text); if (!textToProcess.substring(endPosition - offset, textToProcess.length).length) { reset(); return(false); } factor = factor + suggestion.text.length; return(true); } function reset() { factor = 0; field = null; } function getType() { return(TYPE); } function replaceTextInField(start, end, replacement) { field.htmlText = field.text; field.replaceText(start, end, replacement); field.htmlText = ((("<font face='" + com.google.youtube.tv.platform.Box.getInternationalFontName()) + "'>") + field.text) + "</font>"; } static var TYPE = "SINGLE"; var factor = 0; }
Symbol 20565 MovieClip [__Packages.com.google.youtube.tv.osk.transliteration.MultiPartTransliterator] Frame 0
class com.google.youtube.tv.osk.transliteration.MultiPartTransliterator extends com.google.youtube.tv.osk.transliteration.SinglePartTransliterator implements com.google.youtube.tv.osk.transliteration.ITransliterator { var field, suggestionIndex, item, offset, suggestion, startPosition, endPosition, textToProcess, selection, replaceTextInField; function MultiPartTransliterator () { super(); } static function setupItemsBounds(sourceField, items, startOffset) { var _local5 = 0; for ( ; _local5 < items.length ; _local5++) { items[_local5].startPosition = ((_local5 == 0) ? (startOffset) : (items[_local5 - 1].endPosition)); items[_local5].endPosition = items[_local5].startPosition + items[_local5].text.length; } } function highlight(sourceField, startFrom, item, suggestionIndex) { field = sourceField; this.suggestionIndex = suggestionIndex; this.item = item; offset = startFrom; suggestion = item.suggestions[suggestionIndex]; startPosition = item.startPosition; endPosition = item.endPosition; textToProcess = (selection = item.text); replaceTextInField(startPosition, endPosition, ("<u>" + selection) + "</u>"); apply(); } function apply() { if (!field) { return(false); } replaceTextInField(startPosition, endPosition, ("<u>" + suggestion.text) + "</u>"); item.text = suggestion.text; return(false); } function getType() { return(TYPE); } static var TYPE = "MULTI"; }
Symbol 20566 MovieClip [__Packages.com.google.youtube.tv.util.StringUtil] Frame 0
class com.google.youtube.tv.util.StringUtil { static var whitespaceMap; function StringUtil () { } static function trim(s) { return(ltrim(rtrim(s))); } static function rtrim(s) { initTrim(); var _local3 = s.length; while (_local3--) { if (!whitespaceMap[s.charAt(_local3)]) { return(s.substring(0, _local3 + 1)); } } return(""); } static function ltrim(s) { initTrim(); var _local3 = -1; var _local4 = s.length; while ((_local3++) < _local4) { if (!whitespaceMap[s.charAt(_local3)]) { return(s.substring(_local3)); } } return(""); } static function initTrim() { if (whitespaceMap) { return(undefined); } whitespaceMap = {}; var _local2 = 1; for ( ; _local2 < 33 ; _local2++) { whitespaceMap[String.fromCharCode(_local2)] = true; } var _local3 = [133, 160, 5760, 6158, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288, 65279]; var _local4 = 0; for ( ; _local4 < _local3.length ; _local4++) { whitespaceMap[String.fromCharCode(_local3[_local4])] = true; } } static function dateToString(dateStr) { var _local3 = ""; if (!_global.isNaN(dateStr)) { var _local4 = new Date(Number(dateStr) * 1000); _local3 = _local3 + (((_local4.getMonth() + 1) < 10) ? "0" : ""); _local3 = _local3 + ((_local4.getMonth() + 1) + "/"); _local3 = _local3 + ((_local4.getDate() < 10) ? "0" : ""); _local3 = _local3 + (_local4.getDate() + "/"); _local3 = _local3 + String(_local4.getFullYear()).substr(-2); } else if ((dateStr.indexOf("T") != -1) && (dateStr.indexOf("-") != -1)) { var _local5 = dateStr.split("T")[0].split("-"); _local3 = (((_local5[1] + "/") + _local5[2]) + "/") + _local5[0].substr(2); } else if (dateStr) { _local3 = dateStr; } return(_local3); } static function formatNumberString(value, opt_separator) { var _local4 = ""; var _local5 = value.toString().length; var _local6 = opt_separator || ","; var _local7 = 0; for ( ; _local7 < _local5 ; _local7++) { if ((((_local5 - _local7) % 3) == 0) && (_local7 != 0)) { _local4 = _local4 + _local6; } _local4 = _local4 + value.toString().charAt(_local7); } return(_local4); } static function formatDecimal(value) { value = Math.round(value * 100) / 100; var _local3 = String(value); var _local4 = _local3.indexOf("."); if (_local4 == -1) { _local3 = _local3 + ".00"; } else if ((_local3.length - _local4) == 2) { _local3 = _local3 + "0"; } return(_local3); } static function addParamsToRequest(url, params) { while (params.length) { var _local4 = String(params.shift()); var _local5 = _local4.substr(0, _local4.indexOf("=") + 1); var _local6 = _local4.substr(_local4.indexOf("=") + 1); if ((url.indexOf("?" + _local5) < 0) && (url.indexOf("&" + _local5) < 0)) { url = url + ((((url.indexOf("?") != -1) ? "&" : "?") + _local5) + encodeUriComponent(_local6)); } } return(url); } static function applyProtocol(uri, useSsl) { if ((useSsl && (uri.indexOf("https") == 0)) || ((!useSsl) && (uri.indexOf("http") == 0))) { return(uri); } var _local4 = uri.split("//"); if (String(_root._url).substring(0, 5) == "https") { useSsl = true; } var _local5 = (useSsl ? "https" : "http") + ":"; if (_local4.length < 2) { _local4.unshift(_local5); } else { _local4[0] = _local5; } return(_local4.join("//")); } static function getSerializedListsDiff(current, update, delimeter) { var _local5 = {removed:[], added:[]}; delimeter = delimeter || ","; var _local6 = current.split(delimeter); var _local7 = update.split(delimeter); var _local8 = {}; for (var _local9 in _local6) { var _local10 = _local6[_local9]; _local8[_local10] = true; } for (var _local9 in _local7) { var _local10 = _local7[_local9]; if (_local8[_local10]) { delete _local8[_local10]; } else { _local5.added.push(_local10); } } for (var key in _local8) { _local5.removed.push(key); } return(_local5); } static function decodeXmlEntities(value) { if (value.indexOf("&") == -1) { return(value); } return(value.split("&quot;").join("\"").split("&#34;").join("\"").split("&apos;").join("'").split("&#39;").join("'").split("&gt;").join(">").split("&#62;").join(">").split("&lt;").join("<").split("&#60;").join("<").split("&amp;").join("&").split("&#38;").join("&")); } static function replacePlaceholders(str, dict) { if (!str) { return(""); } var _local4 = str.indexOf("${"); var _local5 = str.indexOf("}", _local4); if ((_local4 != -1) && (_local5 != -1)) { var _local6 = str.substring(_local4 + 2, _local5); var _local7 = str.substring(_local4, _local5 + 1); var _local8 = dict[_local6].toString() || (commonPlaceholders[_local6] || ""); var _local9 = (commonPlaceholders.hasOwnProperty(_local6) ? (_local8) : (encodeUriComponent(_local8))); str = str.split(_local7).join(_local9); if (str.indexOf("${") != -1) { return(replacePlaceholders(str, dict)); } } return(str); } static function encodeUriComponent(value) { if (!value) { return(""); } var _local3 = []; var _local4 = 0; for ( ; _local4 < value.length ; _local4++) { var _local5 = value.charCodeAt(_local4); var _local6 = value.charAt(_local4); if (isAlpha(_local5) || (isDigit(_local5) || (URI_UNRESERVED_CHARACTERS.indexOf(_local6) > -1))) { _local3.push(_local6); } else { _local3.push(_global.escape(_local6)); } } return(_local3.join("")); } static function isDigit(ascii) { return((ascii > 47) && (ascii < 58)); } static function isAlpha(ascii) { return(((ascii > 64) && (ascii < 91)) || ((ascii > 96) && (ascii < 123))); } static function encodeHtml(value) { return(com.google.chianti.utils.StringUtil.htmlEncode(value)); } static function addCommonPlaceholder(name, value) { commonPlaceholders[name] = value; } static function toCamelCase(string) { var _local3 = string.toLowerCase().split(" "); var _local4 = 0; for ( ; _local4 < _local3.length ; _local4++) { _local3[_local4] = _local3[_local4].substring(0, 1).toUpperCase() + _local3[_local4].substring(1); } return(_local3.join(" ")); } static var URI_UNRESERVED_CHARACTERS = "-_.~"; static var commonPlaceholders = {}; }
Symbol 20567 MovieClip [__Packages.com.google.youtube.tv.components.PreloadComponent] Frame 0
class com.google.youtube.tv.components.PreloadComponent extends com.google.youtube.tv.components.BaseComponent { var parent, scheduler; function PreloadComponent (parent) { super(parent, "preload"); this.parent = parent; } function needsBackground() { return(false); } function advanceProgressBar() { setProgress(progress + PROGRESS_STEP); } function setProgress(value) { if (!value) { return(undefined); } progress = Math.max(PROGRESS_START, Math.min(PROGRESS_FINISH, value)); parent.setProgress(progress); } function deactivate() { super.deactivate(); parent.hideProgress(); scheduler.stop(); } function toString() { return("PreloadComponent"); } static var PROGRESS_START = 50; static var PROGRESS_STEP = 10; static var PROGRESS_FINISH = 100; var progress = PROGRESS_START; }
Symbol 20568 MovieClip [__Packages.com.google.youtube.tv.components.SearchComponent] Frame 0
class com.google.youtube.tv.components.SearchComponent extends com.google.youtube.tv.components.BaseComponent { var clip, keyboard, language, transliteration, statsLogger, layoutController, savedInput, resultsSuggestionsTimer, search, pop, loadSearchResultsDelegate, searchCompleteHandler; function SearchComponent (parent) { super(parent, "search"); } function build() { searchView = new com.google.youtube.tv.view.SearchComponentView(clip); keyboard = searchView.getKeyboard(); language = keyboard.getLanguage(); transliteration = new com.google.youtube.tv.osk.transliteration.Transliteration(); statsLogger = com.google.youtube.tv.services.StatsLoggerService.getInstance(); layoutController = com.google.youtube.tv.osk.layout.LayoutController.getInstance(); transliteration.registerEvent(com.google.youtube.tv.osk.transliteration.Transliteration.ACTIVATE, com.google.chianti.event.EventDelegate.create(this, onTransliterationActivated)); transliteration.registerEvent(com.google.youtube.tv.osk.transliteration.Transliteration.UPDATE_LIST, com.google.chianti.event.EventDelegate.create(this, onUpdateTransliterationSuggestions)); transliteration.registerEvent(com.google.youtube.tv.osk.transliteration.Transliteration.COMPLETE, com.google.chianti.event.EventDelegate.create(this, onTransliterationDone)); keyboard.registerEvent(com.google.youtube.tv.osk.AbstractOnScreenKeyboard.BACKSPACE_PRESSED, com.google.chianti.event.EventDelegate.create(this, onBackspacePressed)); keyboard.registerEvent(com.google.youtube.tv.osk.AbstractOnScreenKeyboard.CANCEL_PRESSED, com.google.chianti.event.EventDelegate.create(this, onCancelPressed)); keyboard.registerEvent(com.google.youtube.tv.osk.AbstractOnScreenKeyboard.CLEAR_PRESSED, com.google.chianti.event.EventDelegate.create(this, onClearPressed)); keyboard.registerEvent(com.google.youtube.tv.osk.AbstractOnScreenKeyboard.KEY_PRESSED, com.google.chianti.event.EventDelegate.create(this, onKeyPressed)); keyboard.registerEvent(com.google.youtube.tv.osk.AbstractOnScreenKeyboard.LANGUAGE_CHANGE, com.google.chianti.event.EventDelegate.create(this, onKeyboardLangChanged)); keyboard.registerEvent(com.google.youtube.tv.osk.AbstractOnScreenKeyboard.NAVIGATION_KEY_PRESSED, com.google.chianti.event.EventDelegate.create(this, onNavigationKeyPressed)); keyboard.registerEvent(com.google.youtube.tv.osk.AbstractOnScreenKeyboard.TRANSLITERATE_PRESSED, com.google.chianti.event.EventDelegate.create(this, onTransliteratePressed)); searchView.getHDToggle().registerEvent(com.google.youtube.tv.view.ui.Toggle.TOGGLE_CHANGE, com.google.chianti.event.EventDelegate.create(this, onHDToggleChange)); listedToOutbound(keyboard, {right:true, bottom:true}); listedToOutbound(searchView.getHDToggle(), {left:true, bottom:true}); } function activate() { if (!searchView) { build(); } searchView.show(); updateViewOverlays(); overtakeNavigation = false; statsLogger.sendSearchInitMessage(); } function deactivate() { searchView.hide(); cancelTransliteration(); cancelResultsSuggestionsTimer(); statsLogger.sendSearchOutcomeMessage("BACK"); } function runSearch(query) { query = query.toUpperCase(); searchView.setText(query); loadSearchResults(query); } function handleKey(keyCode) { if ((keyCode < 0) || (!transliterationActive)) { return(false); } if (((keyCode == Key.RIGHT) || (keyCode == Key.LEFT)) && (overtakeNavigation)) { transliteration.changeCurrentMultiPartItem(((keyCode == Key.LEFT) ? -1 : 1)); return(true); } var _local3 = int(String.fromCharCode(keyCode)); switch (_local3) { case 1 : case 2 : case 3 : case 4 : var _local4 = searchView.getSuggestionsList().getItemIndexScrollFactor(); transliteration.highlightStringForSuggestion((_local4 + _local3) - 1); return(true); } return(false); } function isNumpadHandled() { return(true); } function onKeyPressed(event) { if (searchView.getSuggestionsList().isVisible()) { cancelTransliteration(); return(undefined); } searchView.setText(transformText(event.value)); if ((event.value == " ") && (transliterationActive && (keyboard.getCurrentLocale() != "ja"))) { searchView.setText(searchView.getText().substr(0, searchView.getText().length - 1)); activateTransliteration(); return(undefined); } savedInput = searchView.getText(); overtakeNavigation = false; if (event.value != " ") { setResultsSuggestionsTimer(); setTransliteration(); } else { transliterationActive = false; } if (keyboard.getCurrentLocale() == "en") { inputOffset = searchView.getSearchField().text.length; } if (event.hardware) { statsLogger.sendSearchHardwareKeyPressMessage(); } } function activateTransliteration() { transliteration.transliterate(); overtakeNavigation = true; cancelResultsSuggestionsTimer(); } function setTransliteration() { if (transliterationActive) { return(undefined); } if (!com.google.youtube.tv.osk.transliteration.Transliteration.isLanguageSupported(keyboard.getCurrentLocale())) { return(undefined); } transliteration.setSourceFieldWithLang(searchView.getSearchField(), keyboard.getCurrentLocale()); transliterationActive = true; cancelResultsSuggestionsTimer(); updateViewOverlays(); searchView.getResultList().clear(); } function transformText(letter) { var _local3 = searchView.getText() + letter; if (language.LANG_CODE != keyboard.getCurrentLocale()) { return(_local3); } return(applyLanguageTransformation(_local3)); } function onBackspacePressed(event) { if (searchView.getSuggestionsList().isVisible()) { cancelTransliteration(); return(undefined); } cancelResultsSuggestionsTimer(); searchView.setText(searchView.getText().substr(0, searchView.getText().length - 1)); if (inputOffset > searchView.getText().length) { inputOffset = searchView.getText().length; } if (searchView.getText().length) { setResultsSuggestionsTimer(); } else { statsLogger.sendSearchQueryMessage(0, keyboard.getCurrentLocale()); } } function onTransliteratePressed(event) { if (transliterationActive) { searchView.setText(transformText(" ")); searchView.setText(searchView.getText().substr(0, searchView.getText().length - 1)); activateTransliteration(); } } function onNavigationKeyPressed() { if (resultsSuggestionsTimer.isRunning()) { resultsSuggestionsTimer.restart(); } statsLogger.sendSearchKeyPressMessage(); } function onClearPressed(event) { clear(); } function clear() { cancelResultsSuggestionsTimer(); searchView.setText(""); cancelTransliteration(); inputOffset = 0; statsLogger.sendSearchQueryMessage(0, keyboard.getCurrentLocale()); search.clear(true); updateInfoText(); updateViewOverlays(); } function onCancelPressed(event) { statsLogger.sendSearchOutcomeMessage("CANCEL"); cancelTransliteration(); pop(); } function listedToOutbound(component, opt) { if (opt.bottom) { component.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_BOTTOM, com.google.chianti.event.EventDelegate.create(this, switchToComponent)); } if (opt.left) { component.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_LEFT, com.google.chianti.event.EventDelegate.create(this, switchToComponent)); } if (opt.right) { component.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_RIGHT, com.google.chianti.event.EventDelegate.create(this, switchToComponent)); } if (opt.top) { component.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_TOP, com.google.chianti.event.EventDelegate.create(this, switchToComponent)); } } function switchToComponent(event) { switch (event.target) { case keyboard : if (event.type == com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_RIGHT) { if (searchView.getResultList().getData().length) { searchView.activateComponent(searchView.getResultList()); } else if (searchView.getPairingUpsellVisible()) { searchView.activateComponent(searchView.getPairingUpsell()); } else { searchView.activateComponent(searchView.getHDToggle()); } } if ((event.type == com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_BOTTOM) && (searchView.getSuggestionsList().getData().length)) { overtakeNavigation = true; searchView.activateComponent(searchView.getSuggestionsList()); } break; case searchView.getResultList() : case searchView.getPairingUpsell() : if (event.type == com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_TOP) { searchView.activateComponent(searchView.getHDToggle()); } else { searchView.activateComponent(keyboard); } break; case searchView.getSuggestionsList() : overtakeNavigation = false; searchView.activateComponent(keyboard); break; case searchView.getHDToggle() : if ((event.type == com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_BOTTOM) && (searchView.getResultList().getData().length)) { searchView.activateComponent(searchView.getResultList()); } else if ((event.type == com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_BOTTOM) && (searchView.getPairingUpsellVisible())) { searchView.activateComponent(searchView.getPairingUpsell()); } else { if (event.type != com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_LEFT) { break; } searchView.activateComponent(keyboard); } } } function setResultsSuggestionsTimer() { deprecateRunningSearch(); cancelResultsSuggestionsTimer(); searchView.activateComponent(keyboard); searchView.getResultList().clear(); updateInfoText(); if (!loadSearchResultsDelegate) { loadSearchResultsDelegate = com.google.chianti.event.EventDelegate.create(this, loadSearchResults); } if (!resultsSuggestionsTimer) { resultsSuggestionsTimer = com.google.youtube.util.Scheduler.setTimeout(3000, loadSearchResultsDelegate); } resultsSuggestionsTimer.restart(); } function deprecateRunningSearch() { if (search) { search.unregisterEvent(com.google.youtube.tv.tree.SearchNode.SEARCH_COMPLETE, searchCompleteHandler); } search = null; } function cancelResultsSuggestionsTimer() { resultsSuggestionsTimer.stop(); } function loadSearchResults(query) { if (searchView.getText().length) { deprecateRunningSearch(); search = new com.google.youtube.tv.tree.SearchNode(); if (!searchCompleteHandler) { searchCompleteHandler = com.google.chianti.event.EventDelegate.create(this, onSearchComplete); } search.registerEvent(com.google.youtube.tv.tree.SearchNode.SEARCH_COMPLETE, searchCompleteHandler); search.search(searchView.getText(), searchView.getHDToggle().getSelectedIndex() == 1); updateInfoText(); updateViewOverlays(); } statsLogger.sendSearchQueryMessage(searchView.getText().length, keyboard.getCurrentLocale()); } function updateInfoText() { var _local2 = ""; if (search.isLoaded() && (!search.getChildrenCount())) { _local2 = com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.NO_RESULTS); } else if (search.isLoaded()) { _local2 = com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.SEARCH_RESULT_FOR, {QUERY:searchView.getText()}); } else if (search.isLoading()) { _local2 = com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.LOADING); } searchView.getInfoText().setText(_local2); } function onListChange(event) { if (event.data) { statsLogger.sendSearchOutcomeMessage("SELECT-" + event.index); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.SEARCH_COMPLETE, {playlist:search, index:event.index})); } } function onTransliterationListChange(event) { if (event.data) { applyTransliteration(); } } function onTransliterationListSelectionChange(event) { var _local3 = searchView.getSuggestionsList().getSelectedItemIndex(); if (_local3 > -1) { transliteration.highlightStringForSuggestion(_local3); } } function onHDToggleChange(event) { loadSearchResults(searchView.getText()); } function onSearchComplete(event) { if (searchView.buildResultsList()) { searchView.getResultList().registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.CHANGE, com.google.chianti.event.EventDelegate.create(this, onListChange)); listedToOutbound(searchView.getResultList(), {left:true, top:true}); } searchView.getResultList().setData(search.getChildren()); updateViewOverlays(); updateInfoText(); } function onKeyboardLangChanged(event) { searchView.getResultList().clear(); updateViewOverlays(); cancelTransliteration(); } function applyTransliteration() { transliteration.applySuggestion(); } function updateViewOverlays() { var _local2 = keyboard.getCurrentLocale(); var _local3 = !searchView.getResultList().getData().length; var _local4 = ((_local2 == "zh") || (_local2 == "ja")) && (_local3); searchView.setHelpVisible(_local4, _local2 == "zh"); searchView.setPairingUpsellVisible(_local3 && ((!_local4) && (!search.isLoading()))); if ((!pairingUpsellRegistered) && (searchView.getPairingUpsell())) { listedToOutbound(searchView.getPairingUpsell(), {left:true, top:true}); pairingUpsellRegistered = true; } } function cancelTransliteration() { overtakeNavigation = false; transliterationActive = false; if (!searchView.getSuggestionsList().isVisible()) { return(undefined); } if (savedInput.length > 0) { searchView.getSearchField().text = savedInput; savedInput = ""; } transliteration.cancel(); clearAndDeactivateTransliterationSuggestions(); } function clearAndDeactivateTransliterationSuggestions() { searchView.clearSuggestionsList(); searchView.activateComponent(keyboard); setResultsSuggestionsTimer(); } function onTransliterationDone(event) { transliterationActive = false; overtakeNavigation = false; if (keyboard.getCurrentLocale() != "ja") { searchView.setText(searchView.getText() + " "); } else { searchView.getSearchField().text = searchView.getText(); } clearAndDeactivateTransliterationSuggestions(); } function onTransliterationActivated(event) { searchView.activateComponent(searchView.getSuggestionsList()); if (event.index) { searchView.getSuggestionsList().setSelectedIndex(event.index); } } function onUpdateTransliterationSuggestions(event) { if (searchView.buildTransliterationView()) { listedToOutbound(searchView.getSuggestionsList(), {top:true}); searchView.getSuggestionsList().registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.CHANGE, com.google.chianti.event.EventDelegate.create(this, onTransliterationListChange)); searchView.getSuggestionsList().registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.USER_ACTIVITY, com.google.chianti.event.EventDelegate.create(this, onTransliterationListSelectionChange)); } searchView.clearSuggestionsList(); searchView.updateSuggestionsList(event.data); } function applyLanguageTransformation(input) { var _local3 = input.substring(inputOffset); return(input.substr(0, inputOffset) + language.keyboardTransform(_local3)); } function clearHtmlFormatting() { searchView.setText(searchView.getText(), true); } function toString() { return("SearchComponent"); } var searchView = null; var inputOffset = 0; var transliterationActive = false; var overtakeNavigation = false; var pairingUpsellRegistered = false; }
Symbol 20569 MovieClip [__Packages.com.google.youtube.tv.components.AddToPlaylistComponent] Frame 0
class com.google.youtube.tv.components.AddToPlaylistComponent extends com.google.youtube.tv.components.DialogBase { var backButton, playlistsList, videoId, initialized, pop, content, clip, title, subtitle, up, down; function AddToPlaylistComponent (parent) { super(parent); } function handleKey(keyCode) { if (keyCode == Key.DOWN) { if (backButton.getIsActive()) { select(playlistsList); return(true); } } return(super.handleKey(keyCode)); } function activate() { super.activate(); select(playlistsList); } function deactivate() { select(null); super.deactivate(); } function setData(videoId, userPlaylists) { this.videoId = videoId; playlistsList.setData(userPlaylists); playlistsList.setSelectedIndex(0); updateSubtitle(); } function build() { if (initialized) { return(undefined); } super.build(); backButton.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, pop)); content = new com.google.youtube.tv.ui.View(clip, "content"); title = new com.google.youtube.tv.ui.Text(content.clip, new flash.geom.Rectangle(0, 0, TITLE_WIDTH, com.google.youtube.tv.ui.Font.getComponentHeight(TITLE_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(TITLE_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); title.setAutoSize(false); title.setAutoTruncate(true); title.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.ADD_TO_PLAYLIST_QUESTION)); subtitle = new com.google.youtube.tv.ui.Text(content.clip, new flash.geom.Rectangle(SUBTITLE_X, SUBTITLE_Y, SUBTITLE_WIDTH, com.google.youtube.tv.ui.Font.getComponentHeight(SUBTITLE_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(SUBTITLE_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); subtitle.setAutoSize(false); subtitle.setAlign("right"); up = new com.google.youtube.tv.view.ui.PageNavigationButton(content.clip, com.google.youtube.tv.view.ui.PageNavigationButton.UP); up.setPos(LIST_WIDTH + NAV_BUTTON_GAP, LIST_Y); down = new com.google.youtube.tv.view.ui.PageNavigationButton(content.clip, com.google.youtube.tv.view.ui.PageNavigationButton.DOWN); down.setPos(LIST_WIDTH + NAV_BUTTON_GAP, (LIST_Y + LIST_HEIGHT) - down.getHeight()); playlistsList = new com.google.youtube.tv.view.ui.list.List(content.clip, LIST_WIDTH, LIST_HEIGHT, LIST_SIZE, com.google.youtube.tv.view.ui.list.PlaylistListItem, LIST_ROW_HEIGHT, LIST_ROW_GAP); playlistsList.bindScrollButtons(down, up); playlistsList.setPos(0, LIST_Y); playlistsList.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_TOP, com.google.chianti.event.EventDelegate.create(this, onListOutboundTop)); playlistsList.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.USER_ACTIVITY, com.google.chianti.event.EventDelegate.create(this, onListUserActivity)); playlistsList.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.CHANGE, com.google.chianti.event.EventDelegate.create(this, onListChange)); content.setPos((Stage.width / 2) - (content.getWidth() / 2), (Stage.height / 2) - (content.getHeight() / 2)); } function select(component) { backButton.setIsActive(component == backButton); backButton.setSelected(component == backButton); playlistsList.setIsActive(component == playlistsList); } function updateSubtitle() { subtitle.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.X_OF_Y_PLAYLISTS, {COUNT_1:playlistsList.getSelectedItemIndex() + 1, COUNT_2:playlistsList.getData().length})); } function onListChange(event) { var _local3 = event.data; com.google.youtube.tv.services.VideoManageService.getInstance().addToPlaylist(_local3.getPlaylistId(), videoId); _local3.setNeedsRefresh(true); pop(); } function onListOutboundTop(event) { select(backButton); } function onListUserActivity(event) { select(playlistsList); updateSubtitle(); } static var TITLE_LINE_HEIGHT = 29 * com.google.youtube.tv.app.Config.SCALE; static var TITLE_WIDTH = 560 * com.google.youtube.tv.app.Config.SCALE; static var LIST_Y = 72 * com.google.youtube.tv.app.Config.SCALE; static var LIST_WIDTH = 765 * com.google.youtube.tv.app.Config.SCALE; static var LIST_HEIGHT = 280 * com.google.youtube.tv.app.Config.SCALE; static var LIST_SIZE = 3; static var LIST_ROW_HEIGHT = 85 * com.google.youtube.tv.app.Config.SCALE; static var LIST_ROW_GAP = 11 * com.google.youtube.tv.app.Config.SCALE; static var NAV_BUTTON_GAP = 20 * com.google.youtube.tv.app.Config.SCALE; static var SUBTITLE_LINE_HEIGHT = 15 * com.google.youtube.tv.app.Config.SCALE; static var SUBTITLE_X = TITLE_WIDTH; static var SUBTITLE_Y = 20 * com.google.youtube.tv.app.Config.SCALE; static var SUBTITLE_WIDTH = LIST_WIDTH - TITLE_WIDTH; }
Symbol 20570 MovieClip [__Packages.com.google.youtube.tv.view.ui.Button] Frame 0
class com.google.youtube.tv.view.ui.Button extends com.google.youtube.tv.view.ui.ButtonBase { var textView, lineHeight, color, bold, multiline, label, getRect, clip, width, icon, height, isUp, selected; function Button (container, width, height) { super(container, width, height); } function setSize(width, height) { super.setSize(width, height); if (textView) { textView.setWidth(getTextWidth()); } alignContent(); } function initText(label, opt_lineHeight, opt_color, opt_bold, opt_shortLabel, opt_multiline) { opt_lineHeight = opt_lineHeight || (DEFAULT_LINE_HEIGHT); opt_color = ((opt_color == undefined) ? (com.google.youtube.tv.ui.Colors.WHITE) : (opt_color)); if (textView && ((lineHeight == opt_lineHeight) && ((color == opt_color) && ((bold == opt_bold) && (multiline == opt_multiline))))) { if (this.label != label) { this.label = label; textView.setText(label); } alignContent(); } else { if (textView) { textView.remove(); } this.label = label; lineHeight = opt_lineHeight; color = opt_color; bold = opt_bold; multiline = opt_multiline; var _local8 = getRect(); _local8.height = com.google.youtube.tv.ui.Font.getComponentHeight(lineHeight); _local8.width = getTextWidth(); textView = new com.google.youtube.tv.ui.Text(clip, _local8, com.google.youtube.tv.ui.Font.getFontSizeForHeight(lineHeight), color, bold); textView.setText(label); if (multiline) { textView.setMultiline(true); textView.setAutoSize(true); setSize(width, textView.getHeight() + (MARGIN * 2)); } else { textView.setAutoTruncate(true); alignContent(); } } if (opt_shortLabel && (textView.isTruncated())) { textView.setText(opt_shortLabel); label = opt_shortLabel; alignContent(); } } function getText() { return(textView.getText()); } function setText(value) { if (!textView) { initText(value); } else { textView.setText(value); alignContent(); } } function setContentAlign(value) { if (contentAlign == value) { return(undefined); } contentAlign = value; alignContent(); } function getTextView() { return(textView); } function initIcon(symbolId, isBitmap) { if (icon) { icon.remove(); } icon = new com.google.youtube.tv.ui.Symbol(clip, symbolId, isBitmap); icon.setPos(0, (height / 2) - (icon.getHeight() / 2)); alignContent(); } function toString() { return("Button " + label); } function getTextWidth() { return(width - (2 * MARGIN)); } function drawState() { clip.clear(); drawBackground(); } function drawBackground() { var _local2 = getStateFill(); com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, width, height, 0, 0, 0, _local2.color, _local2.alpha); } function getStateFill() { var _local2 = com.google.youtube.tv.ui.Colors.BLACK; var _local3 = 100; if (!isUp) { _local2 = com.google.youtube.tv.ui.Colors.WHITE; _local3 = 50; } else if (selected) { _local2 = com.google.youtube.tv.ui.Colors.WHITE; _local3 = 20; } return({color:_local2, alpha:_local3}); } function alignContent() { if (textView && (icon)) { textView.setWidth((width - (3 * MARGIN)) - icon.getWidth()); } else if (textView) { textView.setWidth(width - (2 * MARGIN)); } var _local2 = []; if (icon) { _local2.push(icon); } if (textView) { _local2.push(textView); } var _local3 = (_local2.length - 1) * MARGIN; var _local4 = 0; for ( ; _local4 < _local2.length ; _local4++) { _local3 = _local3 + com.google.youtube.tv.ui.View(_local2[_local4]).getWidth(); } var _local5 = MARGIN; if (contentAlign == CENTER) { _local5 = Math.round((width / 2) - (_local3 / 2)); } else if (contentAlign == RIGHT) { _local5 = (width - _local3) - MARGIN; } var _local6 = 0; for ( ; _local6 < _local2.length ; _local6++) { var _local7 = _local2[_local6]; _local7.setPos(_local5, (height / 2) - (_local7.getHeight() / 2)); _local5 = _local5 + (_local7.getWidth() + MARGIN); } } static var LEFT = "left"; static var CENTER = "center"; static var RIGHT = "right"; static var MARGIN = 7 * com.google.youtube.tv.app.Config.SCALE; static var SELECTION_HEIGHT = 5 * com.google.youtube.tv.app.Config.SCALE; static var DEFAULT_HEIGHT = 48 * com.google.youtube.tv.app.Config.SCALE; static var DEFAULT_LINE_HEIGHT = 18; var drawHighlight = true; var drawShadow = true; var contentAlign = CENTER; }
Symbol 20571 MovieClip [__Packages.com.google.youtube.tv.components.MenuControlButton] Frame 0
class com.google.youtube.tv.components.MenuControlButton extends com.google.youtube.tv.view.ui.Button { var initText, textView, initIcon, height, width, icon, clip, getStateFill; function MenuControlButton (parent, width, height, iconId) { super(parent, width, height); initText("", LINE_HEIGHT, com.google.youtube.tv.ui.Colors.WHITE); textView.setAlign("right"); initIcon(iconId, false); } function getTextWidth() { return(((width - GAP) - height) - (2 * TEXT_MARGIN)); } function alignContent() { textView.setPos((height + GAP) + TEXT_MARGIN, (height / 2) - (textView.getHeight() / 2)); icon.setPos((height / 2) - (icon.getWidth() / 2), (height / 2) - (icon.getHeight() / 2)); } function drawBackground() { com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, width, height, 0, 0, 0, 0, 0); var _local2 = getStateFill(); com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, height, height, 0, 0, 0, _local2.color, _local2.alpha); com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, height + GAP, 0, (width - height) - GAP, height, 0, 0, 0, _local2.color, _local2.alpha); } static var TEXT_MARGIN = 8 * com.google.youtube.tv.app.Config.SCALE; static var GAP = 2 * com.google.youtube.tv.app.Config.SCALE; static var LINE_HEIGHT = 15; }
Symbol 20572 MovieClip [__Packages.com.google.youtube.tv.view.ui.list.VideoListItem] Frame 0
class com.google.youtube.tv.view.ui.list.VideoListItem extends com.google.youtube.tv.view.ui.list.ListItem { var videoInfo, clip, data; function VideoListItem (parent) { super(parent); } function remove() { videoInfo.remove(); super.remove(); } function createChildren() { videoInfo = new com.google.youtube.tv.view.ui.VideoInfo(clip); } function updateChildren() { videoInfo.setData(data); } function setSelected(value) { videoInfo.highlight(value); } }
Symbol 20573 MovieClip [__Packages.com.google.youtube.tv.osk.layout.RussianLayout] Frame 0
class com.google.youtube.tv.osk.layout.RussianLayout implements com.google.youtube.tv.osk.layout.ILayout { function RussianLayout () { } function getKeys() { return(RU); } function getLangCode() { return("ru"); } function toString() { return("<RussianLayout />"); } static var RU = ["\u0410", "\u0411", "\u0412", "\u0413", "\u0414", "\u0415", "\u0401", "\u0416", "\u0417", "\u0418", "\u0419", "\u041A", "\u041B", "\u041C", "\u041D", "\u041E", "\u041F", "\u0420", "\u0421", "\u0422", "\u0423", "\u0424", "\u0425", "\u0426", "\u0427", "\u0428", "\u0429", "\u042A", "\u042B", "\u042C", "\u042D", "\u042E", "\u042F"]; }
Symbol 20574 MovieClip [__Packages.com.google.youtube.tv.tree.StaticNode] Frame 0
class com.google.youtube.tv.tree.StaticNode extends com.google.youtube.tv.tree.MenuNode { var type, subtitle; function StaticNode (type, title, opt_subtitle) { super(title, true); this.type = type; subtitle = opt_subtitle; } function getType() { return(type); } function getSubtitle() { return(subtitle); } static var TYPE_WATCH_LATER_UPSELL = "watchLaterUpsell"; }
Symbol 20575 MovieClip [__Packages.com.google.youtube.tv.components.ChannelInfoComponent] Frame 0
class com.google.youtube.tv.components.ChannelInfoComponent extends com.google.youtube.tv.components.Dialog { var updateDelegate, channelNode, setTitle, setHtmlMessage, text; function ChannelInfoComponent (parent) { super(parent); updateDelegate = com.google.chianti.event.EventDelegate.create(this, update); } function setChannelNode(value) { if (channelNode == value) { return(undefined); } if (channelNode) { channelNode.getValueStream().removeSinkFunction(updateDelegate); } channelNode = value; if (channelNode) { channelNode.getValueStream().addSinkFunction(updateDelegate); channelNode.load(); update(); } } function update() { setTitle(channelNode.getTitle()); var _local2 = []; if (channelNode.getVideosCount() > 0) { _local2.push(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.NUMBER_OF_VIDEOS, {VIDEO_COUNT_1:com.google.youtube.tv.util.StringUtil.formatNumberString(channelNode.getVideosCount())})); } if (channelNode.getSubscriberCount() > 0) { _local2.push(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.CHANNEL_INFO_SUBSCRIBERS, {NUMSUBSCRIBERS_1:com.google.youtube.tv.util.StringUtil.formatNumberString(channelNode.getSubscriberCount())})); } if (channelNode.getTotalUploadViews() > 0) { _local2.push(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.X_TOTAL_UPLOAD_VIEWS, {COUNT:com.google.youtube.tv.util.StringUtil.formatNumberString(channelNode.getTotalUploadViews())})); } var _local3 = ("<font color=\"#999999\">" + _local2.join(" | ")) + "</font>"; if (channelNode.getSummary()) { _local3 = _local3 + ("<br><br>" + com.google.youtube.tv.util.StringUtil.encodeHtml(channelNode.getSummary())); } setHtmlMessage(_local3); text.setHeight(com.google.youtube.tv.components.DialogBase.CONTENT_MAX_HEIGHT); } }
Symbol 20576 MovieClip [__Packages.com.google.youtube.tv.osk.IGridLayoutItem] Frame 0
class com.google.youtube.tv.osk.IGridLayoutItem { function IGridLayoutItem () { } }
Symbol 20577 MovieClip [__Packages.com.google.youtube.tv.osk.OskButton] Frame 0
class com.google.youtube.tv.osk.OskButton extends com.google.youtube.tv.view.ui.Button implements com.google.youtube.tv.osk.IGridLayoutItem { var setUsingKeys, info, columnIndex, rowIndex; function OskButton (container, width, height, info) { super(container, width, height); setUsingKeys(false); this.info = info; } function getColumnIndex() { return(columnIndex); } function setColumnIndex(value) { columnIndex = value; } function getRowIndex() { return(rowIndex); } function setRowIndex(value) { rowIndex = value; } }
Symbol 20578 MovieClip [__Packages.com.google.youtube.tv.views.IImageView] Frame 0
class com.google.youtube.tv.views.IImageView { function IImageView () { } }
Symbol 20579 MovieClip [__Packages.com.google.youtube.tv.views.ListThumbnailSettings] Frame 0
class com.google.youtube.tv.views.ListThumbnailSettings { var width, height, imageHeight, textLeft, textTop, textHeight, textSize, metaInfoTop, metaInfoHeight; function ListThumbnailSettings (width, height, opt_imageHeight, opt_textLeft, opt_textTop, opt_textHeight, opt_textSize, opt_metaInfoTop, opt_metaInfoHeight) { this.width = width; this.height = height; imageHeight = opt_imageHeight; textLeft = opt_textLeft; textTop = opt_textTop; textHeight = opt_textHeight; textSize = opt_textSize; metaInfoTop = opt_metaInfoTop; metaInfoHeight = opt_metaInfoHeight; } }
Symbol 20580 MovieClip [__Packages.com.google.youtube.tv.ui.Colors] Frame 0
class com.google.youtube.tv.ui.Colors { function Colors () { } static var BLACK = 0; static var WHITE = 15856113; static var WHITEST = 16777215; static var HOT_PINK = 16711935; static var SCREEN_DARK_BG = 1315860; static var LIGHT_BLACK = 263172; static var BLUE_GRAY = 3225919; static var ARROW_GRAY = 3487029; static var LIGHT_GRAY = 15461098; static var TAG_GRAY = 6578786; static var MENU_GRAY = 10066329; static var BADGE_BG = 6710886; static var BADGE_TEXT = 13421772; static var BADGE2_BG = 4013373; static var BADGE2_TEXT = WHITE; static var IMAGE_BG = 2236962; static var CARD_GRAY = 8355711; static var TEXT_GRAY = 11644847; static var DARK_GRAY = 1973790; static var MID_GRAY = 7500145; static var HD_GRAY = 4210495; static var HIGHLIGHT_GRAY = 2171169; static var DIALOG_GRAY = 2500134; static var DIALOG_ACTIVE_GRAY = 4341824; static var GRAY = 2500134; static var RED = 15081751; static var GENRE_GRAY = 4605253; static var TEXT_MEDIUM_GRAY = 9605264; static var BG_DARK_GRAY = 2631720; static var AD_COLOR = 15384346; static var GREEN = 37701; static var BUFFER_GRAY = 7829367; static var PROGRESS_RED = 13375518; static var RED_SELECTED = 16732240; static var ICON_GRAY = 8421504; static var ICON_BLUE = 1790331; static var ICON_BLUE_SELECTED = 2593766; static var MENU_ITEM = MID_GRAY; static var SELECTED_MENU_ITEM = WHITE; static var VERB_ITEM = WHITE; }
Symbol 20581 MovieClip [__Packages.com.google.youtube.tv.views.ListThumbnail] Frame 0
class com.google.youtube.tv.views.ListThumbnail extends com.google.youtube.tv.views.BaseThumbnail implements com.google.youtube.tv.views.IImageView { var settings, image, setSize, width, clip, title, overlayRect, overlay, overlayText, duration, titleText, metaInfo, metaInfoText, badge, badgeText, isSelected, loadingIcon, notFoundIcon, imageUrl, durationText; function ListThumbnail (parent) { super(parent, "listThumb"); } function getSettings() { return(settings); } function setSettings(value) { if ((settings == value) && (image)) { return(undefined); } settings = value; update(); } function update() { setSize(settings.width, settings.height); var _local2 = new flash.geom.Rectangle(0, 0, width, settings.imageHeight); if (!image) { image = new com.google.youtube.tv.ui.Image(clip, _local2); image.registerEvent(com.google.youtube.tv.ui.Image.LOAD_COMPLETE, com.google.chianti.event.EventDelegate.create(this, updateIcons)); image.registerEvent(com.google.youtube.tv.ui.Image.LOAD_ERROR, com.google.chianti.event.EventDelegate.create(this, updateIcons)); } else { image.setSize(_local2.width, _local2.height); } updateIcons(); if (!title) { overlayRect = new com.google.youtube.tv.ui.Rect(clip, null, OVERLAY_COLOR, OVERLAY_ALPHA); overlay = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(0, 0, width - (2 * OVERLAY_TEXT_PADDING), com.google.youtube.tv.ui.Font.getComponentHeight(OVERLAY_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(OVERLAY_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); overlay.setPos(OVERLAY_TEXT_PADDING, (OVERLAY_HEIGHT / 2) - (com.google.youtube.tv.ui.Font.getComponentHeight(OVERLAY_LINE_HEIGHT) / 2)); overlay.setAlign("center"); overlay.setAutoTruncate(true); overlay.setText(overlayText); duration = new com.google.youtube.tv.ui.Text(clip, null, com.google.youtube.tv.ui.Font.getFontSizeForHeight(DURATION_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.BADGE2_TEXT); duration.setBackground(com.google.youtube.tv.ui.Colors.BADGE2_BG); title = new com.google.youtube.tv.ui.Text(clip, null, settings.textSize, com.google.youtube.tv.ui.Colors.WHITE); title.setMultiline(true); title.setAutoSize(false); title.setAutoTruncate(true); title.setText(titleText); metaInfo = new com.google.youtube.tv.ui.Text(clip, null, 18, com.google.youtube.tv.ui.Colors.MID_GRAY, false); metaInfo.setAutoTruncate(true); metaInfo.setMultiline(true); metaInfo.setAutoSize(false); metaInfo.setText(metaInfoText); badge = new com.google.youtube.tv.ui.Text(clip, null, 17, com.google.youtube.tv.ui.Colors.BADGE_TEXT, false); badge.setVisible(badgeText); badge.field.backgroundColor = com.google.youtube.tv.ui.Colors.BADGE_BG; badge.field.background = true; badge.setText(badgeText); } overlayRect.setVisible(overlayText); overlay.setVisible(overlayText); overlayRect.build(new flash.geom.Rectangle(0, 0, width, OVERLAY_HEIGHT)); overlay.setWidth(width - (2 * OVERLAY_TEXT_PADDING)); updateDuration(); title.setFontSize(settings.textSize); title.setPos(settings.textLeft, settings.textTop); title.setWidth(width - (settings.textLeft * 2)); title.setHeight(settings.textHeight); metaInfo.setPos(settings.textLeft, settings.metaInfoTop); metaInfo.setWidth(width - (settings.textLeft * 2)); metaInfo.setHeight(settings.metaInfoHeight); badge.setVisible(badgeText); badge.setPos(BADGE_PADDING, (settings.height - BADGE_PADDING) - badge.getHeight()); badge.setWidth(width - (settings.textLeft * 2)); } function redrawGraphics() { super.redrawGraphics(); title.setTextColor((isSelected ? (com.google.youtube.tv.ui.Colors.BLACK) : (com.google.youtube.tv.ui.Colors.WHITE))); if (loadingIcon && (loadingIcon.isVisible())) { colorIcon(loadingIcon); } if (notFoundIcon && (notFoundIcon.isVisible())) { colorIcon(notFoundIcon); } } function colorIcon(icon) { if (isSelected) { icon.setColor(OVERLAY_COLOR); icon.setAlpha(OVERLAY_ALPHA); } else { icon.clearColor(); icon.setAlpha(IMAGE_ICON_ALPHA); } } function setOverlayText(value) { if (overlayText == value) { return(undefined); } overlayText = value; if (overlayRect) { overlayRect.setVisible(overlayText); overlay.setVisible(overlayText); overlay.setText(overlayText); } } function getImageUrl() { return(imageUrl); } function setImageUrl(value) { if (imageUrl == value) { return(undefined); } imageUrl = value; image.setImage(imageUrl); } function setDuration(value) { if (durationText == value) { return(undefined); } durationText = value; updateDuration(); } function updateDuration() { duration.setVisible(durationText); duration.setText(durationText); duration.setPos((settings.width - duration.clip._width) - DURATION_RIGHT, (settings.imageHeight - duration.clip._height) - DURATION_BOTTOM); } function setTitle(value) { titleText = value; if (title) { title.setText(value); } } function setMetaInfo(value) { metaInfoText = value; if (metaInfo) { metaInfo.setText(value); } } function setBadge(value) { badgeText = value; if (badge) { badge.setText(value); badge.setVisible(value); } } function getClassName() { return(LIST_THUMBNAIL); } function cleanBeforeRecycle(keepImage) { super.cleanBeforeRecycle(keepImage); setOverlayText(""); setTitle(""); setMetaInfo(""); setBadge(""); setDuration(""); if (!keepImage) { image.cleanBeforeRecycle(); } updateIcons(); colorIcon(loadingIcon); } function updateIcons() { if (image.isError()) { if (!notFoundIcon) { notFoundIcon = new com.google.youtube.tv.ui.Symbol(clip, "brokenImage", false, {_alpha:IMAGE_ICON_ALPHA}); } notFoundIcon.setPos((width / 2) - (notFoundIcon.getWidth() / 2), (settings.imageHeight / 2) - (notFoundIcon.getHeight() / 2)); if (loadingIcon) { loadingIcon.setVisible(false); } } else { if (notFoundIcon) { notFoundIcon.remove(); notFoundIcon = null; } if (!loadingIcon) { loadingIcon = new com.google.youtube.tv.ui.Symbol(clip, "playYTIcon", false, {_alpha:IMAGE_ICON_ALPHA}); } loadingIcon.setVisible(!image.isLoaded()); loadingIcon.setPos((width / 2) - (loadingIcon.getWidth() / 2), (settings.imageHeight / 2) - (loadingIcon.getHeight() / 2)); } } function toString() { return("<ListThumbnail>"); } static var LIST_THUMBNAIL = "com.google.youtube.tv.views.ListThumbnail"; static var NORMAL = new com.google.youtube.tv.views.ListThumbnailSettings(com.google.youtube.tv.views.BaseThumbnail.THUMBNAIL_WIDTH, com.google.youtube.tv.views.BaseThumbnail.THUMBNAIL_HEIGHT, 180 * com.google.youtube.tv.app.Config.SCALE, 7 * com.google.youtube.tv.app.Config.SCALE, 185 * com.google.youtube.tv.app.Config.SCALE, 70 * com.google.youtube.tv.app.Config.SCALE, 23, 247 * com.google.youtube.tv.app.Config.SCALE, 40 * com.google.youtube.tv.app.Config.SCALE); static var SQUARE = new com.google.youtube.tv.views.ListThumbnailSettings(180 * com.google.youtube.tv.app.Config.SCALE, com.google.youtube.tv.views.BaseThumbnail.THUMBNAIL_HEIGHT, 180 * com.google.youtube.tv.app.Config.SCALE, 8 * com.google.youtube.tv.app.Config.SCALE, 185 * com.google.youtube.tv.app.Config.SCALE, 70 * com.google.youtube.tv.app.Config.SCALE, 23, 250 * com.google.youtube.tv.app.Config.SCALE, 60 * com.google.youtube.tv.app.Config.SCALE); static var IMAGE_ICON_ALPHA = 35; static var BADGE_PADDING = 10 * com.google.youtube.tv.app.Config.SCALE; static var OVERLAY_HEIGHT = 50 * com.google.youtube.tv.app.Config.SCALE; static var OVERLAY_COLOR = com.google.youtube.tv.ui.Colors.BLACK; static var OVERLAY_ALPHA = 60; static var OVERLAY_LINE_HEIGHT = 15; static var OVERLAY_TEXT_PADDING = 10 * com.google.youtube.tv.app.Config.SCALE; static var DURATION_BOTTOM = 10 * com.google.youtube.tv.app.Config.SCALE; static var DURATION_RIGHT = 10 * com.google.youtube.tv.app.Config.SCALE; static var DURATION_LINE_HEIGHT = 13; }
Symbol 20582 MovieClip [__Packages.com.google.utils.Url] Frame 0
class com.google.utils.Url { var protocol, host, port, domain, file, path, params, paramsMap; function Url (spec) { parseAndInit(spec); } static function debugDescribeParams(params) { var _local3 = ""; for (var param in params) { if (_local3 != "") { _local3 = _local3 + " "; } _local3 = _local3 + (((param + "=>{") + params[param].join(",")) + "}"); } return(_local3); } static function diffUrl(url, goldenUrl) { var _local4 = new Array(); if (url.getProtocol() != goldenUrl.getProtocol()) { _local4.push((("Protocol: " + url.getProtocol()) + "!=") + goldenUrl.getProtocol()); } if (url.getHost() != goldenUrl.getHost()) { _local4.push((("Host: " + url.getHost()) + "!=") + goldenUrl.getHost()); } if (url.getPort() != goldenUrl.getPort()) { _local4.push((("Port: " + url.getPort()) + "!=") + goldenUrl.getPort()); } if (url.getPath() != goldenUrl.getPath()) { _local4.push((("Path: " + url.getPath()) + "!=") + goldenUrl.getPath()); } var _local5 = url.getParamsMap(); var _local6 = goldenUrl.getParamsMap(); for (var param in _local5) { if (_local6[param] == undefined) { var _local7 = _local5[param].join("&"); _local4.push(((("Unexpected param: " + param) + "=>{") + _local7) + "}"); } } for (var param in _local6) { var _local8 = _local6[param].join("&"); if (_local5[param] == undefined) { _local4.push(((("missing param: " + param) + "=>{") + _local8) + "}"); } else { var _local9 = _local5[param].join("&"); if (_local9 != _local8) { _local4.push((((("Inconsistent values for param: " + param) + "=>") + _local9) + "!=") + _local8); } } } return(_local4.join(" ")); } static function isEquivalent(url1, url2) { return(diffUrl(url1, url2) == ""); } function parseAndInit(spec) { protocol = findProtocol(spec); var _local3 = ((protocol == null) ? 0 : (protocol.length + 3)); var _local4 = spec.indexOf("/", _local3); var _local5 = spec.indexOf("?", _local4); _local4 = ((_local4 < 0) ? (spec.length) : (_local4)); _local5 = ((_local5 < 0) ? (spec.length) : (_local5)); var _local6 = spec.substring(_local3, _local4).split(":", 2); host = _local6[0]; port = ((_local6.length > 1) ? (_local6[1]) : null); var _local7 = host.split("."); if (_local7.length > 1) { domain = _local7.slice(_local7.length - 2).join("."); } else { domain = null; } file = spec.substring(_local4); path = spec.substring(_local4, _local5); if (_local5 < spec.length) { params = spec.substring(_local5 + 1); } else { params = ""; } paramsMap = {}; var _local8 = params.split("&"); var _local9 = 0; for ( ; _local9 < _local8.length ; _local9++) { var _local10 = _local8[_local9].split("="); var _local11 = _local10[0]; _local10.shift(); var _local12 = _local10.join("="); if (paramsMap[_local11] == undefined) { paramsMap[_local11] = new Array(); } paramsMap[_local11].push(_local12); } } function findProtocol(spec) { var _local3 = spec.split("://", 2); return(((_local3.length > 1) ? (_local3[0]) : null)); } function getProtocol() { return(protocol); } function getHost() { return(host); } function getDomain() { return(domain); } function getPort() { return(port); } function getFile() { return(file); } function getPath() { return(path); } function getParams() { return(params); } function getParamsMap() { return(paramsMap); } function recombineUrl(overrideParamsMap) { var _local3 = (protocol ? (protocol + "://") : ""); _local3 = _local3 + host; _local3 = _local3 + (port ? (":" + port) : ""); _local3 = _local3 + path; var _local4 = ""; if (!overrideParamsMap) { _local4 = params; } else { for (var key in overrideParamsMap) { _local4 = _local4 + ((_local4 ? "&" : "") + key); if (overrideParamsMap[key] != null) { _local4 = _local4 + ("=" + overrideParamsMap[key].toString()); } } } _local3 = _local3 + (_local4 ? ("?" + _local4) : ""); return(_local3); } function debugDescribeUrl() { return((((((((("protocol:" + protocol) + " host:") + host) + " port:") + port) + " path: ") + path) + " params:") + debugDescribeParams(getParamsMap())); } }
Symbol 20583 MovieClip [__Packages.com.google.youtube.tv.util.DrawUtil] Frame 0
class com.google.youtube.tv.util.DrawUtil { function DrawUtil () { } static function drawTriangle(canvas, x, y, width, height, borderThickness, borderColor, borderAlpha, fillColor, fillAlpha) { var _local12 = processParams(borderThickness, borderColor, borderAlpha, fillColor, fillAlpha); var _local13 = [_local12.fillStyle.startColor, _local12.fillStyle.endColor]; var _local14 = _local12.fillStyle.alphas; var _local15 = {matrixType:"box", x:x, y:y, w:width, h:height, r:(_local12.fillStyle.angle / 180) * Math.PI}; canvas.lineStyle(_local12.lineStyle.thickness, _local12.lineStyle.color, _local12.lineStyle.alpha); canvas.beginGradientFill("linear", _local13, _local14, _local12.fillStyle.ratios, _local15); canvas.moveTo(x, y); canvas.lineTo(x + width, y); canvas.lineTo(x + (width / 2), y + height); canvas.lineTo(x, y); canvas.endFill(); } static function drawRectangle(canvas, x, y, width, height, borderThickness, borderColor, borderAlpha, fillColor, fillAlpha, radius, borderOnly) { var _local14 = processParams(borderThickness, borderColor, borderAlpha, fillColor, fillAlpha, radius); canvas.lineStyle(_local14.lineStyle.thickness, _local14.lineStyle.color, _local14.lineStyle.alpha); if (!borderOnly) { var _local15 = [_local14.fillStyle.startColor, _local14.fillStyle.endColor]; var _local16 = _local14.fillStyle.alphas; var _local17 = {matrixType:"box", x:x, y:y, w:width, h:height, r:(_local14.fillStyle.angle / 180) * Math.PI}; canvas.beginGradientFill("linear", _local15, _local16, _local14.fillStyle.ratios, _local17); } var _local18 = _local14.cornerRadius.tl; var _local19 = _local14.cornerRadius.tr; var _local20 = _local14.cornerRadius.bl; var _local21 = _local14.cornerRadius.br; canvas.moveTo(x + _local19, y); canvas.lineTo((x + width) - _local18, y); if (_local18 > 0) { canvas.curveTo(x + width, y, x + width, y + _local18); } canvas.lineTo(x + width, (y + height) - _local20); if (_local20 > 0) { canvas.curveTo(x + width, y + height, (x + width) - _local20, y + height); } canvas.lineTo(x + _local21, y + height); if (_local21 > 0) { canvas.curveTo(x, y + height, x, (y + height) - _local21); } canvas.lineTo(x, y + _local19); if (_local19 > 0) { canvas.curveTo(x, y, x + _local19, y); } } static function drawGlow(clip, x, y, width, height, size, cornerRadius, color, alpha) { var _local11 = 0; for ( ; _local11 < size ; _local11++) { drawRectangle(clip, x - _local11, y - _local11, Math.round(width) + (_local11 * 2), Math.round(height) + (_local11 * 2), 2, color, ((alpha / 2) * (size - _local11)) / size, color, 0, _local11 + cornerRadius, true); } } static function getColor(originalColor, shift) { var _local4 = (originalColor & 16711680) >> 16; var _local5 = (originalColor & 65280) >> 8; var _local6 = originalColor & 255; _local4 = (((_local4 * shift) < 255) ? (_local4 * shift) : 255); _local5 = (((_local5 * shift) < 255) ? (_local5 * shift) : 255); _local6 = (((_local6 * shift) < 255) ? (_local6 * shift) : 255); return(((_local4 << 16) | (_local5 << 8)) | _local6); } static function processParams(borderThickness, borderColor, borderAlpha, fillColor, fillAlpha, radius) { var _local8 = {}; _local8.lineStyle = {}; _local8.cornerRadius = {}; _local8.fillStyle = {}; _local8.lineStyle.thickness = (_global.isNaN(borderThickness) ? 1 : (borderThickness)); _local8.lineStyle.color = (_global.isNaN(borderColor) ? 0 : (borderColor)); _local8.lineStyle.alpha = (_global.isNaN(borderAlpha) ? 100 : (borderAlpha)); if (_global.isNaN(radius) && (typeof(radius) == "object")) { _local8.cornerRadius.tr = radius.tr; _local8.cornerRadius.tl = radius.tl; _local8.cornerRadius.br = radius.br; _local8.cornerRadius.bl = radius.bl; } else { _local8.cornerRadius.tr = (_local8.cornerRadius.tl = (_local8.cornerRadius.br = (_local8.cornerRadius.bl = int(radius)))); } _local8.fillStyle.ratios = [0, 255]; if (_global.isNaN(fillColor) && (typeof(fillColor) == "object")) { _local8.fillStyle.startColor = fillColor.start; _local8.fillStyle.endColor = fillColor.end; _local8.fillStyle.angle = ((!_global.isNaN(fillColor.angle)) ? (fillColor.angle) : 0); _local8.fillStyle.ratios = fillColor.ratios || (_local8.fillStyle.ratios); _local8.fillStyle.alphas = fillColor.alphas; } else { _local8.fillStyle.startColor = int(fillColor); _local8.fillStyle.endColor = int(fillColor); } if (!_global.isNaN(fillAlpha)) { _local8.fillStyle.alphas = [fillAlpha, fillAlpha]; } else if (!_local8.fillStyle.alphas) { _local8.fillStyle.alphas = [100, 100]; } return(_local8); } }
Symbol 20584 MovieClip [__Packages.com.google.youtube.tv.components.SignInComponent] Frame 0
class com.google.youtube.tv.components.SignInComponent extends com.google.youtube.tv.components.Dialog { var messages, statsLogger, storage, signInService, accessToken, state, setTitle, setHtmlMessage, addButton, addOKButton, codeReceived, signInTimeoutScheduler, enabled, pop; function SignInComponent (parent) { super(parent); messages = com.google.youtube.tv.services.MessagesService.get(); statsLogger = com.google.youtube.tv.services.StatsLoggerService.getInstance(); storage = com.google.youtube.tv.services.StorageService.get(); storage.registerEvent(com.google.youtube.tv.services.StorageService.STORAGE_READY, com.google.chianti.event.EventDelegate.create(this, init)); } function init() { signInService = com.google.youtube.tv.services.SignInService.getInstance(); signInService.registerEvent(com.google.youtube.tv.services.SignInService.USER_CODE_RECEIVE, com.google.chianti.event.EventDelegate.create(this, displaySignInDialog)); signInService.registerEvent(com.google.youtube.tv.services.SignInService.REFRESH_TOKEN_RECEIVE, com.google.chianti.event.EventDelegate.create(this, onRefreshTokenReceive)); signInService.registerEvent(com.google.youtube.tv.services.SignInService.ACCESS_TOKEN_FIRST_RECEIVE, com.google.chianti.event.EventDelegate.create(this, onAccessTokenFirstReceive)); signInService.registerEvent(com.google.youtube.tv.services.SignInService.ACCESS_TOKEN_UPDATE, com.google.chianti.event.EventDelegate.create(this, onAccessTokenUpdate)); signInService.registerEvent(com.google.youtube.tv.services.SignInService.SISO_ERROR, com.google.chianti.event.EventDelegate.create(this, onLoadError)); var _local2 = storage.getValue(com.google.youtube.tv.services.StorageService.REFRESH_TOKEN); var _local3 = _local2; if (com.google.youtube.tv.platform.Box.shouldSendDeviceRetentionPing()) { com.google.youtube.tv.services.DeviceRetentionService.getInstance().retainDeviceInfo(_local3); } if (_local3) { signInService.refreshAccessToken(_local2, storage.getValue(com.google.youtube.tv.services.StorageService.PAYMENTS_SCOPE) == "1"); statsLogger.sendSignInRefreshMessage(); } else { signInService.broadcastReady(); } } function signOut() { signInService.clearAuthInfo(); accessToken = undefined; writeStorage(undefined, undefined); com.google.youtube.tv.tree.ContentTree.getRoot().signOut(); statsLogger.sendSignOutMessage(); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SIGN_OUT)); } function activate() { if (accessToken) { state = STATE_SIGN_OUT_INVITE; setTitle(messages.getMsg(com.google.youtube.tv.services.MessagesService.SIGN_OUT_CHANNEL)); setHtmlMessage(messages.getMsg(com.google.youtube.tv.services.MessagesService.SIGN_OUT_CONFIRMATION)); addButton(messages.getMsg(com.google.youtube.tv.services.MessagesService.CANCEL_BTN), null, true); addOKButton(); } else { setTitle(messages.getMsg(com.google.youtube.tv.services.MessagesService.SIGN_IN_PROCESSING)); codeReceived = false; signInService.tryToPair(); statsLogger.sendSignInInitMessage(); } } function deactivate() { clear(); if (!signInService.accessToken) { signInService.clearAuthInfo(); } statsLogger.clearSignInSource(); } function clear() { super.clear(); state = null; if (signInTimeoutScheduler) { signInTimeoutScheduler.stop(); signInTimeoutScheduler = null; } } function onButtonClick(event) { if ((state == STATE_SIGN_OUT_INVITE) && (com.google.youtube.tv.view.ui.Button(event.target).data == com.google.youtube.tv.components.DialogWithButtons.OK_ID)) { signOut(); } super.onButtonClick(event); } function displaySignInDialog() { if (!codeReceived) { codeReceived = true; } if (!enabled) { return(undefined); } clear(); setHtmlMessage(messages.getMsg(com.google.youtube.tv.services.MessagesService.SIGN_IN_INVITATION_2, {OAUTH_FORM_URL:com.google.youtube.tv.services.SignInService.OAUTH_FORM_URL, USER_CODE:" " + signInService.getUserCode(), START_BR:"<br><br>", START_H2_1:("<font size=\"" + com.google.youtube.tv.ui.Font.getFontSizeForHeight(com.google.youtube.tv.components.Dialog.TITLE_LINE_HEIGHT)) + "\">", START_H3_1:("<font size=\"" + (30 * com.google.youtube.tv.app.Config.SCALE)) + "\">", START_H3_2:("<font color=\"#727171\" size=\"" + (30 * com.google.youtube.tv.app.Config.SCALE)) + "\">", START_H1_1:("<font size=\"" + (30 * com.google.youtube.tv.app.Config.SCALE)) + "\">"})); signInTimeoutScheduler = com.google.youtube.util.Scheduler.setTimeout(signInService.getDeviceCodeLifetime() * 1000, com.google.chianti.event.EventDelegate.create(this, onSignInTimeout)); } function onSignInTimeout() { if (enabled) { signInService.clearAuthInfo(); signInService.tryToPair(); } } function onAccessTokenFirstReceive(event) { accessToken = event.token; com.google.youtube.tv.tree.ContentTree.getRoot().signIn(); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SIGNED_IN)); } function onAccessTokenUpdate(event) { accessToken = event.token; } function onRefreshTokenReceive(event) { writeStorage(event.token, (event.paymentsScope ? "1" : undefined)); statsLogger.sendSignInDoneMessage(); pop(); } function onLoadError(event) { signInService.clearAuthInfo(); writeStorage(undefined, undefined); if (enabled) { clear(); setTitle(messages.getMsg(com.google.youtube.tv.services.MessagesService.ERROR)); setHtmlMessage(messages.getMsg(com.google.youtube.tv.services.MessagesService.SIGN_IN_FAIL)); } statsLogger.sendSignInErrorMessage(event); } function writeStorage(refreshToken, paymentsScope) { storage.setValueWithoutFlush(com.google.youtube.tv.services.StorageService.REFRESH_TOKEN, refreshToken); storage.setValue(com.google.youtube.tv.services.StorageService.PAYMENTS_SCOPE, paymentsScope); } static var STATE_SIGN_OUT_INVITE = "signOutInvite"; }
Symbol 20585 MovieClip [__Packages.com.google.youtube.tv.tree.VideoNode] Frame 0
class com.google.youtube.tv.tree.VideoNode extends com.google.youtube.tv.tree.MenuNode { var title, thumbnailUrl, videoId, author, duration, published, uploaderId, views, dislikes, likes, userId, description, hd, startSeconds; function VideoNode (vo) { super(); title = vo.title; thumbnailUrl = vo.thumbnail; videoId = String(vo.encrypted_id || (vo.videoId)); author = String(vo.uploader || (vo.author)); duration = String(vo.duration); fixDuration(); published = com.google.youtube.tv.util.DateUtil.dateToString(vo.uploaded || (vo.published || (vo.added))); uploaderId = vo.uploaderId; views = String(vo.views || (vo.view_count)); if (!_global.isNaN(Number(views))) { views = com.google.youtube.tv.util.StringUtil.formatNumberString(Number(views)); } dislikes = int(vo.dislikes); likes = int(vo.likes); userId = String(vo.user_id); description = vo.description; hd = (String(vo.is_hd).toLowerCase() == "true") || (vo.hd == ""); } function isTerminal() { return(true); } function getDislikesCount() { return(dislikes); } function getLikesCount() { return(likes); } function getThumbnailUrl() { return(thumbnailUrl); } function getChildren() { return([]); } function getVideoId() { return(videoId); } function getAuthor() { return(((author == "undefined") ? "" : (author))); } function getViewCount() { return(((views == "undefined") ? "0" : (views))); } function getDuration() { return(((duration == "undefined") ? "" : (duration))); } function getPublished() { return(((published == "undefined") ? "" : (com.google.youtube.tv.util.DateUtil.dateToString(published)))); } function getUploaderId() { return(uploaderId); } function getUserId() { return(userId); } function getDescription() { return(description); } function isHd() { return(hd); } function fixDuration() { var _local2 = Number(duration); if (!_global.isNaN(_local2)) { duration = com.google.youtube.tv.util.DateUtil.formatDurationInSeconds(_local2); } } function equals(videoNode) { return(videoId == videoNode.videoId); } function getStartSeconds() { return(startSeconds); } function setStartSeconds(seconds) { startSeconds = seconds; } function toString() { return(((((((((((((("<VideoNode title:" + title) + " videoId:") + videoId) + " thumbnailUrl:") + thumbnailUrl) + " author:") + author) + " duration:") + duration) + " published:") + published) + " views:") + views) + " />"); } }
Symbol 20586 MovieClip [__Packages.com.google.youtube.tv.osk.transliteration.Transliteration] Frame 0
class com.google.youtube.tv.osk.transliteration.Transliteration extends com.google.chianti.event.EventBroadcaster { var service, transliterator, field, language, broadcast; function Transliteration () { super(); com.google.chianti.event.EventBroadcaster.initialize(this); service = new com.google.youtube.tv.services.TransliterationService(); service.registerEvent(com.google.youtube.tv.services.TransliterationService.COMPLETE, com.google.chianti.event.EventDelegate.create(this, onDataLoaded)); } function setSourceFieldWithLang(targetField, lang) { transliterator.reset(); field = targetField; field.html = true; language = lang; positionOffset = field.text.length - 1; } function transliterate() { getData(); } function applySuggestion() { if (transliterator.getType() == com.google.youtube.tv.osk.transliteration.MultiPartTransliterator.TYPE) { complete(); return(undefined); } if (transliterator.apply()) { getData(); } else { complete(); } } function highlightStringForSuggestion(idx) { transliterator.highlight(field, positionOffset, currentItem, idx); if (transliterator.getType() == com.google.youtube.tv.osk.transliteration.MultiPartTransliterator.TYPE) { com.google.youtube.tv.osk.transliteration.MultiPartTransliterator.setupItemsBounds(field, items, positionOffset); broadcastListUpdate(); broadcast({target:this, type:ACTIVATE, index:idx}); } } function changeCurrentMultiPartItem(direction) { var _local3 = itemIndex; if (direction == 1) { itemIndex = (++itemIndex) % items.length; } else if (direction == -1) { itemIndex = ((--itemIndex) + items.length) % items.length; } if (_local3 == itemIndex) { return(undefined); } currentItem = items[itemIndex]; broadcastListUpdate(); broadcast({target:this, type:ACTIVATE}); highlightStringForSuggestion(0); } function cancel() { transliterator.reset(); currentItem = {}; itemIndex = 0; broadcast({target:this, type:CANCEL}); } static function isLanguageSupported(language) { switch (language.toLowerCase()) { case "ja" : case "zh" : return(true); } return(false); } function complete() { broadcast({target:this, type:COMPLETE}); transliterator.reset(); currentItem = {}; itemIndex = 0; } function getData() { service.getTransliteration(language, field.text.substring(positionOffset, field.text.length).toLowerCase(), SUGGESTIONS_NUMBER); } function onDataLoaded(event) { items = event.data; if ((items.length == 0) || ((items.length == 1) && (items[0].suggestions.length == 0))) { complete(); return(undefined); } currentItem = items[itemIndex]; if ((language == "zh") && (!transliterator)) { transliterator = new com.google.youtube.tv.osk.transliteration.SinglePartTransliterator(); } else if ((language == "ja") && (!transliterator)) { transliterator = new com.google.youtube.tv.osk.transliteration.MultiPartTransliterator(); } if (transliterator.getType() == com.google.youtube.tv.osk.transliteration.MultiPartTransliterator.TYPE) { com.google.youtube.tv.osk.transliteration.MultiPartTransliterator.setupItemsBounds(field, items, positionOffset); } broadcastListUpdate(); broadcast({target:this, type:ACTIVATE}); highlightStringForSuggestion(0); } function broadcastListUpdate() { broadcast({target:this, type:UPDATE_LIST, data:currentItem.suggestions}); } static var ACTIVATE = "ACTIVATE"; static var COMPLETE = "COMPLETE"; static var CANCEL = "CANCEL"; static var UPDATE_LIST = "UPDATE_LIST"; static var SUGGESTIONS_NUMBER = 50; var items = []; var currentItem = {}; var itemIndex = 0; var positionOffset = 0; }
Symbol 20587 MovieClip [__Packages.com.google.youtube.tv.tree.WhatToWatchNode] Frame 0
class com.google.youtube.tv.tree.WhatToWatchNode extends com.google.youtube.tv.tree.PlaylistFeedNode { var dataSelector, customFields, setDeduplicate, videoCount, children; function WhatToWatchNode (title, url) { super(title, url, false, null, true) dataSelector = DEFAULT_XTRACTOR; customFields = DEFAULT_FIELDS; setDeduplicate(true); } function appendDefaultParamsToUrl(url) { return(com.google.youtube.tv.util.StringUtil.addParamsToRequest(super.appendDefaultParamsToUrl(url), ["inline=true"])); } function parse(src) { videoCount = _global.NaN; super.parse(src); } function toString() { return(("<WhatToWatchNode " + children.length) + ">"); } static var DEFAULT_XTRACTOR = ("/feed/entry[*]/link/entry(" + com.google.youtube.tv.tree.ContentTree.ENTRY_XTRACTOR) + ")"; static var DEFAULT_FIELDS = ((((((("openSearch:totalResults,link[@rel='next'](@rel),entry[" + "not(link/entry/app:control/yt:state) and ") + "not(link/entry/app:control/app:draft)](link[entry/id](entry(") + "author/name,published,title,*:group(*:thumbnail") + "[@yt:name='") + com.google.youtube.tv.app.Config.THUMBS_QUALITY) + "'](@url),yt:duration,") + "yt:uploaderId,*:description,yt:videoid),yt:statistics/@viewCount,") + "yt:hd)))"; }
Symbol 20588 MovieClip [__Packages.com.google.youtube.tv.controller.BrandingController] Frame 0
class com.google.youtube.tv.controller.BrandingController { var videoComponent, brandingService, videoController, thumbnailWatermarkUrl, wtid, brandedWatermarkUrl, currentChannelToken, promotedPlaylistParent; function BrandingController (video) { videoComponent = video; brandingService = new com.google.youtube.tv.services.BrandingOptionsService(); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.BRANDING_OPTIONS_READY, com.google.chianti.event.EventDelegate.create(this, onBrandingOptionsReady)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_PROGRESS, com.google.chianti.event.EventDelegate.create(this, onProgress)); brandingService.registerEvent(com.google.youtube.tv.services.BrandingOptionsService.LOAD_COMPLETE, com.google.chianti.event.EventDelegate.create(this, onBrandingLoaded)); Key.addListener(this); } function showBasicWatermarkFor(ptk) { if (ptk == "vevo") { videoController.showWatermark(); } } function showThumbnailWatermark(duration) { if (inPreRoll) { return(undefined); } clearTimer(); if (thumbnailWatermarkUrl) { wtid = _global.setInterval(this, "switchWatermark", (duration ? (duration) : (VEVO_THUMBNAIL_TIMEOUT))); videoController.showWatermark(thumbnailWatermarkUrl, true); } else if (brandedWatermarkUrl) { switchWatermark(); } else { videoController.showWatermark(); } } function switchWatermark() { clearTimer(); videoController.showWatermark(brandedWatermarkUrl, true); } function onBrandingOptionsReady(event) { clearAll(); inPreRoll = event.adPreRoll; if (!videoController) { videoController = videoComponent.player.player; } if (event.channelToken) { currentChannelToken = event.channelToken; brandingService.fetchForChannel(event.channelToken); showBasicWatermarkFor(event.partnerToken); } } function onBrandingLoaded(event) { if (event.token == currentChannelToken) { if (!promotedPlaylistParent) { com.google.youtube.tv.tree.VideoContentTree.getTree().setPromotedPlaylist(event.playlistNode); } else { promotedPlaylistParent.clear(); promotedPlaylistParent.addItem(event.playlistNode); } thumbnailWatermarkUrl = event.thumbnailUrl; brandedWatermarkUrl = event.watermarkUrl; showThumbnailWatermark(); } } function onProgress(event) { inPreRoll = event.adPreRoll; var _local3 = event.duration - event.currentTime; if (inPreRoll) { return(undefined); } if ((_local3 < VEVO_END_OF_VIDEO_TIMEOUT) && (!wtid)) { videoController.showWatermark(thumbnailWatermarkUrl || (brandedWatermarkUrl), true); } else if ((event.currentTime < 0.5) && (!wtid)) { showThumbnailWatermark(); } } function onKeyDown(event) { if (thumbnailWatermarkUrl) { showThumbnailWatermark(); } } function clearAll() { clearTimer(); inPreRoll = false; brandedWatermarkUrl = (thumbnailWatermarkUrl = (currentChannelToken = null)); if (!promotedPlaylistParent) { com.google.youtube.tv.tree.VideoContentTree.getTree().setPromotedPlaylist(null); } else { promotedPlaylistParent.clear(); } } function setPromotedPlaylistParent(value) { promotedPlaylistParent = value; } function clearTimer() { _global.clearInterval(wtid); wtid = null; } static var VEVO_THUMBNAIL_TIMEOUT = 7000; static var VEVO_END_OF_VIDEO_TIMEOUT = 15; var inPreRoll = false; }
Symbol 20589 MovieClip [__Packages.com.google.youtube.util.ExternalInterfaceWrapper] Frame 0
class com.google.youtube.util.ExternalInterfaceWrapper { static var interfaceOverride; function ExternalInterfaceWrapper () { } static function call() { var _local2 = [escapeName(arguments[0])]; var _local3 = 1; for ( ; _local3 < arguments.length ; _local3++) { _local2[_local3] = sanitizeArg(arguments[_local3]); } var _local4 = interfaceOverride || (flash.external.ExternalInterface); return(_local4.call.apply(_local4, _local2)); } static function addCallback(name, thisObj, fn) { return(flash.external.ExternalInterface.addCallback(escapeName(name), thisObj, fn)); } static function escapeName(name) { return(_global.escape(name).split("%24").join("$").split("%2E").join(".")); } static function sanitizeArg(arg) { if (typeof(arg) == "string") { return(arg.split("\\").join("\\\\")); } return(arg); } static function available() { return(flash.external.ExternalInterface.available); } }
Symbol 20590 MovieClip [__Packages.com.google.youtube.tv.ui.ApplicationBackground] Frame 0
class com.google.youtube.tv.ui.ApplicationBackground extends com.google.youtube.tv.ui.View { var symbol, clip, logo; function ApplicationBackground (parent) { super(parent); symbol = new com.google.youtube.tv.ui.Symbol(clip, "backgroundImage"); if ((symbol.getWidth() < Stage.width) || (symbol.getHeight() < Stage.height)) { var _local4 = Math.max(Stage.width / symbol.getWidth(), Stage.height / symbol.getHeight()) * 100; symbol.setScale(_local4, _local4); } logo = new com.google.youtube.tv.ui.Symbol(clip, LOGO_ID, false); logo.setAlpha(60); logo.setPos((Stage.width - LOGO_RIGHT) - logo.getWidth(), LOGO_TOP); } var LOGO_RIGHT = 65 * com.google.youtube.tv.app.Config.SCALE; var LOGO_TOP = 44 * com.google.youtube.tv.app.Config.SCALE; var LOGO_ID = "logoWhite"; }
Symbol 20591 MovieClip [__Packages.com.google.youtube.tv.wiring.ValueStream] Frame 0
class com.google.youtube.tv.wiring.ValueStream extends com.google.youtube.tv.wiring.EventStream { var propagate, sources, args, func, mapping; function ValueStream (name, func, sources, initialValue, node) { super(name, func, sources, node); value = (((initialValue != undefined) && (initialValue != null)) ? (initialValue) : (calcInitialValue())); propagate(getValue()); counterV++; } function calcInitialValue() { var _local2 = 0; for ( ; _local2 < sources.length ; _local2++) { args[_local2] = sources[_local2].valueNow(); } return(func.apply(this, args)); } function update(incomingValue, source) { if (!source) { propagate(value); return(undefined); } var _local4 = mapping[source]; args[_local4] = incomingValue; var _local5 = func.apply(this, args); if (_local5 != getValue()) { value = _local5; propagate(value); } } function recalculate() { setValue(calcInitialValue()); propagate(getValue()); } function getValue() { return(value); } function setValue(value) { this.value = value; } function printer(name) { var _local3 = function (event) { var _local3 = []; for (var i in event) { _local3.push((("" + i) + ":") + event[i]); } }; return(new com.google.youtube.tv.wiring.ValueStream("printer", _local3, [this])); } function vmap(f) { return(new com.google.youtube.tv.wiring.ValueStream("vmap", f, [this])); } function valueNow() { return(getValue()); } function changes() { return(new com.google.youtube.tv.wiring.EventStream("changes", com.google.youtube.tv.wiring.FRP.identity, [this])); } static var counterV = 0; var value = undefined; }
Symbol 20592 MovieClip [__Packages.com.google.youtube.tv.remotes.partner.SamsungRemoteController] Frame 0
class com.google.youtube.tv.remotes.partner.SamsungRemoteController extends com.google.youtube.tv.remotes.DefaultRemoteController { function SamsungRemoteController () { super(); } function processKey(keyCode) { switch (keyCode) { case SS_BACK : return(com.google.youtube.tv.controller.ExtendedKeys.BACK); case SS_PLAY : return(com.google.youtube.tv.controller.ExtendedKeys.PLAY); case SS_STOP : return(com.google.youtube.tv.controller.ExtendedKeys.STOP); case SS_PAUSE : return(com.google.youtube.tv.controller.ExtendedKeys.PAUSE); case SS_FAST_FORWARD : return(com.google.youtube.tv.controller.ExtendedKeys.FAST_FORWARD); case SS_REWIND : return(com.google.youtube.tv.controller.ExtendedKeys.REWIND); case SS_A : case SS_B : case SS_C : case SS_D : return(_global.NaN); } return(super.processKey(keyCode)); } static var SS_BACK = 35; static var SS_PLAY = 65; static var SS_STOP = 66; static var SS_PAUSE = 80; static var SS_FAST_FORWARD = 68; static var SS_REWIND = 67; static var SS_A = Key.PGDN; static var SS_B = Key.SPACE; static var SS_C = Key.BACKSPACE; static var SS_D = Key.PGUP; }
Symbol 20593 MovieClip [__Packages.com.google.youtube.tv.tree.VerbNode] Frame 0
class com.google.youtube.tv.tree.VerbNode extends com.google.youtube.tv.tree.TreeNode { var loaded, subtitle, eventType, data, title; function VerbNode (title, subtitle, eventType, opt_data) { super(title); loaded = true; this.subtitle = subtitle; this.eventType = eventType; data = opt_data; } function execute() { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(eventType, data)); } function toString() { return((((" < VerbNode title:" + title) + " eventType:") + eventType) + "> "); } }
Symbol 20594 MovieClip [__Packages.com.google.youtube.tv.tree.SignOutNode] Frame 0
class com.google.youtube.tv.tree.SignOutNode extends com.google.youtube.tv.tree.VerbNode { var loaded, updateDelegate, signInService, loadStarted, setLoaded, thumbnailUrl, generation, parent; function SignOutNode (title, subtitle, eventType) { super(title, subtitle, eventType); loaded = false; updateDelegate = com.google.chianti.event.EventDelegate.create(this, update); signInService = com.google.youtube.tv.services.SignInService.getInstance(); signInService.registerEvent(com.google.youtube.tv.services.SignInService.USER_INFO_RECEIVED, updateDelegate); update(); } function requiresAutoLoad() { return(!loaded); } function load() { if ((!loaded) && (!loadStarted)) { loadStarted = true; com.google.youtube.tv.services.SignInService.getInstance().fetchUserInfo(); } } function remove() { super.remove(); signInService.unregisterEvent(com.google.youtube.tv.services.SignInService.USER_INFO_RECEIVED, updateDelegate); } function update() { if (com.google.youtube.tv.services.SignInService.isSignedIn() && (signInService.avatar)) { setLoaded(true); thumbnailUrl = signInService.avatar; generation++; parent.update(); } } }
Symbol 20595 MovieClip [__Packages.com.adobe.serialization.json.JSONToken] Frame 0
class com.adobe.serialization.json.JSONToken { var _type, _value; function JSONToken (type, value) { _type = type || -1; _value = value || null; } function get type() { return(_type); } function set type(value) { _type = value; //return(type); } function get value() { return(_value); } function set value(v) { _value = v; //return(value); } }
Symbol 20596 MovieClip [__Packages.com.google.youtube.tv.tree.VideosNode] Frame 0
class com.google.youtube.tv.tree.VideosNode extends com.google.youtube.tv.tree.ListNode { var setMenuCapturing, cobj, getData, addItem, addItemAt, children, recommendationsNode, removeItem, getChildrenCount; function VideosNode (title, url, loadNow) { super(title, url, loadNow); setMenuCapturing(true); } function parse(src) { var _local3 = new XML(); _local3.parseXML(src); cobj = com.google.youtube.tv.util.Xtract.getComplexValues(_local3, "/root/sets[*](title,thumbnail,video_count,gdata_url,list_id)"); } function createChildren() { var _local2 = getData(); var _local3 = 0; for ( ; _local3 < _local2.length ; _local3++) { var _local4 = _local2[_local3]; _local4.thumbnail = com.google.youtube.tv.app.Config.adjustThumbQuality(_local4.thumbnail); var _local5 = new com.google.youtube.tv.tree.PlaylistFeedNode(_local4.title, com.google.youtube.tv.util.StringUtil.applyProtocol(_local4.gdata_url, true), false, _local4, true); addItem(_local5); } if (com.google.youtube.tv.platform.Box.has3D()) { var _local6 = new com.google.youtube.tv.tree.PlaylistFeedNode("3D", FEED_3D_URL, false, null, true); addItemAt(_local6, Math.min(children.length, (recommendationsNode ? 1 : 0) + 2)); } } function updateUserNodes() { if ((!recommendationsNode) && (com.google.youtube.tv.services.SignInService.isSignedIn())) { recommendationsNode = new com.google.youtube.tv.tree.PlaylistFeedNode(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.RECOMMENDED), FEED_RECOMMENDATIONS_URL, false, null, true); addItemAt(recommendationsNode, 0); } else if (recommendationsNode && (!com.google.youtube.tv.services.SignInService.isSignedIn())) { removeItem(recommendationsNode); recommendationsNode = null; } } function toString() { return("VideosNode children count " + getChildrenCount()); } static var FEED_3D_URL = "${gdataUrl}/feeds/api/playlists/F1E1E72B2AAEA7F2"; static var FEED_RECOMMENDATIONS_URL = "${gdataUrl}/feeds/api/users/default/recommendations"; }
Symbol 20597 MovieClip [__Packages.com.google.youtube.tv.ui.TextCircle] Frame 0
class com.google.youtube.tv.ui.TextCircle extends com.google.youtube.tv.ui.View { var setPos, width, height, baseline, textView, clip; function TextCircle (parent, box, color, baseline) { super(parent, "textCircle"); setPos(box.x, box.y); width = box.width; height = box.height; this.baseline = baseline || 0; textView = new com.google.youtube.tv.ui.Text(clip, box, com.google.youtube.tv.ui.Text.DEFAULT_FONT_SIZE, color); textView.setMultiline(true); textView.setAlign("center"); textView.setLeading(LEADING); } function getTextView() { return(textView); } function setHtmlText(value) { textView.setHtmlText(value); update(); } function update() { textView.setPos(0, ((height / 2) - (textView.getHeight() / 2)) + baseline); clip.clear(); var _local2 = Math.max(DIAMETER_MIN, textView.getWidth() + (2 * PADDING)); com.google.youtube.util.Drawing.drawCircle(clip, width / 2, height / 2, _local2, {color:com.google.youtube.tv.ui.Colors.BLACK, alpha:65}); } static var PADDING = 8 * com.google.youtube.tv.app.Config.SCALE; static var DIAMETER_MIN = 100 * com.google.youtube.tv.app.Config.SCALE; static var LEADING = -5 * com.google.youtube.tv.app.Config.SCALE; }
Symbol 20598 MovieClip [__Packages.com.google.chianti.utils.StringUtil] Frame 0
class com.google.chianti.utils.StringUtil { function StringUtil () { } static function rtrim(s) { var _local3 = s.length; while (_local3--) { if (s.charCodeAt(_local3) > 32) { return(s.substring(0, _local3 + 1)); } } return(""); } static function ltrim(s) { var _local3 = -1; var _local4 = s.length; while ((_local3++) < _local4) { if (s.charCodeAt(_local3) > 32) { return(s.substring(_local3)); } } return(""); } static function trim(s) { return(ltrim(rtrim(s))); } static function htmlEncode(s) { return(s.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split("'").join("&apos;").split("\"").join("&quot;")); } static function htmlDecode(s) { return(s.split("&quot;").join("\"").split("&apos;").join("'").split("&gt;").join(">").split("&lt;").join("<").split("&amp;").join("&")); } static function trimToWidth(s, fmt, width, opt_suffix) { if (fmt.getTextExtent(s).width <= width) { return(s); } var _local6 = false; if (opt_suffix && (fmt.getTextExtent(opt_suffix).width < width)) { width = width - fmt.getTextExtent(opt_suffix).width; _local6 = true; } var _local9 = Math.ceil(s.length / 2); var _local10 = Math.ceil(s.length / 4); while (_local10 > 0) { var _local7 = s.substr(0, _local9); var _local8 = fmt.getTextExtent(_local7).width; if (_local8 == width) { break; } if (_local8 > width) { _local9 = _local9 - _local10; } else { _local9 = _local9 + _local10; } if (_local10 == 1) { _local7 = s.substr(0, _local9); _local10 = 0; } else { _local10 = Math.ceil(_local10 / 2); } } if (_local6 == true) { var _local7 = _local7 + opt_suffix; } return(_local7); } static function formatNumber(n, preDecimal, postDecimal) { var _local5 = String(n).split("."); var _local6 = ""; if (preDecimal && (_local5[0].length < preDecimal)) { _local6 = _local6 + fastFillZeros(preDecimal - _local5[0].length, true); } _local6 = _local6 + _local5[0]; if ((_local5.length == 1) && (postDecimal && (postDecimal > 0))) { _local6 = _local6 + ("." + fastFillZeros(postDecimal, true)); } else if (_local5.length == 2) { if (!postDecimal) { _local6 = _local6 + ("." + _local5[1]); } else if (postDecimal > 0) { if (_local5[1].length >= postDecimal) { _local6 = _local6 + ("." + _local5[1].substr(0, postDecimal)); } else { _local6 = _local6 + (("." + _local5[1]) + fastFillZeros(postDecimal - _local5[1].length, true)); } } } return(_local6); } static function fastFillZeros(n) { if (n < ZEROS.length) { return(ZEROS.substr(0, n)); } var _local3 = ZEROS; n = n - ZEROS.length; while (n > ZEROS.length) { _local3 = _local3 + ZEROS; n = n - ZEROS.length; } if (n > 0) { _local3 = _local3 + ZEROS.substr(n); } return(_local3); } static function fill(n, char) { char = char.substr(0, 1); if ((!char) || (char.length == 0)) { char = " "; } if (char == "0") { return(fastFillZeros(n)); } while ((2 * char.length) <= n) { char = char + char; } char = char + char.substr(0, n - char.length); return(char); } static function encodeUriComponent(str) { if ((!str) || (str.length == 0)) { return(str); } var _local3 = []; var _local4 = 0; for ( ; _local4 < str.length ; _local4++) { _local3.push(encodeCharacter(str.charAt(_local4))); } return(_local3.join("")); } static function encodeCharacter(char) { var _local3 = char.charCodeAt(0); if (isLetter(_local3) || (isDigit(_local3) || (URI_UNRESERVED_CHARACTERS.indexOf(char) > -1))) { return(char); } if (_local3 > 127) { return(((encodeCharacter("&") + encodeCharacter("#")) + _local3) + encodeCharacter(";")); } if (_local3 < 16) { return("%0" + _local3.toString(16)); } return("%" + _local3.toString(16)); } static function isDigit(ascii) { return((ascii > 47) && (ascii < 58)); } static function isLetter(ascii) { return(((ascii > 64) && (ascii < 91)) || ((ascii > 96) && (ascii < 123))); } static function escapeJsSingleQuotesAndBackslashes(str) { str = str.split("\\").join("\\\\"); str = str.split("'").join("\\'"); return(str); } static var ZEROS = "00000000000000000000000000000000000000000000000000000000000000000000000"; static var URI_UNRESERVED_CHARACTERS = "-_.~"; }
Symbol 20599 MovieClip [__Packages.com.google.youtube.tv.osk.language.Hangul] Frame 0
class com.google.youtube.tv.osk.language.Hangul extends com.google.youtube.tv.osk.language.Language { function Hangul () { super(); } static function init() { if (initComplete) { return(undefined); } jamoVVToComplexV["\u1169\u1161"] = "\u116A"; jamoVVToComplexV["\u1169\u1162"] = "\u116B"; jamoVVToComplexV["\u1169\u1175"] = "\u116C"; jamoVVToComplexV["\u116E\u1165"] = "\u116F"; jamoVVToComplexV["\u116E\u1166"] = "\u1170"; jamoVVToComplexV["\u116E\u1175"] = "\u1171"; jamoVVToComplexV["\u1173\u1175"] = "\u1174"; jamoLToT["\u1104"] = "\u1104"; jamoLToT["\u1108"] = "\u1108"; jamoLToT["\u110D"] = "\u110D"; var _local2 = 0; for ( ; _local2 < jamoTToL.length ; _local2++) { jamoLToT[jamoTToL[_local2]] = String.fromCharCode((TBASE + 1) + _local2); } initComplete = true; } static function resolveAmbiguity(text) { init(); text = mapComplexV(mapJamoTToL(text)); text = replaceRegOne(text, V_L_L_V_RE, replaceLToT); text = replaceRegOne(text, V_L_LT_NV_RE, replaceLToT); text = replaceRegOne(text, V_L_LT_NV_OR_END_RE, replaceLToT); text = replaceRegOne(text, V_L_L_NV_RE, replaceLToT); text = replaceRegOne(text, V_L_L_NV_OR_END_RE, replaceLToT); text = replaceRegOne(text, V_L_NLV_RE, replaceLToT); text = replaceRegOne(text, V_L_NLV_OR_END_RE, replaceLToT); return(text); } static function mapComplexV(text) { return(replaceRegGlobal(text, JAMO_VV_FOR_COMPLEX_V_GLOBAL_RE, function (vv) { return(com.google.youtube.tv.osk.language.Hangul.jamoVVToComplexV[vv]); })); } static function mapJamoTToL(text) { return(replaceRegGlobal(text, JAMO_V_GLOBAL_RE, function (t) { return(com.google.youtube.tv.osk.language.Hangul.jamoTToL[(t.charCodeAt(0) - com.google.youtube.tv.osk.language.Hangul.TBASE) - 1]); })); } static function replaceLToT(match, pre, l, post) { return((pre + jamoLToT[l]) + (post ? (post) : "")); } static function decompose(text) { var _local3 = ""; var _local4 = 0; for ( ; _local4 < text.length ; _local4++) { var _local5 = text.charCodeAt(_local4); if ((_local5 >= 44032) && (_local5 <= 55215)) { _local3 = _local3 + decomposeOneCode(_local5); } else { _local3 = _local3 + String.fromCharCode(_local5); } } return(_local3); } static function decomposeOne(text) { var _local3 = text.charCodeAt(0) - SBASE; var _local4 = LBASE + (_local3 / NCOUNT); var _local5 = VBASE + ((_local3 % NCOUNT) / TCOUNT); var _local6 = TBASE + (_local3 % TCOUNT); return((String.fromCharCode(_local4) + String.fromCharCode(_local5)) + ((_local6 == TBASE) ? "" : (String.fromCharCode(_local6)))); } static function decomposeOneCode(code) { var _local3 = code - SBASE; var _local4 = LBASE + (_local3 / NCOUNT); var _local5 = VBASE + ((_local3 % NCOUNT) / TCOUNT); var _local6 = TBASE + (_local3 % TCOUNT); return((String.fromCharCode(_local4) + String.fromCharCode(_local5)) + ((_local6 == TBASE) ? "" : (String.fromCharCode(_local6)))); } static function compose(text) { return(replaceRegGlobal(text, JAMO_L_V_T_GLOBAL_RE, composeOne)); } static function composeOne(text) { var _local3 = text.charCodeAt(0) - LBASE; var _local4 = text.charCodeAt(1) - VBASE; var _local5 = ((text.length >= 3) ? (text.charCodeAt(2) - TBASE) : 0); return(String.fromCharCode(((((_local3 * VCOUNT) + _local4) * TCOUNT) + _local5) + SBASE)); } static function replaceRegOne(text, pattern, callback) { var _local5 = text.match(pattern); if (_local5.length > 0) { return(replaceOne(text, _local5[0], String(callback.apply(null, _local5)))); } return(text); } static function replaceRegGlobal(text, regex, callback) { var _local5 = text.match(regex); var _local6 = 0; while (_local5[_local6]) { var _local7 = _local5[_local6]; text = replaceOne(text, _local7, callback(_local7)); _local6++; } return(text); } static function replaceOne(source, token, value) { var _local5 = source.indexOf(token); return((source.substr(0, _local5) + value) + source.substr(_local5 + token.length)); } static function populateKoMap() { var _local2 = []; _local2["3131"] = 4352; _local2["3132"] = 4353; _local2["3134"] = 4354; _local2["3137"] = 4355; _local2["3138"] = 4356; _local2["314f"] = 4449; _local2["3153"] = 4453; _local2["3157"] = 4457; _local2["3139"] = 4357; _local2["3141"] = 4358; _local2["3142"] = 4359; _local2["3143"] = 4360; _local2["3145"] = 4361; _local2["3151"] = 4451; _local2["3155"] = 4455; _local2["315b"] = 4461; _local2["3146"] = 4362; _local2["3147"] = 4363; _local2["3148"] = 4364; _local2["3149"] = 4365; _local2["314a"] = 4366; _local2["3161"] = 4467; _local2["3163"] = 4469; _local2["315c"] = 4462; _local2["314b"] = 4367; _local2["314c"] = 4368; _local2["314d"] = 4369; _local2["314e"] = 4370; _local2["3150"] = 4450; _local2["3154"] = 4454; _local2["3160"] = 4466; _local2["3152"] = 4452; _local2["3156"] = 4456; return(_local2); } static function populateKoMapBackwards() { var _local2 = []; _local2["1100"] = 12593; _local2["1101"] = 12594; _local2["1102"] = 12596; _local2["1103"] = 12599; _local2["1104"] = 12600; _local2["1161"] = 12623; _local2["1165"] = 12627; _local2["1169"] = 12631; _local2["1105"] = 12601; _local2["1106"] = 12609; _local2["1107"] = 12610; _local2["1108"] = 12611; _local2["1109"] = 12613; _local2["1163"] = 12625; _local2["1167"] = 12629; _local2["116d"] = 12635; _local2["110a"] = 12614; _local2["110b"] = 12615; _local2["110c"] = 12616; _local2["110d"] = 12617; _local2["110e"] = 12618; _local2["1173"] = 12641; _local2["1175"] = 12643; _local2["116e"] = 12636; _local2["110f"] = 12619; _local2["1110"] = 12620; _local2["1111"] = 12621; _local2["1112"] = 12622; _local2["1162"] = 12624; _local2["1166"] = 12628; _local2["1172"] = 12640; _local2["1164"] = 12626; _local2["1168"] = 12630; return(_local2); } static function getKoIMEString(input) { return(remapKoSymbols(input, koMap)); } static function getKoDisplayString(input) { return(remapKoSymbols(input, koMapBackwards)); } static function remapKoSymbols(input, map) { var _local4 = input.length - 1; for ( ; _local4 >= 0 ; _local4--) { var _local5 = map[input.charCodeAt(_local4).toString(16)]; if (_local5) { input = input.split(input.charAt(_local4)).join(String.fromCharCode(_local5)); } } return(input); } function keyboardTransform(text) { text = getKoIMEString(text); if (text.length > 2) { var _local4 = text.length - 1; // unexpected jump do { _local4--; if (_local4 <= 0) { break; } var _local3 = text.charCodeAt(_local4); } while (!((_local3 >= 44032) && (_local3 <= 55215))); text = text.substr(0, _local4) + compose(resolveAmbiguity(decompose(text.substr(_local4).split("\x1D").join()))); } else { text = compose(resolveAmbiguity(decompose(text.split("\x1D").join()))); } return(getKoDisplayString(text)); } var LANG_CODE = "ko"; static var SBASE = 44032; static var LBASE = 4352; static var VBASE = 4449; static var TBASE = 4519; static var VCOUNT = 21; static var TCOUNT = 28; static var NCOUNT = VCOUNT * TCOUNT; static var HANGUL_GLOBAL_RE = new com.as2regexp.RegExp("[\uAC00-\uD7AF]", "g"); static var JAMO_L_V_T_GLOBAL_RE = new com.as2regexp.RegExp("([\u1100-\u1112][\u1161-\u1175][\u11A7-\u11C3]?)", "g"); static var JAMO_VV_FOR_COMPLEX_V_GLOBAL_RE = new com.as2regexp.RegExp("\u1169\u1161|\u1169\u1162|\u1169\u1175|\u116E\u1165|" + "\u116E\u1166|\u116E\u1175|\u1173\u1175", "g"); static var jamoVVToComplexV = {}; static var jamoLToT = {}; static var JAMO_V_GLOBAL_RE = new com.as2regexp.RegExp("[\u11A8-\u11C3]", "g"); static var jamoTToL = ["\u1100", "\u1101", "\u1100\u1109", "\u1102", "\u1102\u110C", "\u1102\u1112", "\u1103", "\u1105", "\u1105\u1100", "\u1105\u1106", "\u1105\u1107", "\u1105\u1109", "\u1105\u1110", "\u1105\u1111", "\u1105\u1112", "\u1106", "\u1107", "\u1107\u1109", "\u1109", "\u110A", "\u110B", "\u110C", "\u110E", "\u110F", "\u1110", "\u1111", "\u1112", "\u1100\u1105"]; static var V = "[\u1161-\u1175]"; static var L = "[\u1100-\u1112]"; static var LLT = ("\u1100\u1109|\u1102\u110C|\u1102\u1112|\u1105\u1100|\u1105\u1106|" + "\u1105\u1107|\u1105\u1109|\u1105\u1110|\u1105\u1111|\u1105\u1112|") + "\u1107\u1109"; static var NV_OR_END = "([^\u1161-\u1175]|$)"; static var NV = "([^\u1161-\u1175])"; static var NLV_OR_END = "([^\u1100-\u1112\u1161-\u1175]|$)"; static var NLV = "([^\u1100-\u1112\u1161-\u1175])"; static var V_L_L_V_RE = new com.as2regexp.RegExp((((((("(" + V) + ")(") + L) + ")(") + L) + V) + ")"); static var V_L_LT_NV_RE = new com.as2regexp.RegExp(((((("(" + V) + ")(") + LLT) + ")(") + NV) + ")"); static var V_L_LT_NV_OR_END_RE = new com.as2regexp.RegExp(((("(" + V) + ")(") + LLT) + ")$"); static var V_L_L_NV_RE = new com.as2regexp.RegExp((((((("(" + V) + ")(") + L) + ")(") + L) + NV) + ")"); static var V_L_L_NV_OR_END_RE = new com.as2regexp.RegExp(((((("(" + V) + ")(") + L) + ")(") + L) + ")$"); static var V_L_NLV_RE = new com.as2regexp.RegExp(((((("(" + V) + ")(") + L) + ")(") + NLV) + ")"); static var V_L_NLV_OR_END_RE = new com.as2regexp.RegExp(((("(" + V) + ")(") + L) + ")$"); static var initComplete = false; static var koMap = populateKoMap(); static var koMapBackwards = populateKoMapBackwards(); }
Symbol 20600 MovieClip [__Packages.com.google.youtube.tv.util.ObjectUtil] Frame 0
class com.google.youtube.tv.util.ObjectUtil { function ObjectUtil () { } static function merge() { var _local2 = ((typeof(arguments[0]) == "boolean") ? (arguments.shift()) : false); var _local3 = {}; var _local4 = 0; for ( ; _local4 < arguments.length ; _local4++) { for (var key in arguments[_local4]) { if (_local2 && (!(_local3[key] === undefined))) { continue; } _local3[key] = arguments[_local4][key]; } } return(_local3); } static function clone(object, opt_maxDepth) { if (typeof(object) != "object") { return(object); } var _local4 = opt_maxDepth || (CLONE_MAX_DEPTH); if (_local4 <= 1) { return(undefined); } var _local5 = ((object instanceof Array) ? ([]) : ({})); for (var p in object) { _local5[p] = clone(object[p], _local4 - 1); } return(_local5); } static function toString(object) { if (typeof(object) == "string") { return(("\"" + object) + "\""); } if (typeof(object) != "object") { return(String(object)); } var _local3 = []; for (var p in object) { _local3.push((p + ": ") + toString(object[p])); } var _local4 = _local3.join(","); return(((object instanceof Array) ? (("[" + _local4) + "]") : (("{" + _local4) + "}"))); } static var CLONE_MAX_DEPTH = 10; }
Symbol 20601 MovieClip [__Packages.com.google.youtube.tv.wiring.FRP] Frame 0
class com.google.youtube.tv.wiring.FRP { function FRP () { } static function STOP() { } static function identity(x) { return(x); } }
Symbol 20602 MovieClip [__Packages.com.google.youtube.tv.view.ui.TransportButton] Frame 0
class com.google.youtube.tv.view.ui.TransportButton extends com.google.youtube.tv.view.ui.ButtonBase { var command, clip, icon, width, height, tooltip, selectedTooltip, selected, enabled, isUp, setColor, setAlpha; function TransportButton (container, width, height, command, opt_iconId) { super(container, width, height); this.command = command; if (opt_iconId) { setIconId(opt_iconId); } com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, width, height, 0, 0, 0, 0, 0); } function getCommand() { return(command); } function setIconId(value) { if (icon) { icon.removeMovieClip(); } icon = clip.attachMovie(value, "icon", clip.getNextHighestDepth()); icon._xscale = com.google.youtube.tv.app.Config.SCALE * 100; icon._yscale = com.google.youtube.tv.app.Config.SCALE * 100; icon._x = (width / 2) - (icon._width / 2); icon._y = (height / 2) - (icon._height / 2); } function setTooltips(tooltip, selectedTooltip) { this.tooltip = tooltip; this.selectedTooltip = selectedTooltip; } function getTooltip() { return((selected ? (selectedTooltip) : (tooltip))); } function drawState() { if (enabled) { if (isUp) { var _local2 = (selected ? (com.google.youtube.tv.ui.Colors.ICON_BLUE) : (com.google.youtube.tv.ui.Colors.ICON_GRAY)); var _local3 = (selected ? 100 : 90); } else { var _local2 = (selected ? (com.google.youtube.tv.ui.Colors.ICON_BLUE_SELECTED) : (com.google.youtube.tv.ui.Colors.WHITE)); var _local3 = 100; } } else { var _local2 = com.google.youtube.tv.ui.Colors.TAG_GRAY; var _local3 = 40; } setColor(_local2); setAlpha(_local3); } function toString() { return("TransportButton " + command); } }
Symbol 20603 MovieClip [__Packages.com.google.youtube.tv.view.ui.SubscribeButton] Frame 0
class com.google.youtube.tv.view.ui.SubscribeButton extends com.google.youtube.tv.view.ui.TransportButton { var selected, setIconId, isUp, clearColor, setAlpha; function SubscribeButton (container, width, height, command) { super(container, width, height, command); } function drawState() { if (selected) { setIconId("playerSubscribedIcon"); super.drawState(); } else if (isUp) { setIconId("playerSubscribeUpIcon"); super.drawState(); } else { clearColor(); setAlpha(100); setIconId("playerSubscribeIcon"); } } }
Symbol 20604 MovieClip [__Packages.com.google.youtube.tv.tree.ChannelsNode] Frame 0
class com.google.youtube.tv.tree.ChannelsNode extends com.google.youtube.tv.tree.GDataNode { var menuCapturing, idMap, customFields, xtractor, url, appendDefaultParamsToUrl, getData, addItem; function ChannelsNode (title) { super(title, null, false, null, true); menuCapturing = true; idMap = {}; } function updateUserNodes() { clear(); customFields = (com.google.youtube.tv.services.SignInService.isSignedIn() ? (SIGNED_IN_FIELDS) : (SIGNED_OUT_FIELDS)); xtractor = (com.google.youtube.tv.services.SignInService.isSignedIn() ? (SIGNED_IN_XTRACTOR) : (SIGNED_OUT_XTRACTOR)); url = appendDefaultParamsToUrl(com.google.youtube.tv.util.StringUtil.replacePlaceholders((com.google.youtube.tv.services.SignInService.isSignedIn() ? (SIGNED_IN_URL) : (SIGNED_OUT_URL)))); } function createChildren() { var _local3 = getData(); var _local4 = 0; for ( ; _local4 < _local3.length ; _local4++) { var _local5 = _local3[_local4]; var _local6 = _local5.user_id; for ( ; (!_local6) || ((!_local5.thumbnail) || (com.google.youtube.tv.app.Config.CHANNEL_BLACKLIST[_local6] || (idMap[_local6]))) ; _local4++) { } idMap[_local6] = true; addItem(new com.google.youtube.tv.tree.ChannelNode(_local5)); } super.createChildren(); } function clear(opt_unlinkChildren) { super.clear(opt_unlinkChildren); idMap = {}; } static var SIGNED_IN_URL = "${gdataUrl}/feeds/api/users/default/suggestion?type=channel&inline=true"; static var SIGNED_IN_FIELDS = "openSearch:*,entry"; static var SIGNED_IN_XTRACTOR = (((("/feed/entry[*]/content/entry(" + "title as username,") + "yt:channelStatistics/@subscriberCount as subscriber_count,") + "yt:channelStatistics/@videoCount as video_count,") + "yt:channelId as user_id,") + "media:thumbnail[@yt:name=\"hqdefault\"]/@url as thumbnail)"; static var SIGNED_OUT_URL = "${gdataUrl}/feeds/api/channelstandardfeeds/most_subscribed"; static var SIGNED_OUT_FIELDS = (((("openSearch:*,entry(" + "title,") + "yt:channelStatistics,") + "media:group(media:thumbnail),") + "yt:channelId") + ")"; static var SIGNED_OUT_XTRACTOR = (((("/feed/entry[*](" + "title as username,") + "yt:channelStatistics/@subscriberCount as subscriber_count,") + "yt:channelStatistics/@videoCount as video_count,") + "yt:channelId as user_id,") + "media:group/media:thumbnail[@yt:name=\"hqdefault\"]/@url as thumbnail)"; }
Symbol 20605 MovieClip [__Packages.com.google.youtube.tv.services.StorageService] Frame 0
class com.google.youtube.tv.services.StorageService { static var instance; var storageType, data, shimSo, readyScheduler, so, flushReportScheduler; function StorageService () { instanceCounter++; com.google.chianti.event.EventBroadcaster.initialize(broadcaster); com.google.youtube.util.Scheduler.setTimeout(1, com.google.chianti.event.EventDelegate.create(this, init)); } static function get(opt_shimSharedObject) { if (!instance) { instance = new com.google.youtube.tv.services.StorageService(); instance.shimSo = opt_shimSharedObject; } return(instance); } static function getTimestamp() { return(new Date().getTime().toString()); } static function getShortcutMap() { var _local2 = {}; _local2[DEBUG_VIEW] = "a"; _local2[TEST_MODE] = "g"; _local2[FORMAT] = "i"; _local2[UUID] = "j"; _local2[UUID_TIMESTAMP] = "k"; _local2[CC_LOAD_POLICY] = "l"; _local2[FIRST_USE_TIMESTAMP] = "m"; _local2[LAST_USE_TIMESTAMP] = "n"; _local2[FIRST_LOGIN_TIMESTAMP] = "o"; _local2[LAST_LOGIN_TIMESTAMP] = "p"; _local2[FIRST_GEO] = "q"; _local2[PREVENT_STATS] = "r"; _local2[ALL_FEATURES] = "s"; _local2[PAYMENTS_SCOPE] = "t"; _local2[REFRESH_TOKEN] = "u"; _local2[SK] = "v"; _local2[SK_TIMESTAMP] = "w"; _local2[DEVICE_ID] = "x"; _local2[DEVICE_KEY] = "y"; _local2[SCREEN_ID] = "z"; _local2[WAS_PAIRED] = "A"; return(_local2); } function getStorageType() { return(storageType); } function init() { if (com.google.youtube.tv.platform.Box.canLoseSharedObject() && (com.google.youtube.tv.platform.Box.supportsStorage() && (com.google.youtube.tv.platform.Box.readFromStorage()))) { initBox(); } else if (System.capabilities.hasSharedObjects === false) { initSessionStorage(); } else { initSharedObject(); } } function initBox() { storageType = TYPE_BOX; data = {}; var _local2 = new LoadVars(); _local2.decode(com.google.youtube.tv.platform.Box.readFromStorage()); for (var p in _local2) { data[p] = _local2[p]; } migrateToShortcuts(); checkUuid(); broadcastReady(); } function initSessionStorage() { storageType = TYPE_SESSION; data = {}; checkUuid(); broadcastReady(); } function initSharedObject() { var _local2 = (shimSo) && (isUsed(shimSo)); var _local3 = (SharedObject.addListener) && (!_local2); if (_local3) { SharedObject.addListener(STORAGE_NAME, com.google.chianti.event.EventDelegate.create(this, onSharedObjectReady)); readyScheduler = com.google.youtube.util.Scheduler.setInterval(SHARED_OBJECT_INTERVAL, com.google.chianti.event.EventDelegate.create(this, onSharedObjectInterval)); } so = (_local2 ? (shimSo) : (getAppSharedObject())); if ((!_local3) || (isUsed(so))) { onSharedObjectReady(); } } function getAppSharedObject() { return((com.google.youtube.tv.platform.Box.shouldUseRootSharedObject() ? (SharedObject.getLocal(STORAGE_NAME, "/")) : (SharedObject.getLocal(STORAGE_NAME)))); } function isUsed(sharedObject) { return((sharedObject) && ((sharedObject.data[UUID]) || (sharedObject.data[SHORTCUT_MAP[UUID]]))); } function migrateToShortcuts() { for (var longKey in SHORTCUT_MAP) { var _local2 = SHORTCUT_MAP[longKey]; if (data.hasOwnProperty(longKey) && (!data.hasOwnProperty(_local2))) { data[_local2] = data[longKey]; } delete data[longKey]; } } function removeDeprecatedKeys() { var _local2 = 0; for ( ; _local2 < DEPRECATED_KEYS.length ; _local2++) { delete data[DEPRECATED_KEYS[_local2]]; } } function onSharedObjectInterval() { readyCounter++; if (readyCounter >= MAX_READY_COUNTER) { com.google.youtube.tv.services.StatsLoggerService.getInstance().sendSharedObjectFail(); onSharedObjectReady(); } else if (isUsed(so)) { onSharedObjectReady(); } } function onStatus(info) { var _local3 = info.code; if (_local3 == "SharedObject.Flush.Failed") { statusFailed++; } else if (_local3 == "SharedObject.Flush.Success") { statusSuccess++; } else { statusUnknown++; } } function onSharedObjectReady() { if (ready) { return(undefined); } readyScheduler.stop(); if (shimSo && ((so != shimSo) && (!isUsed(so)))) { so = shimSo; } so.onStatus = com.google.chianti.event.EventDelegate.create(this, onStatus); data = so.data; storageType = ((so == shimSo) ? (TYPE_SHIM_SO) : (TYPE_APP_SO)); migrateToShortcuts(); checkUuid(); if (isFirstLaunch() && (com.google.youtube.tv.platform.Box.canLoseSharedObject() && (com.google.youtube.tv.platform.Box.supportsStorage()))) { so = null; initBox(); } else { broadcastReady(); } } function broadcastReady() { if (ready) { return(undefined); } if (readyScheduler) { readyScheduler.stop(); readyScheduler = null; } removeDeprecatedKeys(); ready = true; broadcaster.broadcast({target:this, type:STORAGE_READY}); flushReportScheduler = com.google.youtube.util.Scheduler.setTimeout(FLUSH_STATS_TIMEOUT, com.google.chianti.event.EventDelegate.create(this, reportFlushStats)); } function getValue(name) { return(data[SHORTCUT_MAP[name] || (name)]); } function setValue(name, value) { if ((getValue(name) == value) && ((!value) || (typeof(value) == "string"))) { return(undefined); } setValueWithoutFlush(name, value); flush(); } function setValueWithoutFlush(name, value) { data[SHORTCUT_MAP[name] || (name)] = value; } function flush() { if (so) { var _local2 = so.flush(); if (_local2 == "pending") { flushPendingCounter++; } else if (_local2) { flushSuccessCounter++; } else { flushErrorCounter++; } } else if (storageType == TYPE_BOX) { var _local3 = new LoadVars(); for (var p in data) { if (p && (data[p])) { _local3[p] = data[p]; } } com.google.youtube.tv.platform.Box.writeToStorage(_local3.toString()); } } function getUuid() { return(getValue(UUID)); } function flipFlag(name) { var _local3 = (getValue(name) ? "" : "1"); setValue(name, _local3); var _local4 = new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.FLAG_FLIP); _local4.flagName = name; _local4.flagValue = _local3; com.google.youtube.tv.wiring.EventBus.broadcastEvent(_local4); return(_local3); } function isReady() { return(ready); } function isFirstLaunch() { return(firstLaunch); } function registerEvent(type, obj) { if (ready) { obj(); } else { broadcaster.registerEvent(type, obj); } } function clear() { if (storageType == TYPE_BOX) { com.google.youtube.tv.platform.Box.writeToStorage(undefined); data = {}; } else if (so) { so.clear(); data = so.data; } else { data = {}; } checkUuid(); com.google.youtube.tv.services.StatsLoggerService.getInstance().sendSharedObjectClear(); } function reportFlushStats() { var _local2 = SharedObject.GetMaxSize || (SharedObject.getMaxSize); com.google.youtube.tv.services.StatsLoggerService.getInstance().sendStorageStats(storageType, flushSuccessCounter, flushErrorCounter, flushPendingCounter, statusFailed, statusSuccess, statusUnknown, so.getSize(), _local2()); } function checkUuid() { var _local2 = getValue(UUID); firstLaunch = !_local2; if (!_local2) { _local2 = generatePseudoUuid(); setValueWithoutFlush(UUID, _local2); setValue(UUID_TIMESTAMP, getTimestamp()); } } function generatePseudoUuid() { var _local2 = new Date().getTime(); return(com.adobe.crypto.MD5.hash((com.google.youtube.tv.platform.Box.getBoxId() + _local2) + (_local2 * Math.random()))); } static var STORAGE_NAME = "LeanbackLiteStorage"; static var SHARED_OBJECT_INTERVAL = 500; static var MAX_READY_COUNTER = 10; static var DEBUG_VIEW = "DEBUG_VIEW"; static var DEPRECATED_KEYS = ["MOVIES", "MOVIES_VISITED", "MOVIES_SHOW_COUNTER", "MOVIES_TEST_ONCE_COMPLETED", "MOVIES_TEST_FORMAT", "MoviesDeviceProberVersion", "NUMPAD_LAYOUT", "b", "c", "d", "e", "f", "h", "B"]; static var TEST_MODE = "TEST_MODE"; static var FORMAT = "FORMAT"; static var UUID = "UUID"; static var UUID_TIMESTAMP = "uuidtimestamp"; static var CC_LOAD_POLICY = "CC_LOAD_POLICY"; static var FIRST_USE_TIMESTAMP = "FIRST_USE_TIMESTAMP"; static var LAST_USE_TIMESTAMP = "LAST_USE_TIMESTAMP"; static var FIRST_LOGIN_TIMESTAMP = "FIRST_LOGIN_TIMESTAMP"; static var LAST_LOGIN_TIMESTAMP = "LAST_LOGIN_TIMESTAMP"; static var FIRST_GEO = "FIRST_GEO"; static var PREVENT_STATS = "PREVENT_STATS"; static var ALL_FEATURES = "ALL_FEATURES"; static var PAYMENTS_SCOPE = "paymentsScope"; static var REFRESH_TOKEN = "refreshToken"; static var SK = "SK"; static var SK_TIMESTAMP = "sktimestamp"; static var DEVICE_ID = "deviceId"; static var DEVICE_KEY = "deviceKey"; static var SCREEN_ID = "screenId"; static var WAS_PAIRED = "wasPaired"; static var DEVICE_KEY_NON_MONETIZABLE = "C"; static var LAST_SESSION_DURATION = "D"; static var STORAGE_READY = "STORAGE_READY"; static var SHORTCUT_MAP = getShortcutMap(); static var instanceCounter = 0; static var FLUSH_STATS_TIMEOUT = 60000; static var TYPE_SESSION = "ses"; static var TYPE_APP_SO = "aso"; static var TYPE_SHIM_SO = "sso"; static var TYPE_BOX = "box"; var ready = false; var broadcaster = {}; var readyCounter = 0; var firstLaunch = true; var flushSuccessCounter = 0; var flushErrorCounter = 0; var flushPendingCounter = 0; var statusFailed = 0; var statusSuccess = 0; var statusUnknown = 0; }
Symbol 20606 MovieClip [__Packages.com.google.youtube.tv.osk.AbstractOnScreenKeyboard] Frame 0
class com.google.youtube.tv.osk.AbstractOnScreenKeyboard extends com.google.youtube.tv.view.ui.UIComponentBase { var inputField, isHardwareKbdInput, build, currentLocale, keypressStartTime, broadcast; function AbstractOnScreenKeyboard (container, width, textField) { super(container, width); inputField = textField; isHardwareKbdInput = false; build(); } function getLanguage() { return(new com.google.youtube.tv.osk.language.Language()); } function getCurrentLocale() { return(currentLocale); } function getButtonRect() { return({}); } function onKeyDown() { keypressStartTime = keypressStartTime || (getTimer()); } function onKeyUp() { if (isHardwareKbdInput) { if (Key.getCode() == Key.ENTER) { broadcast({type:OK_PRESSED}); return(undefined); } } isHardwareKbdInput = doHardwareKbdInput(); if (isHardwareKbdInput) { switch (com.google.youtube.tv.platform.Box.getKeyCode()) { case Key.BACKSPACE : broadcast({type:BACKSPACE_PRESSED}); return(undefined); case Key.ESCAPE : case com.google.youtube.tv.controller.ExtendedKeys.BACK : broadcast({type:CANCEL_PRESSED}); return(undefined); } broadcast({type:KEY_PRESSED, hardware:true, value:String.fromCharCode(Key.getAscii()).toUpperCase()}); return(undefined); } broadcast({type:NAVIGATION_KEY_PRESSED}); } function processKeyHold() { var _local2 = (getTimer() - keypressStartTime) >= KEY_HOLD_THRESHOLD_TIME; if (_local2) { switch (Key.getCode()) { case Key.RIGHT : broadcast({type:KEY_HELD, value:Key.RIGHT}); break; default : _local2 = false; } } keypressStartTime = null; return(_local2); } function doHardwareKbdInput() { switch (Key.getCode()) { case Key.DOWN : case Key.LEFT : case Key.RIGHT : case Key.UP : case Key.ENTER : return(false); } if (checkFuncionalKeys()) { return(true); } if ((String.fromCharCode(Key.getAscii()).length > 0) && (enableNumbers(Key.getAscii()))) { return(true); } } function checkFuncionalKeys() { if (Key.isDown(SHIFT) || (Key.isDown(ALT) || (Key.isDown(CTRL)))) { return(true); } return(false); } function enableNumbers(keyCode) { if ((getCurrentLocale() == "ja") || (getCurrentLocale() == "zh")) { return(_global.isNaN(String.fromCharCode(keyCode))); } return(true); } static var KEY_HELD = "KEY_HELD"; static var KEY_PRESSED = "KEY_PRESSED"; static var BACKSPACE_PRESSED = "BACKSPACE_PRESSED"; static var CANCEL_PRESSED = "CANCEL_PRESSED"; static var CLEAR_PRESSED = "CLEAR_PRESSED"; static var OK_PRESSED = "OK_PRESSED"; static var NAVIGATION_KEY_PRESSED = "NAVIGATION_KEY_PRESSED"; static var TRANSLITERATE_PRESSED = "TRANSLITERATE_PRESSED"; static var LANGUAGE_CHANGE = "LANGUAGE_CHANGE"; static var SELECTION_MOVED = "SELECTION_MOVED"; static var TEXT_CHANGED = "TEXT_CHANGED"; static var EXIT = "EXIT"; static var KEY_HOLD_THRESHOLD_TIME = 750; static var SHIFT = 16; static var CTRL = 17; static var ALT = 18; var isEnabled = true; var height = 362; var width = 1280; }
Symbol 20607 MovieClip [__Packages.com.google.youtube.tv.osk.OnScreenKeyboard] Frame 0
class com.google.youtube.tv.osk.OnScreenKeyboard extends com.google.youtube.tv.osk.AbstractOnScreenKeyboard { var getCurrentLocale, currentButton, messages, layoutController, currentLocale, buttonClickHandler, buttonActivityHandler, languageSwitchDelegate, navMatrix, languageToggle, clip, isHardwareKbdInput, broadcast; function OnScreenKeyboard (clip) { super(clip, (ROW_LENGTH * BUTTON_WIDTH) + ((ROW_LENGTH - 1) * BUTTON_PADDING)); } function getLanguage() { if (com.google.youtube.tv.platform.Box.hasIME()) { return(new com.google.youtube.tv.osk.language.Language()); } switch (getCurrentLocale()) { case "ja" : return(new com.google.youtube.tv.osk.language.Hiragana()); case "ko" : return(new com.google.youtube.tv.osk.language.Hangul()); } return(new com.google.youtube.tv.osk.language.Language()); } function setIsActive(value) { super.setIsActive(value); setButtonActive(currentButton, super.getIsActive()); } function getButtonRect() { return({width:BUTTON_WIDTH, heigth:BUTTON_HEIGHT}); } function build() { messages = com.google.youtube.tv.services.MessagesService.get(); layoutController = com.google.youtube.tv.osk.layout.LayoutController.getInstance(); currentLocale = layoutController.getCurerntLangCode(); buttonClickHandler = com.google.chianti.event.EventDelegate.create(this, onButtonClick); buttonActivityHandler = com.google.chianti.event.EventDelegate.create(this, onButtonActivity); languageSwitchDelegate = com.google.chianti.event.EventDelegate.create(this, onLanguageSwitch); buildKeyboard(); } function buildKeyboard() { cleanKeyboard(); navMatrix = []; currentPosition.x = (currentPosition.y = 0); var _local2 = 0; var _local3 = [new com.google.youtube.tv.osk.OskInfo(com.google.youtube.tv.osk.OskInfo.BACKSPACE, 1, "", "searchBackspaceIcon", false), new com.google.youtube.tv.osk.OskInfo(com.google.youtube.tv.osk.OskInfo.SPACE, 1, "", "searchSpaceIcon", false)].concat(getFunctionalKeys()); buildRow(_local3, _local2++); var _local4 = layoutController.decorateCurrentLayoutForKeyboard(); _local2 = processChars(_local4, _local2++); var _local5 = layoutController.decorateLayoutsForToggle(); if (_local5.length > 1) { languageToggle = new com.google.youtube.tv.view.ui.Toggle(clip, _local5, (BUTTON_WIDTH * 4) + (BUTTON_PADDING * 3), BUTTON_HEIGHT); languageToggle.setSelectedIndex(((currentLocale == "en") ? 1 : 0)); languageToggle.registerEvent(com.google.youtube.tv.view.ui.Toggle.TOGGLE_CHANGE, languageSwitchDelegate); } var _local6 = []; if (languageToggle) { var _local7 = new com.google.youtube.tv.osk.OskInfo(); _local7.toggle = languageToggle; _local7.span = ROW_LENGTH; _local6.push(_local7); } buildRow(_local6, _local2++); currentButton = navMatrix[0][0].instance; setButtonActive(currentButton, true); } function getFunctionalKeys() { var _local2 = new com.google.youtube.tv.osk.OskInfo(com.google.youtube.tv.osk.OskInfo.CLEAR, 3, messages.getMsg(com.google.youtube.tv.osk.OskInfo.CLEAR)); var _local3 = new com.google.youtube.tv.osk.OskInfo(com.google.youtube.tv.osk.OskInfo.CANCEL, 3, messages.getMsg(com.google.youtube.tv.osk.OskInfo.BACK)); if (currentLocale == "ja") { _local2.span = 2; _local3.span = 2; var _local4 = new com.google.youtube.tv.osk.OskInfo(com.google.youtube.tv.osk.OskInfo.TRANSLITERATE, 2, "\u5909\u63DB"); return([_local4, _local2, _local3]); } return([_local2, _local3]); } function processChars(arr, rowNumber) { var _local4 = []; var _local5 = 0; var _local6 = 0; for ( ; _local6 < arr.length ; _local6++) { var _local7 = arr[_local6].span || 1; _local5 = _local5 + _local7; if (_local5 > ROW_LENGTH) { buildRow(_local4, rowNumber); rowNumber++; _local5 = _local7; _local4 = []; } _local4.push(arr[_local6]); } buildRow(_local4, rowNumber++); return(rowNumber); } function cleanKeyboard() { if (navMatrix.length > 0) { var _local2 = 0; for ( ; _local2 < navMatrix.length ; _local2++) { var _local3 = 0; for ( ; _local3 < navMatrix[_local2].length ; _local3++) { var _local4 = navMatrix[_local2][_local3].instance; if (_local4) { _local4.unregisterAll(); _local4.destroy(); } } } for (var key in clip) { if (typeof(clip[key]) == "movieclip") { clip[key].removeMovieClip(); } } languageToggle = null; } } function buildRow(infoArray, rowIndex) { var _local4 = 0; var _local5 = 0; for ( ; _local5 < infoArray.length ; _local5++) { var _local6 = infoArray[_local5]; var _local7 = com.google.youtube.tv.osk.OskInfo(infoArray[_local5 - 1]).span; if (_local5 == 0) { _local7 = 0; } if (_local6.char || (_local6.toggle)) { var _local9 = new flash.geom.Point(); _local9.x = ((BUTTON_WIDTH + BUTTON_PADDING) * _local7) + _local4; _local9.y = rowIndex * (BUTTON_HEIGHT + BUTTON_PADDING); if (_local6.toggle) { var _local8 = _local6.toggle; com.google.youtube.tv.view.ui.Toggle(_local8).setPos(_local9.x, _local9.y); } else { var _local8 = buildButton(clip, _local6); com.google.youtube.tv.osk.OskButton(_local8).setPos(_local9.x, _local9.y); } _local4 = _local9.x; } else { _local4 = ((BUTTON_WIDTH + BUTTON_PADDING) * _local7) + _local4; var _local8 = null; } addToNavLayout(_local8, _local6, rowIndex); } } function addToNavLayout(element, info, rowIndex, opt_info) { navMatrix[rowIndex] = navMatrix[rowIndex] || ([]); var _local6 = navMatrix[rowIndex]; var _local7 = {instance:element, startIndex:_local6.length, span:info.span}; element.setColumnIndex(_local6.length); element.setRowIndex(rowIndex); var _local8 = 0; for ( ; _local8 < info.span ; _local8++) { _local6.push(_local7); } if (info.char) { buttonsMap[info.char] = new flash.geom.Point(_local7.startIndex, rowIndex); } } function buildButton(parent, info) { var _local4 = new com.google.youtube.tv.osk.OskButton(parent, (BUTTON_WIDTH * info.span) + (BUTTON_PADDING * (info.span - 1)), BUTTON_HEIGHT, info); if (info.iconId) { _local4.initIcon(info.iconId, info.iconIsBitmap); } else { _local4.initText(info.translation || (info.char), BUTTON_LINE_HEIGHT, com.google.youtube.tv.ui.Colors.WHITE); } _local4.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.USER_ACTIVITY, buttonActivityHandler); _local4.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, buttonClickHandler); return(_local4); } function switchLanguage(lang) { layoutController.switchToByLang(lang); currentLocale = layoutController.getCurerntLangCode(); buildKeyboard(); } function onKeyUp() { super.onKeyUp(); if (isHardwareKbdInput) { navigateToByChar(String.fromCharCode(Key.getAscii()).toUpperCase()); return(undefined); } switch (com.google.youtube.tv.platform.Box.selectRemote().mapKeyCode(Key.getCode())) { case Key.LEFT : case Key.RIGHT : case Key.DOWN : case Key.UP : navigate(Key.getCode()); break; case Key.ENTER : submitKey(); break; case com.google.youtube.tv.controller.ExtendedKeys.LANGUAGE_SWITCH : languageToggle.setSelectedIndex(languageToggle.getSelectedIndex() + 1); } } function navigate(direction) { switch (direction) { case Key.LEFT : moveLeft(); break; case Key.RIGHT : moveRight(); break; case Key.DOWN : if (currentPosition.y < (navMatrix.length - 1)) { currentPosition.y++; } else { super.dispatchOutbound(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_BOTTOM); return(undefined); } currentPosition.x = calculatePosX(); break; case Key.UP : if ((currentPosition.y - 1) >= 0) { currentPosition.y--; } else { super.dispatchOutbound(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_TOP); return(undefined); } currentPosition.x = calculatePosX(); } changeCurentKey(); } function navigateToByChar(char) { if (!char) { return(undefined); } var _local3 = 0; for ( ; _local3 < navMatrix.length ; _local3++) { var _local4 = navMatrix[_local3]; var _local5 = 0; for ( ; _local5 < _local4.length ; _local5++) { if (com.google.youtube.tv.osk.OskButton(_local4[_local5].instance).info.char == char) { currentPosition.y = _local3; currentPosition.x = _local5; changeCurentKey(); return(undefined); } } } } function moveRight() { var _local3 = currentPosition.x; var _local4 = currentPosition.y; while (_local3++ , _local3 < navMatrix[_local4].length) { if (navMatrix[_local4][_local3].instance && (navMatrix[_local4][currentPosition.x] != navMatrix[_local4][_local3])) { currentPosition.x = _local3; return(undefined); } } super.dispatchOutbound(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_RIGHT); } function moveLeft() { var _local3 = currentPosition.x; var _local4 = currentPosition.y; while (_local3-- , _local3 >= 0) { if (navMatrix[_local4][_local3].instance) { currentPosition.x = navMatrix[_local4][_local3].startIndex || (_local3); return(undefined); } } super.dispatchOutbound(com.google.youtube.tv.view.ui.UIComponentBase.OUTBOUND_LEFT); } function calculatePosX() { if (currentPosition.x > (navMatrix[currentPosition.y].length - 1)) { return(navMatrix[currentPosition.y].length - 1); } if (!navMatrix[currentPosition.y][currentPosition.x].instance) { getValidIndex(); } return(navMatrix[currentPosition.y][currentPosition.x].startIndex); } function getValidIndex() { var _local2 = navMatrix[currentPosition.y]; var _local3 = 1000; var _local4 = 1000; if (currentPosition.x <= (_local2.length * 0.5)) { if (currentPosition.x > 0) { _local3 = searchLeft(_local2); if (_local2[currentPosition.x + (_local3 - 1)]) { _local4 = searchRight(_local2); } } else { _local4 = searchRight(_local2); } } else if (currentPosition.x > (_local2.length * 0.5)) { if (currentPosition.x < (_local2.length - 1)) { _local4 = searchRight(_local2); if (_local2[currentPosition.x - (_local4 - 1)]) { _local3 = searchLeft(_local2); } } else { _local3 = searchLeft(_local2); } } if (_local3 > _local4) { currentPosition.x = currentPosition.x + _local4; } else { currentPosition.x = currentPosition.x - _local3; } } function searchLeft(row) { var _local3 = currentPosition.x; while (_local3 >= 0) { if (row[_local3].instance) { break; } _local3--; } return(currentPosition.x - _local3); } function searchRight(row) { var _local3 = currentPosition.x; while (_local3 < row.length) { if (row[_local3].instance) { break; } _local3++; } return(_local3 - currentPosition.x); } function submitKey(withMouse) { var _local3 = com.google.youtube.tv.osk.OskButton(currentButton); if (!_local3) { return(undefined); } var _local4 = _local3.info.char; switch (_local4) { case com.google.youtube.tv.osk.OskInfo.OK : broadcast({type:com.google.youtube.tv.osk.AbstractOnScreenKeyboard.OK_PRESSED}); return(undefined); case com.google.youtube.tv.osk.OskInfo.BACKSPACE : broadcast({type:com.google.youtube.tv.osk.AbstractOnScreenKeyboard.BACKSPACE_PRESSED}); return(undefined); case com.google.youtube.tv.osk.OskInfo.CLEAR : broadcast({type:com.google.youtube.tv.osk.AbstractOnScreenKeyboard.CLEAR_PRESSED}); return(undefined); case com.google.youtube.tv.osk.OskInfo.CANCEL : broadcast({type:com.google.youtube.tv.osk.AbstractOnScreenKeyboard.CANCEL_PRESSED}); return(undefined); case com.google.youtube.tv.osk.OskInfo.TRANSLITERATE : broadcast({type:com.google.youtube.tv.osk.AbstractOnScreenKeyboard.TRANSLITERATE_PRESSED}); return(undefined); case com.google.youtube.tv.osk.OskInfo.SPACE : _local4 = " "; } broadcast({type:com.google.youtube.tv.osk.AbstractOnScreenKeyboard.KEY_PRESSED, value:_local4, withMouse:withMouse}); } function onLanguageSwitch(event) { setButtonActive(event.target, false); switchLanguage(event.target.getSelectedButtonId()); broadcast({type:com.google.youtube.tv.osk.AbstractOnScreenKeyboard.LANGUAGE_CHANGE}); } function onButtonActivity(event) { if (currentButton != event.target) { setButtonActive(currentButton, false); currentButton = event.target; currentPosition.x = currentButton.getColumnIndex(); currentPosition.y = currentButton.getRowIndex(); } broadcast({type:com.google.youtube.tv.osk.AbstractOnScreenKeyboard.SELECTION_MOVED}); } function onButtonClick(event) { submitKey(true); } function changeCurentKey() { if (!super.getIsActive()) { return(undefined); } setButtonActive(currentButton, false); currentButton = navMatrix[currentPosition.y][currentPosition.x].instance; setButtonActive(currentButton, true); broadcast({type:com.google.youtube.tv.osk.AbstractOnScreenKeyboard.SELECTION_MOVED}); } function setButtonActive(button, value) { button.setIsActive(value); } function toString() { return(" < OSK > "); } static var ROW_LENGTH = 8; static var BUTTON_WIDTH = 44 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_HEIGHT = 44 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_PADDING = 4 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_LINE_HEIGHT = 15; static var TRANSLITERATE = "TRANSLITERATE"; var currentPosition = new flash.geom.Point(0, 0); var buttonsMap = {}; }
Symbol 20608 MovieClip [__Packages.com.google.youtube.tv.osk.language.Hiragana] Frame 0
class com.google.youtube.tv.osk.language.Hiragana extends com.google.youtube.tv.osk.language.Language { function Hiragana () { super(); } static function rewriteRomajiQuery(query) { var _local3 = Math.min(query.length, LONGEST_SINGLE_ROMAJI_LENGTH); for ( ; _local3 > 0 ; _local3--) { var _local4 = jaMap[query.slice(-_local3).toLowerCase()]; if (_local4) { return(applyRomajiSingleNRule(query.slice(0, -_local3), _local4)); } } return(applyRomajiSingleNRule(query.slice(0, -1), query.slice(-1))); } static function applyRomajiSingleNRule(str, followingStr) { return((((str.slice(-1) == "n") && (followingStr != "y")) ? (str.slice(0, -1) + jaMap.nn) : (str)) + followingStr); } static function populateJaMap() { var _local2 = []; _local2.va = "0x3094,0x3041"; _local2.vi = "0x3094,0x3043"; _local2.vu = "0x3094"; _local2.ve = "0x3094,0x3047"; _local2.vo = "0x3094,0x3049"; _local2.vya = "0x3094,0x3083"; _local2.vyi = "0x3094,0x3043"; _local2.vyu = "0x3094,0x3085"; _local2.vye = "0x3094,0x3047"; _local2.vyo = "0x3094,0x3087"; _local2.qq = "0x3063,q"; _local2.vv = "0x3063,v"; _local2.ll = "0x3063,l"; _local2.xx = "0x3063,x"; _local2.kk = "0x3063,k"; _local2.gg = "0x3063,g"; _local2.ss = "0x3063,s"; _local2.zz = "0x3063,z"; _local2.jj = "0x3063,j"; _local2.tt = "0x3063,t"; _local2.dd = "0x3063,d"; _local2.hh = "0x3063,h"; _local2.ff = "0x3063,f"; _local2.bb = "0x3063,b"; _local2.pp = "0x3063,p"; _local2.mm = "0x3063,m"; _local2.yy = "0x3063,y"; _local2.rr = "0x3063,r"; _local2.wwa = "0x3063,0x308f"; _local2.wwi = "0x3063,0x3046,0x3043"; _local2.wwu = "0x3063,0x3046"; _local2.wwe = "0x3063,0x3046,0x3047"; _local2.wwo = "0x3063,0x3092"; _local2.wwyi = "0x3063,0x3090"; _local2.wwye = "0x3063,0x3091"; _local2.wwha = "0x3063,0x3046,0x3041"; _local2.wwhi = "0x3063,0x3046,0x3043"; _local2.wwhu = "0x3063,0x3046"; _local2.wwhe = "0x3063,0x3046,0x3047"; _local2.wwho = "0x3063,0x3046,0x3049"; _local2.cc = "0x3063,c"; _local2.kya = "0x304d,0x3083"; _local2.kyi = "0x304d,0x3043"; _local2.kyu = "0x304d,0x3085"; _local2.kye = "0x304d,0x3047"; _local2.kyo = "0x304d,0x3087"; _local2.gya = "0x304e,0x3083"; _local2.gyi = "0x304e,0x3043"; _local2.gyu = "0x304e,0x3085"; _local2.gye = "0x304e,0x3047"; _local2.gyo = "0x304e,0x3087"; _local2.sya = "0x3057,0x3083"; _local2.syi = "0x3057,0x3043"; _local2.syu = "0x3057,0x3085"; _local2.sye = "0x3057,0x3047"; _local2.syo = "0x3057,0x3087"; _local2.sha = "0x3057,0x3083"; _local2.shi = "0x3057"; _local2.shu = "0x3057,0x3085"; _local2.she = "0x3057,0x3047"; _local2.sho = "0x3057,0x3087"; _local2.zya = "0x3058,0x3083"; _local2.zyi = "0x3058,0x3043"; _local2.zyu = "0x3058,0x3085"; _local2.zye = "0x3058,0x3047"; _local2.zyo = "0x3058,0x3087"; _local2.tya = "0x3061,0x3083"; _local2.tyi = "0x3061,0x3043"; _local2.tyu = "0x3061,0x3085"; _local2.tye = "0x3061,0x3047"; _local2.tyo = "0x3061,0x3087"; _local2.cha = "0x3061,0x3083"; _local2.chi = "0x3061"; _local2.chu = "0x3061,0x3085"; _local2.che = "0x3061,0x3047"; _local2.cho = "0x3061,0x3087"; _local2.cya = "0x3061,0x3083"; _local2.cyi = "0x3061,0x3043"; _local2.cyu = "0x3061,0x3085"; _local2.cye = "0x3061,0x3047"; _local2.cyo = "0x3061,0x3087"; _local2.dya = "0x3062,0x3083"; _local2.dyi = "0x3062,0x3043"; _local2.dyu = "0x3062,0x3085"; _local2.dye = "0x3062,0x3047"; _local2.dyo = "0x3062,0x3087"; _local2.tsa = "0x3064,0x3041"; _local2.tsi = "0x3064,0x3043"; _local2.tse = "0x3064,0x3047"; _local2.tso = "0x3064,0x3049"; _local2.tha = "0x3066,0x3083"; _local2.thi = "0x3066,0x3043"; _local2["t'i"] = "0x3066,0x3043"; _local2.thu = "0x3066,0x3085"; _local2.the = "0x3066,0x3047"; _local2.tho = "0x3066,0x3087"; _local2["t'yu"] = "0x3066,0x3085"; _local2.dha = "0x3067,0x3083"; _local2.dhi = "0x3067,0x3043"; _local2["d'i"] = "0x3067,0x3043"; _local2.dhu = "0x3067,0x3085"; _local2.dhe = "0x3067,0x3047"; _local2.dho = "0x3067,0x3087"; _local2["d'yu"] = "0x3067,0x3085"; _local2.twa = "0x3068,0x3041"; _local2.twi = "0x3068,0x3043"; _local2.twu = "0x3068,0x3045"; _local2.twe = "0x3068,0x3047"; _local2.two = "0x3068,0x3049"; _local2["t'u"] = "0x3068,0x3045"; _local2.dwa = "0x3069,0x3041"; _local2.dwi = "0x3069,0x3043"; _local2.dwu = "0x3069,0x3045"; _local2.dwe = "0x3069,0x3047"; _local2.dwo = "0x3069,0x3049"; _local2["d'u"] = "0x3069,0x3045"; _local2.nya = "0x306b,0x3083"; _local2.nyi = "0x306b,0x3043"; _local2.nyu = "0x306b,0x3085"; _local2.nye = "0x306b,0x3047"; _local2.nyo = "0x306b,0x3087"; _local2.hya = "0x3072,0x3083"; _local2.hyi = "0x3072,0x3043"; _local2.hyu = "0x3072,0x3085"; _local2.hye = "0x3072,0x3047"; _local2.hyo = "0x3072,0x3087"; _local2.bya = "0x3073,0x3083"; _local2.byi = "0x3073,0x3043"; _local2.byu = "0x3073,0x3085"; _local2.bye = "0x3073,0x3047"; _local2.byo = "0x3073,0x3087"; _local2.pya = "0x3074,0x3083"; _local2.pyi = "0x3074,0x3043"; _local2.pyu = "0x3074,0x3085"; _local2.pye = "0x3074,0x3047"; _local2.pyo = "0x3074,0x3087"; _local2.fa = "0x3075,0x3041"; _local2.fi = "0x3075,0x3043"; _local2.fu = "0x3075"; _local2.fe = "0x3075,0x3047"; _local2.fo = "0x3075,0x3049"; _local2.fya = "0x3075,0x3083"; _local2.fyu = "0x3075,0x3085"; _local2.fyo = "0x3075,0x3087"; _local2.hwa = "0x3075,0x3041"; _local2.hwi = "0x3075,0x3043"; _local2.hwe = "0x3075,0x3047"; _local2.hwo = "0x3075,0x3049"; _local2.hwyu = "0x3075,0x3085"; _local2.mya = "0x307f,0x3083"; _local2.myi = "0x307f,0x3043"; _local2.myu = "0x307f,0x3085"; _local2.mye = "0x307f,0x3047"; _local2.myo = "0x307f,0x3087"; _local2.rya = "0x308a,0x3083"; _local2.ryi = "0x308a,0x3043"; _local2.ryu = "0x308a,0x3085"; _local2.rye = "0x308a,0x3047"; _local2.ryo = "0x308a,0x3087"; _local2["n'"] = "0x3093"; _local2.nn = "0x3093"; _local2.xn = "0x3093"; _local2.a = "0x3042"; _local2.i = "0x3044"; _local2.u = "0x3046"; _local2.wu = "0x3046"; _local2.e = "0x3048"; _local2.o = "0x304a"; _local2.xa = "0x3041"; _local2.xi = "0x3043"; _local2.xu = "0x3045"; _local2.xe = "0x3047"; _local2.xo = "0x3049"; _local2.la = "0x3041"; _local2.li = "0x3043"; _local2.lu = "0x3045"; _local2.le = "0x3047"; _local2.lo = "0x3049"; _local2.lyi = "0x3043"; _local2.xyi = "0x3043"; _local2.lye = "0x3047"; _local2.xye = "0x3047"; _local2.ye = "0x3044,0x3047"; _local2.ka = "0x304b"; _local2.ki = "0x304d"; _local2.ku = "0x304f"; _local2.ke = "0x3051"; _local2.ko = "0x3053"; _local2.xka = "0x30f5"; _local2.xke = "0x30f6"; _local2.lka = "0x30f5"; _local2.lke = "0x30f6"; _local2.ga = "0x304c"; _local2.gi = "0x304e"; _local2.gu = "0x3050"; _local2.ge = "0x3052"; _local2.go = "0x3054"; _local2.sa = "0x3055"; _local2.si = "0x3057"; _local2.su = "0x3059"; _local2.se = "0x305b"; _local2.so = "0x305d"; _local2.ca = "0x304b"; _local2.ci = "0x3057"; _local2.cu = "0x304f"; _local2.ce = "0x305b"; _local2.co = "0x3053"; _local2.qa = "0x304f,0x3041"; _local2.qi = "0x304f,0x3043"; _local2.qu = "0x304f"; _local2.qe = "0x304f,0x3047"; _local2.qo = "0x304f,0x3049"; _local2.kwa = "0x304f,0x3041"; _local2.kwi = "0x304f,0x3043"; _local2.kwe = "0x304f,0x3047"; _local2.kwo = "0x304f,0x3049"; _local2.gwa = "0x3050,0x3041"; _local2.za = "0x3056"; _local2.zi = "0x3058"; _local2.zu = "0x305a"; _local2.ze = "0x305c"; _local2.zo = "0x305e"; _local2.ja = "0x3058,0x3083"; _local2.ji = "0x3058"; _local2.ju = "0x3058,0x3085"; _local2.je = "0x3058,0x3047"; _local2.jo = "0x3058,0x3087"; _local2.jya = "0x3058,0x3083"; _local2.jyi = "0x3058,0x3043"; _local2.jyu = "0x3058,0x3085"; _local2.jye = "0x3058,0x3047"; _local2.jyo = "0x3058,0x3087"; _local2.ta = "0x305f"; _local2.ti = "0x3061"; _local2.tu = "0x3064"; _local2.tsu = "0x3064"; _local2.te = "0x3066"; _local2.to = "0x3068"; _local2.da = "0x3060"; _local2.di = "0x3062"; _local2.du = "0x3065"; _local2.de = "0x3067"; _local2.do = "0x3069"; _local2.xtu = "0x3063"; _local2.xtsu = "0x3063"; _local2.ltu = "0x3063"; _local2.ltsu = "0x3063"; _local2.na = "0x306a"; _local2.ni = "0x306b"; _local2.nu = "0x306c"; _local2.ne = "0x306d"; _local2.no = "0x306e"; _local2.ha = "0x306f"; _local2.hi = "0x3072"; _local2.hu = "0x3075"; _local2.fu = "0x3075"; _local2.he = "0x3078"; _local2.ho = "0x307b"; _local2.ba = "0x3070"; _local2.bi = "0x3073"; _local2.bu = "0x3076"; _local2.be = "0x3079"; _local2.bo = "0x307c"; _local2.pa = "0x3071"; _local2.pi = "0x3074"; _local2.pu = "0x3077"; _local2.pe = "0x307a"; _local2.po = "0x307d"; _local2.ma = "0x307e"; _local2.mi = "0x307f"; _local2.mu = "0x3080"; _local2.me = "0x3081"; _local2.mo = "0x3082"; _local2.xya = "0x3083"; _local2.lya = "0x3083"; _local2.ya = "0x3084"; _local2.wyi = "0x3090"; _local2.xyu = "0x3085"; _local2.lyu = "0x3085"; _local2.yu = "0x3086"; _local2.wye = "0x3091"; _local2.xyo = "0x3087"; _local2.lyo = "0x3087"; _local2.yo = "0x3088"; _local2.ra = "0x3089"; _local2.ri = "0x308a"; _local2.ru = "0x308b"; _local2.re = "0x308c"; _local2.ro = "0x308d"; _local2.xwa = "0x308e"; _local2.lwa = "0x308e"; _local2.wa = "0x308f"; _local2.wi = "0x3046,0x3043"; _local2.we = "0x3046,0x3047"; _local2.wo = "0x3092"; _local2.wha = "0x3046,0x3041"; _local2.whi = "0x3046,0x3043"; _local2.whu = "0x3046"; _local2.whe = "0x3046,0x3047"; _local2.who = "0x3046,0x3049"; _local2["z/"] = "0x30fb"; _local2["z."] = "0x2026"; _local2["z,"] = "0x2025"; _local2.zh = "0x2190"; _local2.zj = "0x2193"; _local2.zk = "0x2191"; _local2.zl = "0x2192"; _local2["z-"] = "0x301c"; _local2["z["] = "0x300e"; _local2["z]"] = "0x300f"; _local2["0"] = "0xFF10"; _local2["1"] = "0xFF11"; _local2["2"] = "0xFF12"; _local2["3"] = "0xFF13"; _local2["4"] = "0xFF14"; _local2["5"] = "0xFF15"; _local2["6"] = "0xFF16"; _local2["7"] = "0xFF17"; _local2["8"] = "0xFF18"; _local2["9"] = "0xFF19"; _local2["'"] = "0x2019"; _local2["\""] = "0x201d"; _local2[","] = "0x3001"; _local2["."] = "0x3002"; _local2["["] = "0x300c"; _local2["]"] = "0x300d"; _local2["~"] = "0x301c"; _local2["/"] = "0x30fb"; _local2["-"] = "0x30fc"; _local2["!"] = "0xff01"; _local2["#"] = "0xff03"; _local2.$ = "0xff04"; _local2["%"] = "0xff05"; _local2["&"] = "0xff06"; _local2["("] = "0xff08"; _local2[")"] = "0xff09"; _local2["*"] = "0xff0a"; _local2[" + "] = "0xff0b"; _local2[":"] = "0xff1a"; _local2[";"] = "0xff1b"; _local2[" < "] = "0xff1c"; _local2["= "] = "0xff1d"; _local2[" > "] = "0xff1e"; _local2["?"] = "0xff1f"; _local2["@"] = "0xff20"; _local2["^"] = "0xff3e"; _local2._ = "0xff3f"; _local2["`"] = "0xff40"; _local2["{"] = "0xff5b"; _local2["|"] = "0xff5c"; _local2["}"] = "0xff5d"; _local2["\\"] = "0xffe5"; _local2[String.fromCharCode(165)] = "0xffe5"; for (var i in _local2) { var _local3 = _local2[i].split(","); var _local4 = 0; for ( ; _local4 < _local3.length ; _local4++) { if (_local3[_local4].slice(0, 2) == "0x") { _local3[_local4] = String.fromCharCode(_local3[_local4]); } } _local2[i] = _local3.join(""); } return(_local2); } function keyboardTransform(query) { return(rewriteRomajiQuery(query)); } var LANG_CODE = "ja"; static var LONGEST_SINGLE_ROMAJI_LENGTH = 4; static var jaMap = populateJaMap(); }
Symbol 20609 MovieClip [__Packages.com.google.youtube.tv.view.ui.DialogOld] Frame 0
class com.google.youtube.tv.view.ui.DialogOld extends com.google.chianti.event.EventBroadcaster { var selectedButton, dialogClip, contentClip, buttonsClip, messageText, timeout, destroyTimer, imageIcon, preloader, unregisterAll, messageField, buttons, preloaderClip, icon, listenerTimeout, broadcast; function DialogOld (target, message, buttons, okButtonLabel, cancelButtonLabel, textAlign, timeout, anyButtonClose, imageIcon, opt_showPreloader, opt_autoSize, opt_width, opt_height) { super(); com.google.chianti.event.EventBroadcaster.initialize(this); selectedButton = (com.google.youtube.tv.platform.Box.isMouseOn() ? (_global.NaN) : 0); buttonsConfig = ((!_global.isNaN(buttons)) ? (buttons) : 0); okLabel = (okButtonLabel ? (okButtonLabel) : (okLabel)); cancelLabel = (cancelButtonLabel ? (cancelButtonLabel) : (okLabel)); dialogClip = target.createEmptyMovieClip("dialogClip" + getTimer(), target.getNextHighestDepth()); contentClip = dialogClip.createEmptyMovieClip("contentClip", dialogClip.getNextHighestDepth()); buttonsClip = dialogClip.createEmptyMovieClip("buttonsClip", dialogClip.getNextHighestDepth()); if (message.indexOf(HTML_FLAG) === 0) { renderAsHTML = true; message = message.substr(HTML_FLAG.length); } messageText = message; if (textAlign) { this.textAlign = textAlign; } if (timeout) { this.timeout = timeout; destroyTimer = com.google.youtube.util.Scheduler.setInterval(1000, com.google.chianti.event.EventDelegate.create(this, updateDestroyTimer)); } if (anyButtonClose) { this.anyButtonClose = anyButtonClose; } if (imageIcon && (imageIcon.link)) { this.imageIcon = imageIcon; } if (opt_showPreloader) { preloader = true; } if (opt_autoSize) { autoSize = opt_autoSize; DEFAULT_DIMENSIONS = {width:opt_width || (540 * com.google.youtube.tv.app.Config.SCALE), height:opt_height || (10 * com.google.youtube.tv.app.Config.SCALE)}; } else if (opt_width && (opt_height)) { DEFAULT_DIMENSIONS = {width:opt_width, height:opt_height}; } create(); } function destroy() { unregisterAll(); messageField = null; removeKeyListener(); var _local2 = 0; for ( ; _local2 < buttons.length ; _local2++) { buttons[_local2].remove(); buttons[_local2] = null; } buttons = []; if (destroyTimer) { destroyTimer.stop(); destroyTimer = null; } preloaderClip.removeMovieClip(); contentClip.removeMovieClip(); buttonsClip.removeMovieClip(); dialogClip.removeMovieClip(); } function getBounds() { return(new flash.geom.Rectangle(dialogClip._x, dialogClip._y, dialogClip._width, dialogClip._height)); } function setPos(x, y) { dialogClip._x = ((!_global.isNaN(x)) ? (int(x) + PADDING) : (dialogClip._x)); dialogClip._y = ((!_global.isNaN(y)) ? (int(y) + PADDING) : (dialogClip._y)); } function create() { if (imageIcon) { icon = new com.google.youtube.tv.ui.Symbol(contentClip, imageIcon.link); if ((!_global.isNaN(imageIcon.xScale)) && (!_global.isNaN(imageIcon.yScale))) { icon.clip._xscale = icon.clip._xscale * imageIcon.xScale; icon.clip._yscale = icon.clip._yscale * imageIcon.yScale; } } var _local2 = ((buttonsConfig == (OK & CANCEL)) ? (170 * com.google.youtube.tv.app.Config.SCALE) : (80 * com.google.youtube.tv.app.Config.SCALE)); messageField = contentClip.createTextField("messageField", dialogClip.getNextHighestDepth(), 0, (icon ? (icon.getHeight() + (PADDING / 2)) : 0), _local2, 10); messageField.selectable = false; messageField.tabEnabled = false; messageField.autoSize = true; messageField._width = DEFAULT_DIMENSIONS.width; messageField.multiline = true; messageField.wordWrap = true; messageField.setNewTextFormat(getTextFormat()); if (renderAsHTML) { messageField.html = true; } setText(messageText, timeout); if (preloader) { preloaderClip = contentClip.attachMovie("preloader", "preloader", contentClip.getNextHighestDepth()); } buildButtons(); alignPreloader(); if (imageIcon && (imageIcon.align == "center")) { alignIcon(); } alignContent(); alignButtons(); drawBackground(); updateButtonSelection(); setPos((Stage.width / 2) - (getBounds().width / 2), (Stage.height / 2) - (getBounds().height / 2)); listenerTimeout = _global.setTimeout(this, "addKeyListener", 1); } function setText(value, timeout) { if (!_global.isNaN(timeout)) { value = value.split(DIALOG_TIMEOUT).join(String(timeout)); } if (renderAsHTML) { messageField.htmlText = value; } else { messageField.text = value; } com.google.youtube.tv.platform.Box.setFont(messageField); } function updateDestroyTimer() { timeout--; if (timeout > 0) { setText(messageText, timeout); } else { broadcast({target:this, type:DIALOG_TIMEOUT}); destroy(); } } function buildButtons() { buttons = []; if ((buttonsConfig & OK) || (buttonsConfig & CANCEL)) { if (buttonsConfig & OK) { buttons.push(createButton(OK.toString(), okLabel)); } if (buttonsConfig & CANCEL) { buttons.push(createButton(CANCEL.toString(), cancelLabel)); } } } function createButton(id, label) { var _local4 = new com.google.youtube.tv.view.ui.Button(buttonsClip, BUTTON_WIDTH, BUTTON_HEIGHT); _local4.data = id; _local4.initText(label.toUpperCase()); _local4.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onButtonClick)); _local4.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.USER_ACTIVITY, com.google.chianti.event.EventDelegate.create(this, onButtonUserActivity)); return(_local4); } function onButtonClick(event) { var _local3 = event.target.data; if (_local3 == CANCEL) { broadcast({type:CANCEL_PRESSED}); } else if (_local3 == OK) { broadcast({type:OK_PRESSED}); } broadcast({type:BUTTON_PRESSED, button:_local3}); destroy(); } function onButtonUserActivity(event) { var _local3 = 0; for ( ; _local3 < buttons.length ; _local3++) { if (buttons[_local3] == event.target) { selectedButton = _local3; } } updateButtonSelection(); } function onKeyUp() { if (anyButtonClose) { broadcast({target:this, type:BUTTON_PRESSED}); destroy(); return(undefined); } switch (Key.getCode()) { case Key.LEFT : changeSelectedButton(-1); break; case Key.RIGHT : changeSelectedButton(1); } updateButtonSelection(); } function changeSelectedButton(dir) { if (!buttons.length) { return(undefined); } if (_global.isNaN(selectedButton)) { selectedButton = ((dir > 0) ? 0 : (buttons.length - 1)); } else { selectedButton = selectedButton + (dir + buttons.length); selectedButton = selectedButton % buttons.length; } } function updateButtonSelection() { var _local2 = 0; for ( ; _local2 < buttons.length ; _local2++) { buttons[_local2].setIsActive(false); } if (!_global.isNaN(selectedButton)) { buttons[selectedButton].setIsActive(true); } } function alignIcon() { icon.setPos((messageField._width / 2) - (icon.getWidth() / 2), 0); } function alignPreloader() { preloaderClip._width = (preloaderClip._height = PRELOADER_SIZE); preloaderClip._x = messageField._width / 2; preloaderClip._y = contentClip._height + int(PADDING / 2); } function alignContent() { } function alignButtons() { var _local2 = 0; for ( ; _local2 < buttons.length ; _local2++) { buttons[_local2].setPos((int(buttons[_local2].getWidth()) + PADDING) * _local2, 0); } buttonsClip._x = ((dialogClip._width - buttonsClip._width) / 2) + 0.5; buttonsClip._y = ((contentClip._y + contentClip._height) + PADDING) + 0.5; } function drawBackground() { var _local2 = DEFAULT_DIMENSIONS.width + (PADDING * 2); var _local3 = (PADDING * 2) + Math.max(dialogClip._height, DEFAULT_DIMENSIONS.height); com.google.youtube.tv.util.DrawUtil.drawRectangle(dialogClip, -PADDING, -PADDING, _local2, _local3, 1, com.google.youtube.tv.ui.Colors.MID_GRAY, 100, com.google.youtube.tv.ui.Colors.DIALOG_GRAY, 100, 0); } function getTextFormat() { var _local2 = new TextFormat(); _local2.size = com.google.youtube.tv.ui.Font.adaptFontSize(FONT_SIZE); _local2.color = com.google.youtube.tv.ui.Colors.WHITE; _local2.indent = 0; _local2.leftMargin = 0; _local2.rightMargin = 0; _local2.font = com.google.youtube.tv.platform.Box.getInternationalFontName(); _local2.align = textAlign; _local2.leading = 10 * com.google.youtube.tv.app.Config.SCALE; return(_local2); } function addKeyListener() { _global.clearTimeout(listenerTimeout); Key.addListener(this); } function removeKeyListener() { Key.removeListener(this); } static var DIALOG_TIMEOUT = "DIALOG_TIMEOUT"; static var CANCEL_PRESSED = "CANCEL_PRESSED"; static var OK_PRESSED = "OK_PRESSED"; static var BUTTON_PRESSED = "BUTTON_PRESSED"; static var CANCEL = 2; static var OK = 1; static var HTML_FLAG = "HTML_FLAG"; var BUTTON_HEIGHT = 40 * com.google.youtube.tv.app.Config.SCALE; var BUTTON_WIDTH = 140 * com.google.youtube.tv.app.Config.SCALE; var FONT_SIZE = 20; var PADDING = 30 * com.google.youtube.tv.app.Config.SCALE; var PRELOADER_SIZE = 50 * com.google.youtube.tv.app.Config.SCALE; var DEFAULT_DIMENSIONS = {width:670 * com.google.youtube.tv.app.Config.SCALE, height:450 * com.google.youtube.tv.app.Config.SCALE}; var textAlign = "center"; var anyButtonClose = false; var renderAsHTML = false; var autoSize = false; var buttonsConfig = 0; var cancelLabel = "Cancel"; var okLabel = "OK"; }
Symbol 20610 MovieClip [__Packages.com.google.youtube.tv.services.MagicSequencesService] Frame 0
class com.google.youtube.tv.services.MagicSequencesService { static var instance; var stats, storage, enabled, lastKeys; function MagicSequencesService () { stats = com.google.youtube.tv.services.StatsLoggerService.getInstance(); storage = com.google.youtube.tv.services.StorageService.get(); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.SWITCHED_TO_COMPONENT, com.google.chianti.event.EventDelegate.create(this, onSwitchedToComponent)); setEnabled(true); } static function get() { if (!instance) { instance = new com.google.youtube.tv.services.MagicSequencesService(); } return(instance); } function isEnabled() { return(enabled); } function setEnabled(value) { if (enabled == value) { return(undefined); } enabled = value; if (enabled) { lastKeys = ""; Key.addListener(this); } else { Key.removeListener(this); } } function onKeyUp() { lastKeys = lastKeys + String.fromCharCode(Key.getAscii()); var _local2 = true; if (isSequenceEntered(CLEAR_SEQUENCE)) { storage.clear(); } else if (isSequenceEntered(TEST_MODE_SEQUENCE)) { storage.flipFlag(com.google.youtube.tv.services.StorageService.TEST_MODE); stats.sendTestModeToggle(); } else if (isSequenceEntered(DEBUG_VIEW_SEQUENCE) || (isSequenceEntered(DEBUG_VIEW_SEQUENCE_2))) { storage.flipFlag(com.google.youtube.tv.services.StorageService.DEBUG_VIEW); stats.sendDebugViewToggle(); } else if (isSequenceEntered(INFO_SEQUENCE)) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.SHOW_DEBUG_INFO)); } else if (isSequenceEntered(LGUPLUS_SEQUENCE)) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.LGUPLUS_FEATURE)); } else if (isSequenceEntered(RICH_CAPTIONS_SEQUENCE)) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.RICH_CAPTIONS_FEATURE)); } else if (isSequenceEntered(ALL_FEATURES_SEQUENCE)) { storage.flipFlag(com.google.youtube.tv.services.StorageService.ALL_FEATURES); } else { _local2 = false; } if (_local2) { lastKeys = ""; } else if (lastKeys.length > MAX_KEYS) { lastKeys = lastKeys.substr(lastKeys.length - MAX_KEYS); } } function isSequenceEntered(sequence) { return(lastKeys.substr(lastKeys.length - sequence.length) == sequence); } function onSwitchedToComponent(event) { setEnabled(!com.google.youtube.tv.controller.Switcher.getSwitcher().getTos().isNumpadHandled()); } static var CLEAR_SEQUENCE = "253272665437"; static var TEST_MODE_SEQUENCE = "86445383786633"; static var DEBUG_VIEW_SEQUENCE = "864453332848439"; static var DEBUG_VIEW_SEQUENCE_2 = "33284"; static var INFO_SEQUENCE = "4636"; static var LGUPLUS_SEQUENCE = "5487"; static var RICH_CAPTIONS_SEQUENCE = "1139"; static var ALL_FEATURES_SEQUENCE = "255332"; static var MAX_KEYS = com.google.utils.MathUtils.maxN(CLEAR_SEQUENCE.length, TEST_MODE_SEQUENCE.length, DEBUG_VIEW_SEQUENCE.length, DEBUG_VIEW_SEQUENCE_2.length, INFO_SEQUENCE.length, LGUPLUS_SEQUENCE.length, RICH_CAPTIONS_SEQUENCE.length, ALL_FEATURES_SEQUENCE.length); }
Symbol 20611 MovieClip [__Packages.com.google.youtube.tv.controller.ImageQueue] Frame 0
class com.google.youtube.tv.controller.ImageQueue { static var instance; var queue, sequence, loadFinishDelegate, scheduler, timeoutScheduler; function ImageQueue () { queue = []; sequence = com.google.youtube.tv.platform.Box.shouldLoadImagesInSequence(); loadFinishDelegate = com.google.chianti.event.EventDelegate.create(this, onImageLoadFinish); } static function getInstance() { if (!instance) { instance = new com.google.youtube.tv.controller.ImageQueue(); } return(instance); } function delayImageLoading(duration) { if (scheduler) { scheduler.stop(); } duration = Math.max(duration, targetTime - getTimer()); targetTime = getTimer() + duration; imageLoadingDelayed = true; scheduler = com.google.youtube.util.Scheduler.setTimeout(duration, com.google.chianti.event.EventDelegate.create(this, resumeLoading)); } function resumeLoading() { imageLoadingDelayed = false; check(); } function enqueue(image) { if (imageLoadingDelayed || (sequence)) { queue.push(image); check(); } else { image.load(); } } function dequeue(image) { var _local3 = 0; for ( ; _local3 < queue.length ; _local3++) { if (queue[_local3] == image) { image.unregisterEvents(com.google.youtube.tv.ui.Image.LOAD_COMPLETE, com.google.youtube.tv.ui.Image.LOAD_ERROR, loadFinishDelegate); queue.splice(_local3, 1); break; } } check(); } function check() { if (imageLoadingDelayed || (!queue.length)) { return(undefined); } var _local2 = queue[0]; if (sequence) { if (_local2.isLoaded()) { dequeue(_local2); } else if (!_local2.isLoading()) { if (timeoutScheduler) { timeoutScheduler.stop(); } timeoutScheduler = com.google.youtube.util.Scheduler.setTimeout(MAX_IMAGE_LOAD_MILLISECONDS, com.google.chianti.event.EventDelegate.create(this, dequeue, _local2)); _local2.registerEvents(com.google.youtube.tv.ui.Image.LOAD_COMPLETE, com.google.youtube.tv.ui.Image.LOAD_ERROR, loadFinishDelegate); if (!_local2.load()) { dequeue(_local2); } } } else { _local2.load(); dequeue(_local2); } } function onImageLoadFinish(event) { timeoutScheduler.stop(); dequeue(com.google.youtube.tv.ui.Image(event.target)); } static var MAX_IMAGE_LOAD_MILLISECONDS = 5000; var imageLoadingDelayed = false; var targetTime = -1; }
Symbol 20612 MovieClip [__Packages.com.google.youtube.tv.osk.layout.HangulLayout] Frame 0
class com.google.youtube.tv.osk.layout.HangulLayout implements com.google.youtube.tv.osk.layout.ILayout { function HangulLayout () { } function getKeys() { return(KO); } function getLangCode() { return("ko"); } function toString() { return("<HangulLayout />"); } static var KO = [12593, 12594, 12596, 12599, 12600, 12601, 12609, 12610, 12611, 12613, 12614, 12615, 12616, 12617, 12618, 12619, 12620, 12621, 12622, 12623, 12625, 12627, 12629, 12631, 12635, 12636, 12640, 12641, 12643, 12624, 12628, 12626, 12630]; }
Symbol 20613 MovieClip [__Packages.com.google.youtube.tv.util.Crypto] Frame 0
class com.google.youtube.tv.util.Crypto { static var aesCoder; function Crypto () { } static function getHashCode(value) { var _local3 = 0; var _local4 = 0; for ( ; _local4 < value.length ; _local4++) { _local3 = (31 * _local3) + value.charCodeAt(_local4); _local3 = _local3 % HASHCODE_MAX; } return(_local3); } static function encodeBase64(input) { return(com.google.youtube.tv.util.Base64.encodeByteArray(input)); } static function decodeBase64(input) { var _local3 = com.google.youtube.tv.util.Base64.decodeString(input); return(_local3); } static function setAesKey(key) { aesCoder = new com.google.youtube.tv.util.Aes(decodeBase64(key)); } static function setAesKeyArray(key) { aesCoder = new com.google.youtube.tv.util.Aes(key); } static function aesEncrypt(input) { return(aesCoder.encrypt(input)); } static function aesDecrypt(input) { var _local3 = decodeBase64(input); var _local4 = []; while (_local3.length > 0) { var _local5 = aesCoder.decrypt(_local3); _local4 = _local4.concat(_local5); _local3 = _local3.slice(16); } return(_local4); } static function hmacSha1Encrypt(key, message) { var _local4 = new com.google.youtube.tv.util.Hmac(new com.google.youtube.tv.util.Sha1(), key, 64); var _local5 = encodeBase64(_local4.getHMac(stringToBytes(message))); return(_local5); } static function encode(str) { var _local3 = []; var _local4 = 0; for ( ; _local4 < str.length ; _local4++) { var _local5 = str.charCodeAt(_local4) + ((_local4 % 10) * ((_local4 % 2) ? 1 : -1)); var _local6 = (_local5 + 256) % 256; _local3.push(String.fromCharCode(_local6)); } return(_local3.join("")); } static function decode(str) { var _local3 = []; var _local4 = 0; for ( ; _local4 < str.length ; _local4++) { var _local5 = str.charCodeAt(_local4) + ((_local4 % 10) * ((_local4 % 2) ? -1 : 1)); var _local6 = (_local5 + 256) % 256; _local3.push(String.fromCharCode(_local6)); } return(_local3.join("")); } static function stringToBytes(s) { var _local3 = new Array(s.length); var _local4 = 0; for ( ; _local4 < s.length ; _local4++) { _local3[_local4] = s.charCodeAt(_local4) & 255; } return(_local3); } static var HASHCODE_MAX = 1 << 32 /* shift 0 */; }
Symbol 20614 MovieClip [__Packages.com.google.youtube.tv.components.DialogWithCheckbox] Frame 0
class com.google.youtube.tv.components.DialogWithCheckbox extends com.google.youtube.tv.components.DialogWithButtons { var checkbox, setSelectedButtonId, buttons, build, clip, content, alignContent; function DialogWithCheckbox (parent) { super(parent); } function handleKey(keyCode) { if ((keyCode == Key.UP) || (keyCode == Key.DOWN)) { checkbox.setIsActive(keyCode == Key.DOWN); setSelectedButtonId(((keyCode == Key.UP) ? (buttons[0].data) : null)); return(true); } return(super.handleKey(keyCode)); } function remove() { if (checkbox) { checkbox.remove(); checkbox = null; } super.remove(); } function getCheckbox() { return(checkbox); } function initCheckbox(message, selected) { build(); if (!checkbox) { checkbox = new com.google.youtube.tv.view.ui.Checkbox(clip, com.google.youtube.tv.components.DialogBase.CONTENT_WIDTH, _global.NaN); checkbox.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.USER_ACTIVITY, com.google.chianti.event.EventDelegate.create(this, onCheckboxActivity)); content = checkbox; } checkbox.initText(message, 18, com.google.youtube.tv.ui.Colors.WHITE, false, null, true); checkbox.setSelected(selected); alignContent(); } function onCheckboxActivity(event) { setSelectedButtonId(null); } }
Symbol 20615 MovieClip [__Packages.com.google.youtube.tv.components.PairComponent] Frame 0
class com.google.youtube.tv.components.PairComponent extends com.google.youtube.tv.components.DialogWithButtons { var service, pop, instructions, qrImage, initialized, content, clip, title, phone, orQr, qrCodeTitle, devicesTitle, devicesList, alignButtons, devices, buttons, addButton, clear; function PairComponent (parent) { super(parent); service = com.google.youtube.tv.services.PairService.getInstance(); service.registerEvent(com.google.youtube.tv.services.PairService.PAIR_CODE_RETRIEVED, com.google.chianti.event.EventDelegate.create(this, onPairCodeRetrieved)); service.registerEvent(com.google.youtube.tv.services.PairService.PAIRED_LIST_UPDATE, com.google.chianti.event.EventDelegate.create(this, onPairedListUpdate)); service.registerEvent(com.google.youtube.tv.services.PairService.CLOSE_PAIRING_UI, com.google.chianti.event.EventDelegate.create(this, pop)); } function activate() { super.activate(); service.generatePairCode(); com.google.youtube.tv.services.StatsLoggerService.getInstance().sendPairInit(); instructions.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.LOADING)); } function deactivate() { service.stopTryingToPair(); qrImage.setImage(null); super.deactivate(); com.google.youtube.tv.services.StatsLoggerService.getInstance().clearPairSource(); } function build() { if (initialized) { return(undefined); } super.build(); content = new com.google.youtube.tv.ui.View(clip, "content"); title = new com.google.youtube.tv.ui.Text(content.clip, new flash.geom.Rectangle(0, 0, TITLE_WIDTH, TITLE_MAX_HEIGHT), com.google.youtube.tv.ui.Font.getFontSizeForHeight(TITLE_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); title.setMultiline(true); title.setAutoTruncate(true); title.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.PAIR_SCREEN_INSTRUCTIONS_PART1)); title.setWidth(title.getWidth() + 10); title.setHeight(title.getHeight() + 10); title.setPos(0, (TITLE_MAX_HEIGHT / 2) - title.getHeight()); phone = new com.google.youtube.tv.ui.Symbol(content.clip, "phoneLandscape", false); phone.setPos(PHONE_X, PHONE_Y); instructions = new com.google.youtube.tv.ui.Text(content.clip, INSTRUCTIONS_RECT, com.google.youtube.tv.ui.Font.getFontSizeForHeight(INSTRUCTIONS_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.MENU_GRAY); instructions.setMultiline(true); instructions.setAutoSize(true); instructions.setBackground(com.google.youtube.tv.ui.Colors.BLACK); var _local3 = com.google.youtube.tv.ui.Font.getComponentHeight(INSTRUCTIONS_LINE_HEIGHT); orQr = new com.google.youtube.tv.ui.Text(content.clip, new flash.geom.Rectangle(PHONE_X + phone.getWidth(), (PHONE_Y + (phone.getHeight() / 2)) - (_local3 / 2), (QR_TITLE_X - PHONE_X) - phone.getWidth(), _local3), com.google.youtube.tv.ui.Font.getFontSizeForHeight(INSTRUCTIONS_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.MENU_GRAY); orQr.setAutoSize(false); orQr.setAlign("center"); orQr.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.OR)); qrCodeTitle = new com.google.youtube.tv.ui.Text(content.clip, null, com.google.youtube.tv.ui.Font.getFontSizeForHeight(LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); qrCodeTitle.setPos(QR_TITLE_X, QR_TITLE_Y); qrCodeTitle.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.SCAN)); qrImage = new com.google.youtube.tv.ui.Image(content.clip, QR_IMAGE_RECT); com.google.youtube.tv.util.DrawUtil.drawRectangle(content.clip, QR_IMAGE_RECT.x, QR_IMAGE_RECT.y, QR_IMAGE_RECT.width, QR_IMAGE_RECT.height, 0, 0, 0, com.google.youtube.tv.ui.Colors.WHITE, 100); devicesTitle = new com.google.youtube.tv.ui.Text(content.clip, null, com.google.youtube.tv.ui.Font.getFontSizeForHeight(LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); devicesTitle.setPos(DEVICES_TITLE_X, DEVICES_TITLE_Y); devicesList = new com.google.youtube.tv.view.ui.list.List(content.clip, DEVICES_LIST_WIDTH, DEVICES_LIST_HEIGHT, DEVICES_LIST_SIZE, com.google.youtube.tv.view.ui.list.PairedDeviceListItem, DEVICES_LIST_ITEM_HEIGHT, 0); devicesList.setPos(DEVICES_LIST_X, DEVICES_LIST_Y); updateDevicesList(); } function alignContent() { content.setPos(Math.min(com.google.youtube.tv.components.DialogBase.CONTENT_X, (Stage.width / 2) - (content.getWidth() / 2)), com.google.youtube.tv.components.DialogBase.CONTENT_Y); alignButtons(content.getPos().x + devicesList.getPos().x, (content.getPos().y + devicesList.getPos().y) + devicesList.getHeight()); } function onPairCodeRetrieved(event) { qrImage.setImage(getQRCodeUrl(event.code)); var _local3 = com.google.youtube.tv.util.StringUtil.formatNumberString(event.code, " "); instructions.setHtmlText(getInstructions(true, _local3)); var _local4 = (instructions.getHeight() - phone.getHeight()) + (2 * PHONE_BORDER); if (_local4 > (PHONE_BORDER / 2)) { instructions.setHtmlText(com.google.youtube.tv.util.StringUtil.trim(getInstructions(false, _local3))); } } function onButtonClick(event) { var _local3 = event.target; if (_local3.data == CLEAR_ID) { service.resetPairingSettings(); } else { pop(); } } function getInstructions(useLineBreaks, code) { var _local4 = (useLineBreaks ? "<br>" : ""); return((((((com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.PAIR_SCREEN_INSTRUCTIONS_PART2, {LINK:_local4 + "<font color=\"#F1F1F1\">youtube.com/pair</font>"}) + "<br><font size=\"") + (10 * com.google.youtube.tv.app.Config.SCALE)) + "\">") + _local4) + "</font>") + com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.PAIR_SCREEN_INSTRUCTIONS_PART3, {CODE:((_local4 + "<font color=\"#F1F1F1\">") + code) + "</font>"})); } function onPairedListUpdate(event) { devices = event.devices || ([]); updateDevicesList(); } function updateDevicesList() { var _local2 = devices.length; devicesTitle.setVisible(_local2); devicesList.setVisible(_local2); devicesList.setData(devices); if (_local2) { if (buttons.length == 1) { var _local3 = addButton(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.PAIR_CLEAR_DEVICES), CLEAR_ID); _local3.setSize(DEVICES_LIST_WIDTH, _local3.getHeight()); } devicesTitle.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.PAIR_DEVICES)); } else { clear(); } alignContent(); } function getQRCodeUrl(code) { return((((("http://chart.apis.google.com/chart?cht=qr&chs=" + QR_SIZE) + "x") + QR_SIZE) + "&chl=") + _global.escape("http://m.youtube.com/pair?pairingCode=" + code)); } static var CLEAR_ID = "clear"; static var LINE_HEIGHT = 19; static var TITLE_LINE_HEIGHT = 29; static var TITLE_WIDTH = 1000 * com.google.youtube.tv.app.Config.SCALE; static var TITLE_MAX_HEIGHT = 130 * com.google.youtube.tv.app.Config.SCALE; static var PHONE_X = 0; static var PHONE_Y = 88 * com.google.youtube.tv.app.Config.SCALE; static var PHONE_BORDER = 20 * com.google.youtube.tv.app.Config.SCALE; static var INSTRUCTIONS_LINE_HEIGHT = 22; static var INSTRUCTIONS_RECT = new flash.geom.Rectangle(73 * com.google.youtube.tv.app.Config.SCALE, PHONE_Y + PHONE_BORDER, 305 * com.google.youtube.tv.app.Config.SCALE, 193 * com.google.youtube.tv.app.Config.SCALE); static var QR_TITLE_X = 529 * com.google.youtube.tv.app.Config.SCALE; static var QR_TITLE_Y = 75 * com.google.youtube.tv.app.Config.SCALE; static var QR_SIZE = Math.round(199 * com.google.youtube.tv.app.Config.SCALE); static var QR_IMAGE_RECT = new flash.geom.Rectangle(530 * com.google.youtube.tv.app.Config.SCALE, 110 * com.google.youtube.tv.app.Config.SCALE, QR_SIZE, QR_SIZE); static var DEVICES_TITLE_X = 755 * com.google.youtube.tv.app.Config.SCALE; static var DEVICES_TITLE_Y = QR_TITLE_Y; static var DEVICES_LIST_X = DEVICES_TITLE_X + (4 * com.google.youtube.tv.app.Config.SCALE); static var DEVICES_LIST_Y = QR_IMAGE_RECT.y; static var DEVICES_LIST_WIDTH = 244 * com.google.youtube.tv.app.Config.SCALE; static var DEVICES_LIST_HEIGHT = 159 * com.google.youtube.tv.app.Config.SCALE; static var DEVICES_LIST_SIZE = 4; static var DEVICES_LIST_ITEM_HEIGHT = 35 * com.google.youtube.tv.app.Config.SCALE; }
Symbol 20616 MovieClip [__Packages.com.google.youtube.tv.ui.FontInfoDiff] Frame 0
class com.google.youtube.tv.ui.FontInfoDiff { function FontInfoDiff () { } function toString() { return((((((("FontInfoDiff " + leftPaddingsDiff) + newline) + rightPaddingsDiff) + newline) + topPaddingsDiff) + newline) + heightMatchFontSizes); } var leftPaddingsDiff = []; var rightPaddingsDiff = []; var topPaddingsDiff = []; var heightMatchFontSizes = []; }
Symbol 20617 MovieClip [__Packages.com.google.youtube.tv.osk.OskInfo] Frame 0
class com.google.youtube.tv.osk.OskInfo { var char, span, translation, iconId, iconIsBitmap, align; function OskInfo (opt_char, opt_span, opt_translation, opt_iconId, opt_iconIsBitmap, opt_align) { char = opt_char; span = opt_span || 1; translation = opt_translation || ""; iconId = opt_iconId; iconIsBitmap = opt_iconIsBitmap; align = opt_align || (CENTER); } static var CENTER = "center"; static var LEFT = "left"; static var RIGHT = "right"; static var SPACE = com.google.youtube.tv.services.MessagesService.SPACE_BTN; static var CLEAR = com.google.youtube.tv.services.MessagesService.CLEAR_BTN; static var OK = com.google.youtube.tv.services.MessagesService.OK_BTN; static var CANCEL = com.google.youtube.tv.services.MessagesService.CANCEL_BTN; static var BACK = com.google.youtube.tv.services.MessagesService.BACK_BTN; static var TRANSLITERATE = "TRANSLITERATE"; static var BACKSPACE = com.google.youtube.tv.services.MessagesService.BACKSPACE_BTN; }
Symbol 20618 MovieClip [__Packages.com.adobe.serialization.json.JSONDecoder] Frame 0
class com.adobe.serialization.json.JSONDecoder { var tokenizer, value, token; function JSONDecoder (s) { tokenizer = new com.adobe.serialization.json.JSONTokenizer(s); nextToken(); value = parseValue(); } function getValue() { return(value); } function nextToken() { return((token = tokenizer.getNextToken())); } function parseArray() { var _local2 = new Array(); nextToken(); if (token.type == com.adobe.serialization.json.JSONTokenType.RIGHT_BRACKET) { return(_local2); } while (true) { _local2.push(parseValue()); nextToken(); if (token.type == com.adobe.serialization.json.JSONTokenType.RIGHT_BRACKET) { return(_local2); } if (token.type == com.adobe.serialization.json.JSONTokenType.COMMA) { nextToken(); } else { tokenizer.parseError("Expecting ] or , but found " + token.value); } } return(null); } function parseObject() { var _local2 = new Object(); nextToken(); if (token.type == com.adobe.serialization.json.JSONTokenType.RIGHT_BRACE) { return(_local2); } while (true) { if (token.type == com.adobe.serialization.json.JSONTokenType.STRING) { var _local3 = String(token.value); nextToken(); if (token.type == com.adobe.serialization.json.JSONTokenType.COLON) { nextToken(); _local2[_local3] = parseValue(); nextToken(); if (token.type == com.adobe.serialization.json.JSONTokenType.RIGHT_BRACE) { return(_local2); } if (token.type == com.adobe.serialization.json.JSONTokenType.COMMA) { nextToken(); } else { tokenizer.parseError("Expecting } or , but found " + token.value); } } else { tokenizer.parseError("Expecting : but found " + token.value); } } else { tokenizer.parseError("Expecting string but found " + token.value); } } return(null); } function parseValue() { switch (token.type) { case com.adobe.serialization.json.JSONTokenType.LEFT_BRACE : return(parseObject()); case com.adobe.serialization.json.JSONTokenType.LEFT_BRACKET : return(parseArray()); case com.adobe.serialization.json.JSONTokenType.STRING : case com.adobe.serialization.json.JSONTokenType.NUMBER : case com.adobe.serialization.json.JSONTokenType.TRUE : case com.adobe.serialization.json.JSONTokenType.FALSE : case com.adobe.serialization.json.JSONTokenType.NULL : return(token.value); } tokenizer.parseError("Unexpected " + token.value); return(null); } }
Symbol 20619 MovieClip [__Packages.com.google.testing.AssertionFailedError] Frame 0
class com.google.testing.AssertionFailedError extends Error { function AssertionFailedError (message) { super(message); } }
Symbol 20620 MovieClip [__Packages.com.google.youtube.tv.components.MenuButton] Frame 0
class com.google.youtube.tv.components.MenuButton extends com.google.youtube.tv.view.ui.Button { var initText, textView, enabled, clip, isUp, selected, width, height; function MenuButton (parent, width, height) { super(parent, width, height); initText("", MENU_ITEM_LINE_HEIGHT, 0); textView.setAlign("right"); } function drawState() { super.drawState(); clip._alpha = (enabled ? 100 : (DISABLED_ALPHA)); textView.setTextColor((((!isUp) || (selected)) ? (com.google.youtube.tv.ui.Colors.WHITE) : (com.google.youtube.tv.ui.Colors.MENU_GRAY))); } function getTextWidth() { return((width - RIGHT_MARGIN) - LEFT_MARGIN); } function alignContent() { textView.setPos(LEFT_MARGIN, (height / 2) - (textView.getHeight() / 2)); } function drawBackground() { com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, width, height, 0, 0, 0, 0, 0); if ((!isUp) || (selected)) { com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, (height / 2) - (BACKGROUND_HEIGHT / 2), width, BACKGROUND_HEIGHT, 0, 0, 0, com.google.youtube.tv.ui.Colors.WHITE, 10); } } static var LEFT_MARGIN = 65 * com.google.youtube.tv.app.Config.SCALE; static var RIGHT_MARGIN = 18 * com.google.youtube.tv.app.Config.SCALE; static var BACKGROUND_HEIGHT = 30 * com.google.youtube.tv.app.Config.SCALE; static var MENU_ITEM_LINE_HEIGHT = 17; static var DISABLED_ALPHA = 50; }
Symbol 20621 MovieClip [__Packages.com.google.youtube.tv.ui.FontInfo] Frame 0
class com.google.youtube.tv.ui.FontInfo { var leftPaddings, rightPaddings, topPaddings, heights, fontSizeForHeights; function FontInfo () { super(); leftPaddings = []; rightPaddings = []; topPaddings = []; heights = []; fontSizeForHeights = {}; } static function diff(canonical, current) { var _local4 = new com.google.youtube.tv.ui.FontInfoDiff(); _local4.leftPaddingsDiff = substractArray(canonical.leftPaddings, current.leftPaddings); _local4.rightPaddingsDiff = substractArray(canonical.rightPaddings, current.rightPaddings); _local4.topPaddingsDiff = substractArray(canonical.topPaddings, current.topPaddings); var _local5 = 0; var _local6 = Math.min(Math.min(com.google.youtube.tv.ui.Font.MAX_FONT_SIZE + 1, canonical.heights.length), current.heights.length); var _local7 = 0; for ( ; _local7 < _local6 ; _local7++) { var _local8 = canonical.heights[_local7]; var _local9 = Math.max(0, _local5 - 1); for ( ; _local9 < _local6 ; _local9++) { if (current.heights[_local9] >= _local8) { _local4.heightMatchFontSizes[_local7] = _local9; _local5 = _local9; break; } } } return(_local4); } static function substractArray(array1, array2) { var _local4 = []; var _local5 = 0; for ( ; _local5 < array1.length ; _local5++) { _local4[_local5] = array1[_local5] - array2[_local5]; } return(_local4); } function fill(fontSize, leftPadding, rightPadding, topPadding, height) { leftPaddings[fontSize] = leftPadding; rightPaddings[fontSize] = rightPadding; topPaddings[fontSize] = topPadding; heights[fontSize] = height; if (!leftPaddings[0]) { leftPaddings[0] = leftPadding; rightPaddings[0] = rightPadding; topPaddings[0] = topPadding; heights[0] = Math.floor(height / 2); } var _local7 = fontSize - 1; for ( ; _local7 > lastFillFontSize ; _local7--) { var _local8 = (_local7 - lastFillFontSize) / (fontSize - lastFillFontSize); leftPaddings[_local7] = Math.round(leftPaddings[lastFillFontSize] + ((leftPaddings[fontSize] - leftPaddings[lastFillFontSize]) * _local8)); rightPaddings[_local7] = Math.round(rightPaddings[lastFillFontSize] + ((rightPaddings[fontSize] - rightPaddings[lastFillFontSize]) * _local8)); topPaddings[_local7] = Math.round(topPaddings[lastFillFontSize] + ((topPaddings[fontSize] - topPaddings[lastFillFontSize]) * _local8)); heights[_local7] = Math.round(heights[lastFillFontSize] + ((heights[fontSize] - heights[lastFillFontSize]) * _local8)); } lastFillFontSize = fontSize; } function toString() { return(((((((("FontInfo [" + leftPaddings.join(", ")) + "]\n[") + rightPaddings.join(", ")) + "]\n[") + topPaddings.join(", ")) + "]\n[") + heights.join(", ")) + "]"); } function clone() { var _local2 = new com.google.youtube.tv.ui.FontInfo(); _local2.leftPaddings = leftPaddings.concat(); _local2.rightPaddings = rightPaddings.concat(); _local2.topPaddings = topPaddings.concat(); _local2.heights = heights.concat(); for (var p in fontSizeForHeights) { _local2.fontSizeForHeights[p] = fontSizeForHeights[p]; } return(_local2); } var lastFillFontSize = 0; }
Symbol 20622 MovieClip [__Packages.com.google.youtube.tv.view.ui.PageNavigationButton] Frame 0
class com.google.youtube.tv.view.ui.PageNavigationButton extends com.google.youtube.tv.view.ui.ButtonBase { var setUsingKeys, textView, broadcast, arrowClip, enabled, isUp, selected, width, height, clip; function PageNavigationButton (container, direction, opt_labelPosition) { super(container, SIZE, SIZE) arrowDirection = direction; labelPosition = opt_labelPosition || (LABEL_RIGHT); setUsingKeys(false); } function setText(value) { textView.setText(value); drawState(); broadcast({type:com.google.youtube.tv.view.ui.UIComponentBase.CHANGE}); } function drawState() { arrowClip._x = 0; arrowClip._y = 0; arrowClip.clear(); arrowClip._alpha = (enabled ? 100 : 40); var _local2 = (isUp ? (com.google.youtube.tv.ui.Colors.BLACK) : (com.google.youtube.tv.ui.Colors.WHITE)); var _local3 = (isUp ? ((selected ? 20 : 100)) : 50); com.google.youtube.tv.util.DrawUtil.drawRectangle(arrowClip, 0, 0, SIZE, SIZE, 0, 0, 0, _local2, _local3); com.google.youtube.tv.util.DrawUtil.drawTriangle(arrowClip, (SIZE / 2) - (ARROW_WIDTH / 2), (SIZE / 2) - (ARROW_HEIGHT / 2), ARROW_WIDTH, ARROW_HEIGHT, 0, 0, 0, com.google.youtube.tv.ui.Colors.WHITE, 100); var _local4 = 0; var _local5 = 0; var _local6 = textView.getWidth(); switch (labelPosition) { case LABEL_LEFT : case LABEL_RIGHT : width = SIZE + (textView.getText() ? (_local6 + SPACING) : 0); height = SIZE; if (labelPosition == LABEL_LEFT) { _local4 = arrowClip._x - (_local6 + SPACING); } else { _local4 = (arrowClip._x + SIZE) + SPACING; } _local5 = ((height - textView.getHeight()) / 2) + ((arrowDirection == UP) ? 1 : 0); rotateArrow(); break; case LABEL_BOTTOM : case LABEL_TOP : if (labelPosition == LABEL_BOTTOM) { _local5 = (arrowClip._y + SIZE) + SPACING; } else { _local5 = -(textView.getHeight() + SPACING); } _local4 = 0; arrowClip._x = (_local6 - SIZE) / 2; rotateArrow(); height = (SIZE + textView.getHeight()) + SPACING; width = _local6; } textView.setPos(_local4, _local5); } function build() { arrowClip = clip.createEmptyMovieClip("arrowClip", clip.getNextHighestDepth()); textView = new com.google.youtube.tv.ui.Text(clip, null, com.google.youtube.tv.ui.Font.getFontSizeForHeight(LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); super.build(); } function rotateArrow() { switch (arrowDirection) { case UP : arrowClip._rotation = 180; arrowClip._y = arrowClip._y + SIZE; arrowClip._x = arrowClip._x + SIZE; return(undefined); case LEFT : arrowClip._rotation = 90; arrowClip._x = arrowClip._x + SIZE; return(undefined); case RIGHT : arrowClip._rotation = 270; arrowClip._y = arrowClip._y + SIZE; return(undefined); } } static var UP = "UP"; static var DOWN = "DOWN"; static var LEFT = "LEFT"; static var RIGHT = "RIGHT"; static var LABEL_BOTTOM = "LABEL_BOTTOM"; static var LABEL_LEFT = "LABEL_LEFT"; static var LABEL_RIGHT = "LABEL_RIGHT"; static var LABEL_TOP = "LABEL_TOP"; static var SIZE = 44 * com.google.youtube.tv.app.Config.SCALE; static var ARROW_SIZE = 7 * com.google.youtube.tv.app.Config.SCALE; static var ARROW_WIDTH = 3 * ARROW_SIZE; static var ARROW_HEIGHT = 2 * ARROW_SIZE; static var SPACING = 5 * com.google.youtube.tv.app.Config.SCALE; static var LINE_HEIGHT = 17; var arrowDirection = UP; var labelPosition = LABEL_RIGHT; }
Symbol 20623 MovieClip [__Packages.com.google.youtube.tv.services.VideoManageService] Frame 0
class com.google.youtube.tv.services.VideoManageService extends com.google.chianti.event.EventBroadcaster { static var instance; var stats, loader, request, broadcast; function VideoManageService () { super(); com.google.chianti.event.EventBroadcaster.initialize(this); stats = com.google.youtube.tv.services.StatsLoggerService.getInstance(); loader = new XML(); loader.ignoreWhite = true; loader.onData = com.google.chianti.event.EventDelegate.create(this, onData); } static function getInstance() { if (!instance) { instance = new com.google.youtube.tv.services.VideoManageService(); } return(instance); } function isLoading() { return(currentAction); } function dislike(videoId) { if (com.google.youtube.tv.services.SignInService.isSignedIn() && (!currentAction)) { stats.sendDislikeFeatureUse(); currentAction = ACTION_DISLIKE; sendLikeDislike("dislike", videoId); } } function like(videoId) { if (com.google.youtube.tv.services.SignInService.isSignedIn() && (!currentAction)) { stats.sendLikeFeatureUse(); currentAction = ACTION_LIKE; sendLikeDislike("like", videoId); } } function subscribe(userId) { if (com.google.youtube.tv.services.SignInService.isSignedIn() && (!currentAction)) { stats.sendSubscribeFeatureUse(); currentAction = ACTION_SUBSCRIBE; currentUserId = userId; var _local3 = ((((((("<entry xmlns=\"http://www.w3.org/2005/Atom\"" + "xmlns:yt=\"http://gdata.youtube.com/schemas/2007\">") + "<category scheme=\"") + "http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat\"") + "term=\"channel\"/>") + "<yt:username>") + currentUserId) + "</yt:username>") + "</entry>"; request = new XML(_local3); sendRequest(request, SERVICE_URL + "users/default/subscriptions"); } } function unsubscribe(subscriptionId) { if (com.google.youtube.tv.services.SignInService.isSignedIn() && (!currentAction)) { stats.sendUnsubscribeFeatureUse(); currentAction = ACTION_UNSUBSCRIBE; currentSubscriptionId = subscriptionId; var _local3 = new XML("<entry/>"); _local3.addRequestHeader("X-HTTP-Method-Override", "DELETE"); sendRequest(_local3, com.google.youtube.tv.util.StringUtil.replacePlaceholders(UNSUBSCRIBE_TEMPLATE, {subscriptionId:subscriptionId})); } } function addToPlaylist(playlistId, videoId) { if (com.google.youtube.tv.services.SignInService.isSignedIn() && (!currentAction)) { stats.sendAddToPlaylistFeatureUse(); currentAction = ACTION_ADD; var _local4 = ((((("<entry xmlns=\"http://www.w3.org/2005/Atom\"" + "xmlns:yt=\"http://gdata.youtube.com/schemas/2007\">") + "<id>") + videoId) + "</id>") + "<yt:position>1</yt:position>") + "</entry>"; currentPlaylistId = playlistId; request = new XML(_local4); sendRequest(request, (SERVICE_URL + "playlists/") + playlistId); } } function sendLikeDislike(action, videoId) { var _local4 = (((("<entry xmlns=\"http://www.w3.org/2005/Atom\"" + "xmlns:yt=\"http://gdata.youtube.com/schemas/2007\">") + "<yt:rating value=\"") + action) + "\"/>") + "</entry>"; request = new XML(_local4); sendRequest(request, ((SERVICE_URL + "videos/") + videoId) + "/ratings"); } function sendRequest(xml, url) { xml.addRequestHeader("X-GData-Key", "key=" + com.google.youtube.tv.app.Config.DEV_KEY); xml.addRequestHeader("GData-Version", "2.1"); xml.addRequestHeader("Content-Type", "application/atom+xml"); xml.sendAndLoad((url + "?access_token=") + com.google.youtube.tv.services.SignInService.getInstance().accessToken, loader, "POST"); } function onData(src) { if (src || (currentAction == ACTION_UNSUBSCRIBE)) { if (currentAction == ACTION_SUBSCRIBE) { com.google.youtube.tv.tree.ContentTree.getRoot().getUserSubscriptionsNode().addSubscription(src); } else if (currentAction == ACTION_UNSUBSCRIBE) { com.google.youtube.tv.tree.ContentTree.getRoot().getUserSubscriptionsNode().removeSubscription(currentSubscriptionId); } finish({type:COMPLETE, playlistId:currentPlaylistId, userId:currentUserId}); } else { fail(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.ERROR)); } } function finish(event) { currentAction = null; currentPlaylistId = null; currentUserId = null; currentSubscriptionId = null; request = null; broadcast(event); } function fail(message) { finish({type:ERROR, message:message}); } static var COMPLETE = "COMPLETE"; static var ERROR = "ERROR"; static var HTTP_STATUS = "HTTP_STATUS"; static var SERVICE_URL = "https://gdata.youtube.com/feeds/api/"; static var SUBSCRIPTIONS_SELECTOR = "/feed/entry[*]/yt:channelId"; static var UNSUBSCRIBE_TEMPLATE = "${gdataUrl}/feeds/api/users/default/subscriptions/${subscriptionId}"; static var ACTION_DISLIKE = "ACTION_DISLIKE"; static var ACTION_LIKE = "ACTION_LIKE"; static var ACTION_SUBSCRIBE = "ACTION_SUBSCRIBE"; static var ACTION_UNSUBSCRIBE = "ACTION_UNSUBSCRIBE"; static var ACTION_ADD = "ACTION_ADD"; var currentAction = null; var currentUserId = null; var currentSubscriptionId = null; var currentPlaylistId = null; }
Symbol 20624 MovieClip [__Packages.com.google.youtube.tv.experiments.ExperimentsService] Frame 0
class com.google.youtube.tv.experiments.ExperimentsService extends com.google.chianti.event.EventBroadcaster { static var instance; var ready, broadcast; function ExperimentsService () { super(); com.google.chianti.event.EventBroadcaster.initialize(this); com.google.youtube.tv.services.StorageService.get().registerEvent(com.google.youtube.tv.services.StorageService.STORAGE_READY, com.google.chianti.event.EventDelegate.create(this, check)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.OVERRIDEN_FLASHVARS_RECEIVE, com.google.chianti.event.EventDelegate.create(this, check)); } static function getInstance() { if (!instance) { instance = new com.google.youtube.tv.experiments.ExperimentsService(); } return(instance); } function isReady() { return(ready); } function check() { if (com.google.youtube.tv.app.Environment.isLoading() || ((!com.google.youtube.tv.services.StorageService.get().isReady()) || (ready))) { return(undefined); } var _local2 = com.google.youtube.tv.services.StorageService.get().getUuid(); var _local3 = Number("0x" + _local2.substr(0, 3)); if (_global.isNaN(_local3) || (_local3 == 0)) { _local3 = 1; } var _local4 = Math.ceil((_local3 / 4095) * 100); for (var i in com.google.youtube.tv.experiments.Experiment) { if (com.google.youtube.tv.experiments.Experiment[i] instanceof com.google.youtube.tv.experiments.Experiment) { initializeExperiment(com.google.youtube.tv.experiments.Experiment[i], _local4); } } for (var i in com.google.youtube.tv.experiments.VariantExperiment) { if (com.google.youtube.tv.experiments.VariantExperiment[i] instanceof com.google.youtube.tv.experiments.VariantExperiment) { initializeExperiment(com.google.youtube.tv.experiments.VariantExperiment[i], _local4); } } ready = true; broadcast({type:READY}); } function initializeExperiment(exp, hit) { if (exp.setActive((hit > exp.getStart()) && (hit <= exp.getEnd()))) { ACTIVE_EXPERIMENTS.push(exp); } } static var READY = "READY"; static var ACTIVE_EXPERIMENTS = []; }
Symbol 20625 MovieClip [__Packages.com.google.youtube.tv.components.MenuComponent] Frame 0
class com.google.youtube.tv.components.MenuComponent extends com.google.youtube.tv.ui.View { var menuLocation, background, clip, search, back, down, up, menuButtons, line, cursor, selectedButton, broadcast, menuNode; function MenuComponent (parent, location) { super(parent, "menu"); menuLocation = location; menuLocation.addSinkFunction(com.google.chianti.event.EventDelegate.create(this, onMenuLocationChange)); background = new com.google.youtube.tv.ui.Rect(clip, new flash.geom.Rectangle(0, 0, MENU_WIDTH, Stage.height), com.google.youtube.tv.ui.Colors.BLACK, BACKGROUND_ALPHA); search = new com.google.youtube.tv.components.MenuControlButton(clip, BUTTON_WIDTH, BUTTON_SIZE, "searchIcon"); search.setUsingKeys(false); search.setPos(LEFT_MARGIN, SEARCH_TOP); search.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.SEARCH_MENU_ITEM)); search.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onControlButtonClick)); back = new com.google.youtube.tv.components.MenuControlButton(clip, BUTTON_WIDTH, BUTTON_SIZE, "backIcon"); back.setUsingKeys(false); back.setPos(LEFT_MARGIN, BACK_TOP); back.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.BACK_BTN)); back.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onControlButtonClick)); down = new com.google.youtube.tv.view.ui.PageNavigationButton(clip, com.google.youtube.tv.view.ui.PageNavigationButton.DOWN); down.setPos(SCROLL_LEFT, 0); down.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onDownClick)); up = new com.google.youtube.tv.view.ui.PageNavigationButton(clip, com.google.youtube.tv.view.ui.PageNavigationButton.UP); up.setPos(SCROLL_LEFT, SCROLL_UP_TOP); up.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onUpClick)); menuButtons = []; var _local5 = 0; for ( ; _local5 < MENU_MAX_SIZE ; _local5++) { var _local6 = new com.google.youtube.tv.components.MenuButton(clip, MENU_WIDTH, MENU_ITEM_HEIGHT); _local6.setUsingKeys(false); _local6.setPos(0, MENU_FIRST_ITEM_TOP + (MENU_ITEM_HEIGHT * _local5)); _local6.setVisible(false); _local6.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onMenuButtonClick)); menuButtons.push(_local6); } line = clip.createEmptyMovieClip("line", clip.getNextHighestDepth()); line.clear(); line.lineStyle(1, com.google.youtube.tv.ui.Colors.WHITE, 30); line.moveTo(MENU_WIDTH, -LINE_THICKNESS); line.lineTo(MENU_WIDTH, Stage.height + LINE_THICKNESS); cursor = new com.google.youtube.tv.ui.Rect(clip, new flash.geom.Rectangle(0, 0, CURSOR_WIDTH, CURSOR_HEIGHT), com.google.youtube.tv.ui.Colors.RED); refresh(); } function isCollapsed() { return(collapsed); } function setCollapsed(value) { if (collapsed == value) { return(undefined); } collapsed = value; refresh(); } function isControlButtonSelected() { return(selectedButton); } function navigate(offset) { if ((!selectedButton) && (offset == -1)) { setSelectedButton((back.isVisible() ? (back) : (search))); } else if ((selectedButton == back) && (offset == -1)) { setSelectedButton(search); } else if ((selectedButton == search) && (offset == 1)) { setSelectedButton((back.isVisible() ? (back) : null)); } else if ((selectedButton == back) && (offset == 1)) { setSelectedButton(null); } else { return(false); } return(true); } function enter() { if (selectedButton) { selectedButton.emulateClick(); return(true); } return(false); } function refresh() { background.setVisible(!collapsed); updateControlButtons(); if (collapsed) { var _local2 = 0; for ( ; _local2 < MENU_MAX_SIZE ; _local2++) { hideMenuButton(menuButtons[_local2]); } updateUpDownButtons(0, 0, 0); } else { var _local3 = (isMenuCapturing() ? ([menuLocation.getValue()]) : (menuLocation.getNode().getChildren())); var _local4 = (isMenuCapturing() ? 0 : (menuLocation.getIndex())); var _local5 = Math.min(MENU_MAX_SIZE, _local3.length); var _local6 = getStartIndex(_local3.length, _local5, _local4); var _local7 = 0; for ( ; _local7 < _local5 ; _local7++) { var _local8 = _local6 + _local7; showMenuButton(menuButtons[_local7], _local3[_local8], (_local8 == _local4) && (!isControlButtonSelected())); } var _local9 = _local5; for ( ; _local9 < MENU_MAX_SIZE ; _local9++) { hideMenuButton(menuButtons[_local9]); } updateUpDownButtons(_local3.length, _local5, _local4); } updateCursor(); } function getStartIndex(nodesLength, listSize, selectedIndex) { if (nodesLength <= listSize) { return(0); } var _local5 = selectedIndex - Math.round(listSize / 2); var _local6 = nodesLength - listSize; return(Math.max(0, Math.min(_local5, _local6))); } function showMenuButton(menuButton, treeNode, isSelected) { menuButton.setText(treeNode.getTitle()); menuButton.setSelected(isSelected); menuButton.treeNode = treeNode; menuButton.setVisible(true); } function hideMenuButton(menuButton) { menuButton.setVisible(false); } function updateCursor() { var _local2 = false; if (!collapsed) { var _local3 = 0; for ( ; _local3 < menuButtons.length ; _local3++) { var _local4 = menuButtons[_local3]; if (!_local4.isVisible()) { break; } if (_local4.isSelected()) { cursor.setPos(MENU_WIDTH - LINE_THICKNESS, (_local4.getPos().y + (_local4.getHeight() / 2)) - (cursor.getHeight() / 2)); _local2 = true; break; } } } line._visible = !collapsed; cursor.setVisible(_local2); } function updateUpDownButtons(nodesLength, listSize, selectedIndex) { var _local5 = (!collapsed) && ((listSize > nodesLength) || (com.google.youtube.tv.platform.Box.hasMouse() && (!isMenuCapturing()))); if (!_local5) { up.setVisible(false); down.setVisible(false); } else { up.setVisible(true); up.setEnabled(selectedIndex > 0); var _local6 = getLastVisibleMenuButton(); down.setVisible(_local6); if (_local6) { down.setEnabled(selectedIndex < (nodesLength - 1)); down.setPos(down.getPos().x, (_local6.getPos().y + _local6.getHeight()) + SCROLL_GAP); } } } function getLastVisibleMenuButton() { var _local2 = 0; for ( ; _local2 < menuButtons.length ; _local2++) { if (!com.google.youtube.tv.components.MenuButton(menuButtons[_local2]).isVisible()) { return((_local2 ? (menuButtons[_local2 - 1]) : null)); } } return(menuButtons[menuButtons.length - 1]); } function updateControlButtons() { back.setVisible((!isTopLevelMenuItem()) || (com.google.youtube.tv.platform.Box.hasMouse())); } function selectMenu() { if (selectedButton) { setSelectedButton(null); } else { refresh(); } } function isTopLevelMenuItem() { return(menuLocation.getNode().parent == null); } function setSelectedButton(value) { if (selectedButton == value) { return(undefined); } if (selectedButton) { selectedButton.setSelected(false); } selectedButton = value; if (selectedButton) { selectedButton.setSelected(true); } refresh(); broadcast({type:CONTROL_SELECTION_CHANGE}); } function isMenuCapturing() { var _local2 = menuLocation.getNode(); return((_local2 != null) && (_local2.isMenuCapturing())); } function onMenuLocationChange() { var _local2 = menuLocation.getNode(); if (_local2 != menuNode) { menuNode = _local2; setSelectedButton(null); } refresh(); } function onDownClick(event) { broadcast({type:DOWN}); } function onUpClick(event) { broadcast({type:UP}); } function onControlButtonClick(event) { broadcast({type:((event.target == search) ? (SEARCH) : (BACK))}); } function onMenuButtonClick(event) { broadcast({type:SELECT, index:com.google.youtube.tv.components.MenuButton(event.target).treeNode.index}); } static var SEARCH = "SEARCH"; static var BACK = "BACK"; static var UP = "UP"; static var DOWN = "DOWN"; static var SELECT = "SELECT"; static var CONTROL_SELECTION_CHANGE = "CONTROL_SELECTION_CHANGE"; static var MENU_WIDTH = 323 * com.google.youtube.tv.app.Config.SCALE; static var BACKGROUND_ALPHA = 50; static var TOP_MARGIN = 44 * com.google.youtube.tv.app.Config.SCALE; static var LEFT_MARGIN = 65 * com.google.youtube.tv.app.Config.SCALE; static var RIGHT_MARGIN = 20 * com.google.youtube.tv.app.Config.SCALE; static var BOTTOM_MARGIN = 44 * com.google.youtube.tv.app.Config.SCALE; static var LINE_THICKNESS = 1; static var CURSOR_WIDTH = 3; static var CURSOR_HEIGHT = 30 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_SIZE = 44 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_WIDTH = (MENU_WIDTH - LEFT_MARGIN) - RIGHT_MARGIN; static var SEARCH_TOP = TOP_MARGIN; static var BACK_TOP = (SEARCH_TOP + BUTTON_SIZE) + (5 * com.google.youtube.tv.app.Config.SCALE); static var SCROLL_LEFT = (MENU_WIDTH - BUTTON_SIZE) - RIGHT_MARGIN; static var SCROLL_UP_TOP = (BACK_TOP + BUTTON_SIZE) + (24 * com.google.youtube.tv.app.Config.SCALE); static var SCROLL_GAP = 12 * com.google.youtube.tv.app.Config.SCALE; static var MENU_FIRST_ITEM_TOP = (SCROLL_UP_TOP + BUTTON_SIZE) + SCROLL_GAP; static var MENU_ITEM_HEIGHT = 46 * com.google.youtube.tv.app.Config.SCALE; static var MENU_MAX_SIZE = 8; static var MENU_STRIDE = 56 * com.google.youtube.tv.app.Config.SCALE; var collapsed = false; }
Symbol 20626 MovieClip [__Packages.com.google.youtube.tv.tree.ComplexFeedNode] Frame 0
class com.google.youtube.tv.tree.ComplexFeedNode extends com.google.youtube.tv.tree.PlaylistFeedNode { var steps, getChildren, phase, loadStarted, currentStep, url, appendDefaultParamsToUrl, needLoadMore, setLoaded, cobj, getData, title, addItem, removeItem, instanceId, count; function ComplexFeedNode (title, stepsValue) { super(title); steps = stepsValue; prepareForNextStepAndLoad(); } function loadToIndex(index) { var _local3 = (index - getChildren().length) + 1; if ((_local3 > 0) && (phase == SINGLE_VIDEO_FEEDS)) { requestsInRowCount = _local3; prepareForNextStepAndLoad(); } } function load() { } function prepareForNextStepAndLoad() { if (steps.length && (!loadStarted)) { currentStep = steps.shift(); url = appendDefaultParamsToUrl(currentStep.url); needLoadMore = currentStep.needLoadMore; phase = (needLoadMore ? (CONTINUOUS_FEED) : (SINGLE_VIDEO_FEEDS)); setLoaded(false); super.load(); if (phase == SINGLE_VIDEO_FEEDS) { requestsInRowCount--; } } } function parse(src) { var _local3 = new XML(); _local3.parseXML(src); cobj = com.google.youtube.tv.util.Xtract.getComplexValues(_local3, currentStep.xtractor || (com.google.youtube.tv.tree.PlaylistFeedNode.DEFAULT_XTRACTOR)); currentStep = null; } function createChildren() { var _local2 = getData(); var _local3 = 0; for ( ; _local3 < _local2.length ; _local3++) { for ( ; !_local2[_local3].videoId ; _local3++) { } if (!title) { title = _local2[_local3].title; } var _local4 = new com.google.youtube.tv.tree.VideoNode(_local2[_local3]); addItem(_local4); } if (!_local2.length) { needLoadMore = false; } } function loadMore() { if (loadStarted) { return(undefined); } if (phase == SINGLE_VIDEO_FEEDS) { requestsInRowCount = requestsInRowCount + com.google.youtube.tv.app.Config.GDATA_NUM_RESULTS_PER_PAGE; prepareForNextStepAndLoad(); } else { super.loadMore(); } } function canPropagate() { if ((phase == SINGLE_VIDEO_FEEDS) && (requestsInRowCount > 0)) { prepareForNextStepAndLoad(); } return(true); } function addVideosToLoad(videoIds) { var _local3 = 0; for ( ; _local3 < videoIds.length ; _local3++) { var _local4 = com.google.youtube.tv.util.StringUtil.replacePlaceholders(com.google.youtube.tv.tree.ContentTree.FEED_VIDEO_INFO_TEMPLATE, {videoId:videoIds[_local3], fields:com.google.youtube.tv.tree.ContentTree.FEED_VIDEO_INFO_FIELDS}); var _local5 = {url:_local4, xtractor:com.google.youtube.tv.tree.ContentTree.FEED_VIDEO_INFO_XTRACTOR, needLoadMore:false, videoId:videoIds[_local3]}; steps.push(_local5); } prepareForNextStepAndLoad(); } function removeVideoById(videoId) { var _local3 = getChildren(); var _local4 = 0; for ( ; _local4 < _local3.length ; _local4++) { if (com.google.youtube.tv.tree.VideoNode(_local3[_local4]).getVideoId() == videoId) { removeItem(com.google.youtube.tv.tree.VideoNode(_local3[_local4])); } } var _local5 = 0; for ( ; _local5 < steps.length ; _local5++) { if (steps[_local5].videoId == videoId) { steps.splice(_local5, 1); } } } function getAllVideosSeparatedByStatus() { var _local2 = [[], []]; var _local3 = getChildren(); var _local4 = 0; for ( ; _local4 < _local3.length ; _local4++) { _local2[0].push(com.google.youtube.tv.tree.VideoNode(_local3[_local4]).getVideoId()); } if (loadStarted) { _local2[1].push(currentStep.videoId); } var _local5 = 0; for ( ; _local5 < steps.length ; _local5++) { _local2[1].push(steps[_local5].videoId); } return(_local2); } function getChildrenCountWithPending() { return((super.getChildrenCount() + steps.length) + (loadStarted ? 1 : 0)); } function shouldAlwaysRefreshMenu() { return(true); } function requiresAutoLoad() { return(false); } function getUID() { return("ComplexFeedNode" + instanceId); } function toString() { return(((("<ComplexFeedNode title:" + title) + " count:") + count) + ">"); } static var SINGLE_VIDEO_FEEDS = "SINGLE_VIDEO_FEEDS"; static var CONTINUOUS_FEED = "CONTINUOUS_FEED"; var requestsInRowCount = com.google.youtube.tv.app.Config.GDATA_NUM_RESULTS_PER_PAGE; }
Symbol 20627 MovieClip [__Packages.com.google.youtube.tv.components.ThumbstripComponent] Frame 0
class com.google.youtube.tv.components.ThumbstripComponent extends com.google.youtube.tv.ui.View { var thumbstripLocation, thumbstripViews, lastUnusedViews, scrollHistory, viewFactory, loadingNode, thumbstrip, clip, navButtons, infoView, buttonLeft, buttonRight, isVisible, refreshPending, nodeIsUpdated, nodeIsLoaded, currentIndex, currentNode, broadcast; function ThumbstripComponent (parent, thumbstripLocation) { super(parent, "thumbstrip"); this.thumbstripLocation = thumbstripLocation; thumbstripViews = []; lastUnusedViews = []; scrollHistory = new com.google.youtube.tv.controller.ScrollHistory(); viewFactory = new com.google.youtube.tv.views.ViewFactory(); loadingNode = new com.google.youtube.tv.tree.LoadingNode(); thumbstrip = new com.google.youtube.tv.ui.View(clip, "thumbsContainer"); navButtons = new com.google.youtube.tv.ui.View(clip, "navButtons"); infoView = new com.google.youtube.tv.components.ThumbstripInfoView(clip, thumbstripLocation); infoView.setPos(0, INFO_TOP); this.thumbstripLocation.vmap(com.google.chianti.event.EventDelegate.create(this, onThumbstripLocationChange)); if (com.google.youtube.tv.platform.Box.hasMouse()) { buttonLeft = new com.google.youtube.tv.view.ui.PageNavigationButton(navButtons.clip, com.google.youtube.tv.view.ui.PageNavigationButton.LEFT); buttonRight = new com.google.youtube.tv.view.ui.PageNavigationButton(navButtons.clip, com.google.youtube.tv.view.ui.PageNavigationButton.RIGHT); buttonLeft.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onNavigationButtonLeft)); buttonRight.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onNavigationButtonRight)); buttonLeft.hide(); buttonRight.hide(); } } function getWidth() { return(width); } function setWidth(value) { width = value; infoView.setWidth(width); } function getHeight() { return(com.google.youtube.tv.views.BaseThumbnail.THUMBNAIL_HEIGHT); } function setVisible(value) { if (isVisible() == value) { return(undefined); } super.setVisible(value); if (value) { refresh(true); } } function setShowSelection(value) { if (showSelection == value) { return(undefined); } showSelection = value; refresh(true); } function onThumbstripLocationChange() { refresh(true); } function refresh(opt_force) { if (!isVisible()) { return(undefined); } if (refreshing) { refreshPending = arguments; return(undefined); } refreshing = true; refreshPending = null; nodeIsUpdated = nodeIsLoaded; nodeIsLoaded = !thumbstripLocation.getNode().requiresAutoLoad(); if (!nodeIsLoaded) { nodeIsUpdated = false; } if ((thumbstripLocation.getIndex() === currentIndex) && ((thumbstripLocation.getNode() === currentNode) && (nodeIsUpdated && (!opt_force)))) { return(undefined); } if ((thumbstripLocation.getNode() == currentNode) && (thumbstripLocation.getIndex() != currentIndex)) { scrollHistory.recordScroll(); } currentNode = thumbstripLocation.getNode(); currentIndex = thumbstripLocation.getIndex(); display(currentNode, currentIndex); if (scrollHistory.isScrollingFast()) { com.google.youtube.tv.controller.ImageQueue.getInstance().delayImageLoading(com.google.youtube.tv.controller.ScrollHistory.FAST_SCROLL_INTERVAL); } refreshing = false; if (refreshPending) { refresh.apply(this, refreshPending); } } function display(playlistNode, playlistIndex) { if (playlistNode.getNeedsRefresh()) { playlistNode.refresh(); } if (nodeIsLoaded) { var _local4 = playlistNode.getChildren(); playlistIndex = Math.max(0, Math.min(playlistIndex, _local4.length - 1)); } else { var _local4 = [loadingNode]; playlistIndex = 0; } var _local5 = thumbstripViews.concat(lastUnusedViews); var _local6 = []; var _local8 = 0; var _local9 = 0; var _local10 = false; var _local11 = Math.max(0, playlistIndex - SELECTION_OFFSET); for ( ; _local11 < _local4.length ; _local11++) { var _local12 = _local4[_local11]; if ((!_local12.hasPrefetchedData()) && (_local12.requiresAutoLoad())) { _local12.load(); } var _local7 = viewFactory.createView(thumbstrip.clip, _local12, isSelected(_local11), _local5); _local7.setPos(_local8, _local9); _local7.setVisible(true); _local7.clip.onPress = com.google.chianti.event.EventDelegate.create(this, onMouseClick, _local11); _local6.push(_local7); _local8 = _local8 + (_local7.getWidth() + HORIZONTAL_MARGIN); if (_local8 > width) { _local10 = true; maxThumbnails = Math.max(maxThumbnails, (_local11 - playlistIndex) + 1); break; } } thumbstripViews = _local6; if (!_local10) { thumbstripLocation.getNode().loadMore(); } lastUnusedViews = []; if (!com.google.youtube.tv.platform.Box.shouldLoadImagesInSequence()) { if ((playlistIndex + _local6.length) < _local4.length) { cacheView(_local4[playlistIndex + _local6.length], _local5); } if (playlistIndex > 0) { cacheView(_local4[playlistIndex - 1], _local5); } } var _local13 = maxThumbnails + 2; while ((_local5.length > 0) && ((lastUnusedViews.length + _local6.length) < _local13)) { var _local7 = com.google.youtube.tv.ui.View(_local5.shift()); _local7.setVisible(false); lastUnusedViews.push(_local7); } var _local14 = 0; for ( ; _local14 < _local5.length ; _local14++) { com.google.youtube.tv.ui.View(_local5[_local14]).remove(); } var _local15 = _local4.length > 1; buttonLeft.setVisible(_local15); buttonLeft.setEnabled(playlistIndex > 0); buttonRight.setVisible(_local15); buttonRight.setEnabled(playlistIndex < (_local4.length - 1)); alignNavigationButtons(); } function cacheView(treeNode, lastViews) { var _local4 = viewFactory.createView(thumbstrip.clip, treeNode, true, lastViews); _local4.setVisible(false); lastUnusedViews.push(_local4); } function isSelected(index) { return(showSelection && (index == thumbstripLocation.getIndex())); } function onNavigationButtonLeft(event) { thumbstripLocation.setIndexOffset(-1); } function onNavigationButtonRight(event) { thumbstripLocation.setIndexOffset(1); } function onMouseClick(index) { broadcast({type:THUMBSTRIP_ACTIVITY}); if (!_global.isNaN(index)) { if (index != thumbstripLocation.getIndex()) { thumbstripLocation.setIndex(index); } broadcast({type:THUMBSTRIP_ITEM_SELECT}); } } function alignNavigationButtons(event) { if (thumbstripViews.length > 0) { var _local3 = thumbstripViews[0].getHeight() + NAVIGATION_GAP; buttonLeft.setPos(0, _local3); buttonRight.setPos(width, _local3); } } function clear() { var _local2 = thumbstripViews.concat(lastUnusedViews); var _local3 = 0; for ( ; _local3 < _local2.length ; _local3++) { com.google.youtube.tv.ui.View(_local2[_local3]).remove(); } thumbstripViews = []; lastUnusedViews = []; } static var THUMBSTRIP_ITEM_SELECT = "THUMBSTRIP_ITEM_SELECT"; static var THUMBSTRIP_ACTIVITY = "THUMBSTRIP_ACTIVITY"; static var HORIZONTAL_MARGIN = 20 * com.google.youtube.tv.app.Config.SCALE; static var NAVIGATION_GAP = 70 * com.google.youtube.tv.app.Config.SCALE; static var INFO_TOP = -72 * com.google.youtube.tv.app.Config.SCALE; static var SELECTION_OFFSET = 1; var width = Stage.width; var maxThumbnails = 1; var showSelection = true; var refreshing = false; }
Symbol 20628 MovieClip [__Packages.com.google.youtube.tv.ui.Image] Frame 0
class com.google.youtube.tv.ui.Image extends com.google.youtube.tv.ui.View { var clip, width, height, url, loader, imageClip, broadcast; function Image (parent, opt_box, opt_url) { super(parent, "image"); if (opt_box) { clip._x = opt_box.x; clip._y = opt_box.y; width = opt_box.width; height = opt_box.height; } if (opt_url) { setImage(opt_url); } } function getUrl() { return(url); } function setImage(value) { if (url == value) { return(undefined); } if (url) { clear(); } url = value; if (url) { visible = clip._visible; com.google.youtube.tv.controller.ImageQueue.getInstance().enqueue(this); } } function clear() { com.google.youtube.tv.controller.ImageQueue.getInstance().dequeue(this); if (loader) { loader.unloadClip(imageClip); loader.removeListener(this); loader = null; } if (imageClip) { imageClip.removeMovieClip(); } url = null; loaded = false; loading = false; error = false; } function createImageClip() { imageClip = clip.createEmptyMovieClip("img" + getTimer(), clip.getNextHighestDepth()); } function load() { if (loading || (loaded || (!url))) { return(false); } createImageClip(); loading = true; loader = new MovieClipLoader(); loader.addListener(this); return(loader.loadClip(url, imageClip)); } function setSize(width, height) { if ((this.width == width) && (this.height == height)) { return(undefined); } this.width = width; this.height = height; if (loaded) { sizeImage(); } } function remove() { clear(); super.remove(); } function onLoadInit(mc) { loaded = true; loading = false; sizeImage(); imageClip._rotation = 0; clip._visible = visible; broadcast({type:LOAD_COMPLETE}); } function sizeImage() { if (width && (height)) { clip._width = width; clip._height = height; } else { width = clip._width; height = clip._height; } } function onLoadError() { error = true; loading = false; broadcast({type:LOAD_ERROR}); } function setVisible(value) { visible = value; super.setVisible(value); } function isLoaded() { return(loaded); } function isLoading() { return(loading); } function isError() { return(error); } function cleanBeforeRecycle() { clear(); } function toString() { return(((("Image " + clip) + (loading ? " loading" : "")) + (loaded ? " loaded" : "")) + (error ? " error" : "")); } static var LOAD_COMPLETE = "LOAD_COMPLETE"; static var LOAD_ERROR = "LOAD_ERROR"; var visible = true; var loaded = false; var loading = false; var error = false; }
Symbol 20629 MovieClip [__Packages.com.google.youtube.tv.ui.CroppedImage] Frame 0
class com.google.youtube.tv.ui.CroppedImage extends com.google.youtube.tv.ui.Image { var extMask, clip, mask, width, height, imageClip; function CroppedImage (parent, box, url, opt_extMask) { super(parent, box, url) extMask = opt_extMask; } function sizeImage() { centerImage(); if (extMask) { clip.setMask(extMask.clip); } else { if (!mask) { mask = new com.google.youtube.tv.ui.Rect(clip, new flash.geom.Rectangle(0, 0, width, height), com.google.youtube.tv.ui.Colors.WHITE, 0); } else { mask.build(new flash.geom.Rectangle(0, 0, width, height)); } clip.setMask(mask.clip); } } function centerImage() { var _local2 = Math.max(width / imageClip._width, height / imageClip._height); var _local3 = imageClip._width * _local2; var _local4 = imageClip._height * _local2; imageClip._width = _local3; imageClip._height = _local4; imageClip._x = (width / 2) - (_local3 / 2); imageClip._y = (height / 2) - (_local4 / 2); } }
Symbol 20630 MovieClip [__Packages.com.google.youtube.tv.controller.ImproveYouTubeController] Frame 0
class com.google.youtube.tv.controller.ImproveYouTubeController { var clip, storage, dialog; function ImproveYouTubeController (clip) { this.clip = clip; storage = com.google.youtube.tv.services.StorageService.get(); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_IMPROVE_YOUTUBE, com.google.chianti.event.EventDelegate.create(this, improveYouTube)); } function improveYouTube() { if (!dialog) { dialog = new com.google.youtube.tv.components.DialogWithCheckbox(clip); dialog.registerEvent(com.google.youtube.tv.components.DialogBase.CLOSE, com.google.chianti.event.EventDelegate.create(this, onClose)); dialog.initCheckbox(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.IMPROVE_YOUTUBE_ENABLE), getImproveYouTube()); } dialog.show(); } function getImproveYouTube() { return(storage.getValue(com.google.youtube.tv.services.StorageService.PREVENT_STATS) != "1"); } function onClose(event) { if (dialog.getCheckbox().isSelected() != getImproveYouTube()) { storage.flipFlag(com.google.youtube.tv.services.StorageService.PREVENT_STATS); } } }
Symbol 20631 MovieClip [__Packages.com.google.youtube.tv.tree.UserPlaylistsFeedNode] Frame 0
class com.google.youtube.tv.tree.UserPlaylistsFeedNode extends com.google.youtube.tv.tree.GDataNode { var customFields, cobj, getData, addItem, prefetchedData, instanceId, count, title; function UserPlaylistsFeedNode (title, url, loadNow, data, needLoadMore) { super(title, url, loadNow, data, needLoadMore) customFields = com.google.youtube.tv.tree.ContentTree.FEED_USER_PLAYLISTS_FIELDS; } function parse(src) { var _local3 = new XML(); _local3.ignoreWhite = true; _local3.parseXML(src); cobj = com.google.youtube.tv.util.Xtract.getComplexValues(_local3, PLAYLIST_XTRACTOR); } function createChildren() { var _local3 = getData(); var _local4 = 0; for ( ; _local4 < _local3.length ; _local4++) { for ( ; !Number(_local3[_local4].video_count) ; _local4++) { } addItem(createChild(_local3[_local4])); } super.createChildren(); } function createChild(object) { var _local3 = com.google.youtube.tv.util.StringUtil.replacePlaceholders(PLAYLIST_URL_TEMPLATE, {playlistId:object.playlist_id}); var _local4 = new com.google.youtube.tv.tree.PlaylistFeedNode(object.title, _local3, false, object, true); _local4.setTrackingType(com.google.youtube.tv.tree.TreeNode.TRACKING_TYPE_USER_LIST + (prefetchedData.user_id || "")); return(_local4); } function hasPrefetchedData() { return(prefetchedData && (getThumbnailUrl())); } function isMenuCapturing() { return(true); } function getUserId() { return(prefetchedData.user_id); } function getThumbnailUrl() { return(prefetchedData.thumbnail || (super.getThumbnailUrl())); } function getVideosCount() { return(Number(prefetchedData.video_count) || 0); } function getUsername() { return(prefetchedData.username); } function isTerminal() { return(false); } function getUID() { return("UserPlaylistsFeedNode" + instanceId); } function toString() { return(((("<UserPlaylistsFeedNode title:" + title) + " count:") + count) + " > "); } static var PLAYLIST_URL_TEMPLATE = "${gdataUrl}/feeds/api/playlists/${playlistId}"; static var PLAYLIST_XTRACTOR = ("/feed/entry[*](title,yt:playlistId as playlist_id," + "yt:countHint as video_count,") + "media:group(media:thumbnail/@url as thumbnail))"; }
Symbol 20632 MovieClip [__Packages.com.google.youtube.tv.view.ui.DialogButton] Frame 0
class com.google.youtube.tv.view.ui.DialogButton extends com.google.youtube.tv.view.ui.Button { var isUp, selected; function DialogButton (container, width, height) { super(container, width, height); } function getStateFill() { return(((isUp && (!selected)) ? ({color:com.google.youtube.tv.ui.Colors.WHITE, alpha:15}) : (super.getStateFill()))); } }
Symbol 20633 MovieClip [__Packages.com.google.youtube.tv.services.SignInService] Frame 0
class com.google.youtube.tv.services.SignInService extends com.google.chianti.event.EventBroadcaster { static var instance; var broadcast, paymentsScope, loader, userInfoFetcher, accessToken, deviceCode, userCode, username, userId, displayUsername, avatar, refreshToken, signInPing, refreshPing, accessTokenLifeTime, deviceCodeLifeTime; function SignInService () { super(); com.google.chianti.event.EventBroadcaster.initialize(this); } function broadcastReady() { if (ready) { return(undefined); } ready = true; broadcast({type:READY}); } static function getInstance() { if (!instance) { instance = new com.google.youtube.tv.services.SignInService(); } return(instance); } function getUrl() { return(STEPS_URL[currentStep]); } function hasPaymentsScope() { return(paymentsScope); } function fetch() { loader.sendAndLoad(getUrl(), loader, "POST"); } function fetchUserInfo() { if (!userInfoFetcher) { userInfoFetcher = new com.google.youtube.tv.data.DataFetcher(); userInfoFetcher.registerEvent(com.google.youtube.tv.data.DataFetcher.LOAD_COMPLETE, com.google.chianti.event.EventDelegate.create(this, onUserInfoLoaded)); userInfoFetcher.registerEvent(com.google.youtube.tv.data.DataFetcher.LOAD_ERROR, com.google.chianti.event.EventDelegate.create(this, onUserInfoError)); } if (accessToken) { userInfoFetcher.fetch(USER_INFO_URL + accessToken); } } function setRedirectUri(value) { OAUTH_PARAMS.redirect_uri = value; } function prepareLoader() { if (!loader) { loader = new LoadVars(); loader.onData = com.google.chianti.event.EventDelegate.create(this, onData); } } function onData(src) { if (src) { handleJsonResponse(com.adobe.serialization.json.JSON.decode(src)); } else { raiseSignInError(); } } function prepareLoaderForAnotherStep(step) { currentStep = step; prepareLoader(); clearLoaderParams(); var _local3 = 0; for ( ; _local3 < STEP_PARAMS[step].length ; _local3++) { var _local4 = STEP_PARAMS[step][_local3]; if (OAUTH_PARAMS[_local4]) { if (typeof(OAUTH_PARAMS[_local4]) == "string") { loader[_local4] = OAUTH_PARAMS[_local4]; } else { loader[_local4] = OAUTH_PARAMS[_local4][step]; } } else if (this[OAUTH_DYNAMIC_PARAMS_MAPPING[_local4]]) { loader[_local4] = this[OAUTH_DYNAMIC_PARAMS_MAPPING[_local4]]; } } } function clearAuthInfo() { var _local2 = accessToken; prepareLoaderForAnotherStep(-1); clearAllTimers(); deviceCode = null; userCode = null; accessToken = null; username = null; userId = null; displayUsername = null; avatar = null; paymentsScope = false; refreshToken = null; loader.onData = null; loader = null; userInfoFetcher.unregisterAll(); userInfoFetcher = null; if (_local2) { broadcast({type:SIGN_OUT}); } } function clearLoaderParams() { for (var key in OAUTH_PARAMS) { delete loader[key]; } for (var key in OAUTH_DYNAMIC_PARAMS_MAPPING) { delete loader[key]; } } function clearAllTimers() { if (signInPing) { signInPing.stop(); signInPing = undefined; } if (refreshPing) { refreshPing.stop(); refreshPing = undefined; } } function receiveDeviceCode() { prepareLoaderForAnotherStep(0); fetch(); } function tryToPair() { if (currentStep != -1) { return(undefined); } if (!deviceCode) { receiveDeviceCode(); return(undefined); } prepareLoaderForAnotherStep(1); signInPing = com.google.youtube.util.Scheduler.setTimeout(pairingInterval, com.google.chianti.event.EventDelegate.create(this, fetch)); } function refreshAccessToken(token, storedPaymentsScope, force) { refreshToken = (force ? (token) : (refreshToken || (token))); paymentsScope = paymentsScope || (storedPaymentsScope); accessTokenLifeTime = accessTokenLifeTime || 1; prepareLoaderForAnotherStep(2); if (refreshPing) { fetch(); } else { refreshPing = com.google.youtube.util.Scheduler.setTimeout(accessTokenLifeTime, com.google.chianti.event.EventDelegate.create(this, fetch)); } } function handleJsonResponse(vo) { if ((vo.error == "authorization_pending") && (signInPing)) { signInPing.restart(); return(undefined); } if (vo.device_code && ((!_global.isNaN(vo.expires_in)) && (vo.user_code))) { deviceCode = vo.device_code; userCode = vo.user_code; deviceCodeLifeTime = Number(vo.expires_in) / 2; pairingInterval = (Number(vo.interval) * 1000) || (pairingInterval); broadcast({type:USER_CODE_RECEIVE, data:int(deviceCodeLifeTime / 1000)}); currentStep = -1; tryToPair(); return(undefined); } if (vo.access_token && (!_global.isNaN(vo.expires_in))) { accessTokenLifeTime = (Number(vo.expires_in) * 1000) / 2; var _local3 = (accessToken ? (ACCESS_TOKEN_UPDATE) : (ACCESS_TOKEN_FIRST_RECEIVE)); accessToken = vo.access_token; if (vo.refresh_token) { paymentsScope = true; } broadcast({type:_local3, token:accessToken}); broadcastReady(); if (refreshPing) { refreshPing = com.google.youtube.util.Scheduler.setTimeout(accessTokenLifeTime, com.google.chianti.event.EventDelegate.create(this, fetch)); } else if (vo.refresh_token) { refreshToken = vo.refresh_token; clearAllTimers(); refreshAccessToken(); broadcast({type:REFRESH_TOKEN_RECEIVE, token:refreshToken, paymentsScope:paymentsScope}); } else { raiseSignInError(); } return(undefined); } raiseSignInError(); } static function isSignedIn() { return(getInstance().accessToken); } static function expectSignIn() { return(com.google.youtube.tv.services.StorageService.get().getValue(com.google.youtube.tv.services.StorageService.REFRESH_TOKEN) != null); } function raiseSignInError() { broadcastReady(); if (signInPing) { signInPing.restart(); return(undefined); } broadcast({type:SISO_ERROR, step:currentStep}); } function getUserCode() { return(userCode); } function getDeviceCodeLifetime() { return(deviceCodeLifeTime); } function onUserInfoLoaded(event) { var _local3 = com.google.youtube.tv.util.Xtract.getComplexValues(new XML(event.src), USER_INFO_XTRACTOR)[0]; userId = _local3.userId; username = _local3.username; displayUsername = _local3.displayUsername || (_local3.gname); avatar = _local3.avatar; broadcast({type:USER_INFO_RECEIVED, info:_local3}); } function onUserInfoError(event) { broadcast({type:USER_INFO_RECEIVED, info:null}); } function toString() { return("<SignInService />"); } static var USER_INFO_URL = "https://gdata.youtube.com/feeds/api/users/default?v=2.1&oauth_token="; static var USER_INFO_XTRACTOR = (("/entry" + "(yt:username as username,yt:username/@display as displayUsername,") + "yt:userId as userId,media:thumbnail/@url as avatar,") + "author(name as gname))"; static var READY = "READY"; static var USER_CODE_RECEIVE = "userCodeReceive"; static var ACCESS_TOKEN_FIRST_RECEIVE = "accessTokenFirstReceive"; static var ACCESS_TOKEN_UPDATE = "accessTokenUpdate"; static var REFRESH_TOKEN_RECEIVE = "refreshTokenReceive"; static var SIGN_OUT = "signOut"; static var USER_INFO_RECEIVED = "USER_INFO_RECEIVED"; static var SISO_ERROR = "SISO_ERROR"; static var OAUTH_FORM_URL = "youtube.com/activate"; static var OAUTH_PARAMS = {client_id:"627431331381.apps.googleusercontent.com", client_secret:"O_HOjELPNFcHO_n_866hamcO", scope:"https://www.googleapis.com/auth/youtube", grant_type:["", "http://oauth.net/grant_type/device/1.0", "refresh_token"]}; static var OAUTH_DYNAMIC_PARAMS_MAPPING = {refresh_token:"refreshToken", code:"deviceCode"}; static var STEP_PARAMS = [["client_id", "scope", "redirect_uri"], ["client_id", "client_secret", "code", "grant_type"], ["client_id", "client_secret", "refresh_token", "grant_type"]]; static var STEPS_URL = ["https://www.youtube.com/o/oauth2/device/code", "https://www.youtube.com/o/oauth2/token", "https://www.youtube.com/o/oauth2/token"]; var ready = false; var pairingInterval = 4000; var currentStep = -1; var requestPaymentsScope = true; }
Symbol 20634 MovieClip [__Packages.com.google.youtube.tv.model.PlayerState] Frame 0
class com.google.youtube.tv.model.PlayerState { function PlayerState () { } static var UNSTARTED = -1; static var ENDED = 0; static var PLAYING = 1; static var PAUSED = 2; static var BUFFERING = 3; static var SEEKING = 4; static var VIDEO_CUED = 5; static var AD_PLAYING = 1081; }
Symbol 20635 MovieClip [__Packages.com.google.youtube.tv.remotes.partner.TivoRemoteController] Frame 0
class com.google.youtube.tv.remotes.partner.TivoRemoteController extends com.google.youtube.tv.remotes.DefaultRemoteController { function TivoRemoteController () { super(); } function processKey(keyCode) { switch (keyCode) { case com.google.youtube.tv.controller.ExtendedKeys.SKIP_FORWARD : return(com.google.youtube.tv.controller.ExtendedKeys.NEXT); case com.google.youtube.tv.controller.ExtendedKeys.SKIP_BACKWARD : return(com.google.youtube.tv.controller.ExtendedKeys.PREVIOUS); case THUMBS_UP : case THUMBS_DOWN : case com.google.youtube.tv.controller.ExtendedKeys.RECORD : case com.google.youtube.tv.controller.ExtendedKeys.CHANNEL_UP : case com.google.youtube.tv.controller.ExtendedKeys.CHANNEL_DOWN : case com.google.youtube.tv.controller.ExtendedKeys.GREEN : case com.google.youtube.tv.controller.ExtendedKeys.YELLOW : case com.google.youtube.tv.controller.ExtendedKeys.BLUE : case com.google.youtube.tv.controller.ExtendedKeys.RED : case com.google.youtube.tv.controller.ExtendedKeys.VOLUME_UP : case com.google.youtube.tv.controller.ExtendedKeys.VOLUME_DOWN : case com.google.youtube.tv.controller.ExtendedKeys.VOLUME_MUTE : return(0); } return(super.processKey(keyCode)); } static var THUMBS_UP = 33554439; static var THUMBS_DOWN = 33554440; }
Symbol 20636 MovieClip [__Packages.com.google.youtube.util.Drawing] Frame 0
class com.google.youtube.util.Drawing { function Drawing () { } static function drawRect(target, x, y, width, height, fill, lineStyle, radii, leaveFillOpen) { drawRectWithPointer(target, x, y, width, height, fill, lineStyle, radii, leaveFillOpen); } static function drawRectWithPointer(target, x, y, width, height, fill, lineStyle, radii, leaveFillOpen, pointerWidth, pointerHeight, pointerOrientation, pointerOffset) { if (fill != null) { setFill(target, fill); } setLineStyle(target, lineStyle); var _local15 = []; if (typeof(radii) == "number") { var _local16 = 0; for ( ; _local16 < 4 ; _local16++) { _local15[_local16] = radii; } } else { _local15 = Array(radii); } if (!radii) { target.moveTo(x, y); if (pointerOrientation == TOP) { target.lineTo((x + pointerOffset) + ((width - pointerWidth) / 2), y); target.lineTo((x + pointerOffset) + (width / 2), y - pointerHeight); target.lineTo((x + pointerOffset) + ((width + pointerWidth) / 2), y); } target.lineTo(x + width, y); if (pointerOrientation == RIGHT) { target.lineTo(x + width, (y + pointerOffset) + ((height - pointerWidth) / 2)); target.lineTo((x + width) + pointerHeight, (y + pointerOffset) + (height / 2)); target.lineTo(x + width, (y + pointerOffset) + ((height + pointerWidth) / 2)); } target.lineTo(x + width, y + height); if (pointerOrientation == BOTTOM) { target.lineTo((x + pointerOffset) + ((width + pointerWidth) / 2), y + height); target.lineTo((x + pointerOffset) + (width / 2), (y + height) + pointerHeight); target.lineTo((x + pointerOffset) + ((width - pointerWidth) / 2), y + height); } target.lineTo(x, y + height); if (pointerOrientation == LEFT) { target.lineTo(x, (y + pointerOffset) + ((height + pointerWidth) / 2)); target.lineTo(x - pointerHeight, (y + pointerOffset) + (height / 2)); target.lineTo(x, (y + pointerOffset) + ((height - pointerWidth) / 2)); } target.lineTo(x, y); } else { target.moveTo(x + _local15[0], y); if (pointerOrientation == TOP) { target.lineTo((x + pointerOffset) + ((width - pointerWidth) / 2), y); target.lineTo((x + pointerOffset) + (width / 2), y - pointerHeight); target.lineTo((x + pointerOffset) + ((width + pointerWidth) / 2), y); } target.lineTo((x + width) - _local15[1], y); target.curveTo(x + width, y, x + width, y + _local15[1]); if (pointerOrientation == RIGHT) { target.lineTo(x + width, (y + pointerOffset) + ((height - pointerWidth) / 2)); target.lineTo((x + width) + pointerHeight, (y + pointerOffset) + (height / 2)); target.lineTo(x + width, (y + pointerOffset) + ((height + pointerWidth) / 2)); } target.lineTo(x + width, (y + height) - _local15[2]); target.curveTo(x + width, y + height, (x + width) - _local15[2], y + height); if (pointerOrientation == BOTTOM) { target.lineTo((x + pointerOffset) + ((width + pointerWidth) / 2), y + height); target.lineTo((x + pointerOffset) + (width / 2), (y + height) + pointerHeight); target.lineTo((x + pointerOffset) + ((width - pointerWidth) / 2), y + height); } target.lineTo(x + _local15[3], y + height); target.curveTo(x, y + height, x, (y + height) - _local15[3]); if (pointerOrientation == LEFT) { target.lineTo(x, (y + pointerOffset) + ((height + pointerWidth) / 2)); target.lineTo(x - pointerHeight, (y + pointerOffset) + (height / 2)); target.lineTo(x, (y + pointerOffset) + ((height - pointerWidth) / 2)); } target.lineTo(x, y + _local15[0]); target.curveTo(x, y, x + _local15[0], y); } if ((fill != null) && (!leaveFillOpen)) { target.endFill(); } } static function drawPoly(target, points, fill, lineStyle) { if (fill != null) { setFill(target, fill); } setLineStyle(target, lineStyle); target.moveTo(points[0].x, points[0].y); var _local6 = 1; for ( ; _local6 < points.length ; _local6++) { target.lineTo(points[_local6].x, points[_local6].y); } if (fill != null) { target.endFill(); } } static function drawCircle(target, x, y, diameter, fill, lineStyle, leaveFillOpen) { if (fill != null) { setFill(target, fill); } setLineStyle(target, lineStyle); var _local9 = Math.PI / 180; var _local10 = diameter / 2; var _local11 = 45 * _local9; var _local12 = _local10 / Math.cos(_local11 / 2); var _local13 = 0; var _local14 = (-_local11) / 2; target.moveTo(x + _local10, y); var _local15 = 0; for ( ; _local15 < 8 ; _local15++) { _local13 = _local13 + _local11; _local14 = _local14 + _local11; var _local16 = _local10 * Math.cos(_local13); var _local17 = _local10 * Math.sin(_local13); var _local18 = _local12 * Math.cos(_local14); var _local19 = _local12 * Math.sin(_local14); target.curveTo(x + _local18, y + _local19, x + _local16, y + _local17); } if ((fill != null) && (!leaveFillOpen)) { target.endFill(); } } static function drawDivider(target, x, y, size, orientation, topColor, bottomColor, linealpha) { linealpha = (linealpha ? (linealpha) : 100); target.moveTo(x, y); setLineStyle(target, {thickness:0, alpha:linealpha, rgb:topColor}); if (orientation == VERTICAL) { target.lineTo(x, y + size); setLineStyle(target, {thickness:0, alpha:linealpha, rgb:bottomColor}); target.moveTo(x + 1, y); target.lineTo(x + 1, y + size); } else if (orientation == HORIZONTAL) { target.lineTo(x + size, y); setLineStyle(target, {thickness:0, alpha:linealpha, rgb:bottomColor}); target.moveTo(x, y + 1); target.lineTo(x + size, y + 1); } } static function drawArrow(target, x, y, orientation, fill, lineStyle) { var _local8 = 9; if (orientation == "left") { x = x + _local8; _local8 = -_local8; } var _local9 = [{x:x + (_local8 / 3), y:y}, {x:x + _local8, y:y + 7}, {x:x + (_local8 / 3), y:y + 14}, {x:x, y:y + 11.5}, {x:x + (_local8 / 2), y:y + 7}, {x:x, y:y + 2}]; drawPoly(target, _local9, fill, lineStyle); } static function drawPlus(target, x, y, plusSize, fill, lineStyle) { var _local8 = []; _local8 = [{x:x + (plusSize * 1), y:y + (plusSize * 0)}, {x:x + (plusSize * 2), y:y + (plusSize * 0)}, {x:x + (plusSize * 2), y:y + (plusSize * 1)}, {x:x + (plusSize * 3), y:y + (plusSize * 1)}, {x:x + (plusSize * 3), y:y + (plusSize * 2)}, {x:x + (plusSize * 2), y:y + (plusSize * 2)}, {x:x + (plusSize * 2), y:y + (plusSize * 3)}, {x:x + (plusSize * 1), y:y + (plusSize * 3)}, {x:x + (plusSize * 1), y:y + (plusSize * 2)}, {x:x + (plusSize * 0), y:y + (plusSize * 2)}, {x:x + (plusSize * 0), y:y + (plusSize * 1)}, {x:x + (plusSize * 1), y:y + (plusSize * 1)}, {x:x + (plusSize * 1), y:y + (plusSize * 0)}]; drawPoly(target, _local8, fill, lineStyle); } static function drawT(target, x, y, tSize, fill, lineStyle) { var _local8 = []; _local8 = [{x:x + (tSize * 0), y:y + (tSize * 0)}, {x:x + (tSize * 5), y:y + (tSize * 0)}, {x:x + (tSize * 5), y:y + (tSize * 1)}, {x:x + (tSize * 3), y:y + (tSize * 1)}, {x:x + (tSize * 3), y:y + (tSize * 5)}, {x:x + (tSize * 2), y:y + (tSize * 5)}, {x:x + (tSize * 2), y:y + (tSize * 1)}, {x:x + (tSize * 0), y:y + (tSize * 1)}, {x:x + (tSize * 0), y:y + (tSize * 0)}]; drawPoly(target, _local8, fill, lineStyle); } static function drawX(target, x, y, size, thickness, fill, lineStyle) { var _local9 = thickness * Math.sin(45); var _local10 = []; _local10 = [{x:x + _local9, y:y}, {x:x + (size / 2), y:y + ((size - (_local9 * 2)) / 2)}, {x:x + (size - _local9), y:y}, {x:x + size, y:y + _local9}, {x:x + (size - ((size - (_local9 * 2)) / 2)), y:y + (size / 2)}, {x:x + size, y:y + (size - _local9)}, {x:x + (size - _local9), y:y + size}, {x:x + (size / 2), y:y + (size - ((size - (_local9 * 2)) / 2))}, {x:x + _local9, y:y + size}, {x:x, y:y + (size - _local9)}, {x:x + ((size - (_local9 * 2)) / 2), y:y + (size / 2)}, {x:x, y:y + _local9}]; drawPoly(target, _local10, fill, lineStyle); } static function drawStar(target, x, y, fill, lineStyle, points, innerRadius, outerRadius) { var _local10 = points * 2; if (fill != null) { setFill(target, fill); } setLineStyle(target, lineStyle); var _local11 = 360 / _local10; var _local12 = 0; while (_local12 <= _local10) { var _local13 = ((_local11 * _local12) / 180) * Math.PI; var _local14 = ((_local11 * (_local12 + 1)) / 180) * Math.PI; var _local15 = innerRadius * Math.sin(_local13); var _local16 = innerRadius * Math.cos(_local13); var _local17 = outerRadius * Math.sin(_local14); var _local18 = outerRadius * Math.cos(_local14); if (_local12 == 0) { target.moveTo(_local15, _local16); target.moveTo(_local17, _local18); } else { target.lineTo(_local15, _local16); target.lineTo(_local17, _local18); } _local12 = _local12 + 2; } if (fill != null) { target.endFill(); } if ((x != null) && (y != null)) { target._x = outerRadius + x; target._y = outerRadius + y; } } static function setFill(target, fill) { if (typeof(fill) == "number") { target.beginFill(Number(fill)); } else if (fill != null) { if ((!_global.isNaN(fill.color)) && (!_global.isNaN(fill.alpha))) { target.beginFill(fill.color, fill.alpha); } else { target.beginGradientFill(fill.fillType, fill.colors, fill.alphas, fill.ratios, fill.matrix); } } } static function setLineStyle(target, lineStyle) { if (lineStyle != undefined) { target.lineStyle(lineStyle.thickness, lineStyle.rgb, lineStyle.alpha, lineStyle.pixelHinting, lineStyle.noScale, lineStyle.capsStyle, lineStyle.jointStyle, lineStyle.miterLimit); } } static var VERTICAL = "vertical"; static var HORIZONTAL = "horizontal"; static var TOP = "top"; static var BOTTOM = "bottom"; static var LEFT = "left"; static var RIGHT = "right"; static var TO_RADIANS = Math.PI / 180; }
Symbol 20637 MovieClip [__Packages.com.google.youtube.tv.components.VideoInfoComponent] Frame 0
class com.google.youtube.tv.components.VideoInfoComponent extends com.google.youtube.tv.components.TrayPageComponent { var playlistLocation, videoInfoView, buttonUp, buttonDown, videoNode, clip, enabled, root, pop; function VideoInfoComponent (parent, playlistLocation) { super(parent, playlistLocation); this.playlistLocation.vmap(com.google.chianti.event.EventDelegate.create(this, onPlaylistChanged)); } function activate() { super.activate(); onPlaylistChanged(); videoInfoView.activate(); } function deactivate() { super.deactivate(); videoInfoView.deactivate(); } function toString() { return("VideoInfoComponent"); } function build() { super.build(); buttonUp.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.BACK_BTN)); buttonDown.setText(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.RELATED_VIDEOS)); } function setVideoNode(videoNode) { this.videoNode = videoNode; if (!videoInfoView) { videoInfoView = new com.google.youtube.tv.components.VideoInfoContentView(clip); } videoInfoView.setVideoNode(videoNode); } function onPlaylistChanged() { if (!enabled) { return(undefined); } var _local2 = playlistLocation.getIndex(); if (_local2 == -1) { return(undefined); } var _local3 = com.google.youtube.tv.tree.ListNode(playlistLocation.getNode()); if (_local3.getChildren().length > 0) { setVideoNode(_local3.getChildren()[_local2]); } } function onButtonDownClick(event) { if (root.getChildrenCount() == 0) { return(undefined); } com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_OPEN_PIVOT)); super.onButtonDownClick(event); } function onButtonUpClick(event) { super.onButtonUpClick(event); pop(); } }
Symbol 20638 MovieClip [__Packages.com.google.youtube.tv.view.ui.Checkbox] Frame 0
class com.google.youtube.tv.view.ui.Checkbox extends com.google.youtube.tv.view.ui.Button { var icon, clip, alignContent, setSelected, isSelected, isUp, selected; function Checkbox (container, width, height) { super(container, width, height); icon = new com.google.youtube.tv.ui.View(clip, "checkIcon"); alignContent(); } function drawState() { super.drawState(); drawCheck(icon.clip); } function getStateFill() { return({color:0, alpha:0}); } function broadcastClick() { setSelected(!isSelected()); super.broadcastClick(); } function drawCheck(clip) { clip.clear(); if (!isUp) { com.google.youtube.util.Drawing.drawRect(clip, OFFSET - SELECTION, -SELECTION, BOTTOM_SIZE + (SELECTION * 2), BOTTOM_SIZE + (SELECTION * 2), {color:com.google.youtube.tv.ui.Colors.WHITE, alpha:100}); } com.google.youtube.util.Drawing.drawRect(clip, OFFSET, 0, BOTTOM_SIZE, BOTTOM_SIZE, {color:com.google.youtube.tv.ui.Colors.GRAY, alpha:100}); if (selected) { com.google.youtube.util.Drawing.drawRect(clip, OFFSET + ((BOTTOM_SIZE - TOP_SIZE) / 2), (BOTTOM_SIZE - TOP_SIZE) / 2, TOP_SIZE, TOP_SIZE, {color:com.google.youtube.tv.ui.Colors.WHITE, alpha:100}); } } static var BOTTOM_SIZE = 40; static var TOP_SIZE = 20; static var OFFSET = -20; static var SELECTION = 5; }
Symbol 20639 MovieClip [__Packages.com.adobe.utils.IntUtil] Frame 0
class com.adobe.utils.IntUtil { function IntUtil () { } static function rol(x, n) { return((x << n) | (x >>> (32 - n))); } static function ror(x, n) { var _local4 = 32 - n; return((x << _local4) | (x >>> (32 - _local4))); } static function toHex(n) { var _local3 = ""; var _local4 = 0; for ( ; _local4 < 4 ; _local4++) { _local3 = _local3 + (hexChars.charAt((n >> ((_local4 * 8) + 4)) & 15) + hexChars.charAt((n >> (_local4 * 8)) & 15)); } return(_local3); } static var hexChars = "0123456789abcdef"; }
Symbol 20640 MovieClip [__Packages.com.google.youtube.tv.tree.Location] Frame 0
class com.google.youtube.tv.tree.Location extends com.google.youtube.tv.wiring.ValueStream { var node, index, indexNode, instanceId; function Location (node, index) { super("location"); this.node = node; this.index = index; indexNode = getValue(); node.getValueStream().addSink(this); } function getIndex() { return(index); } function setIndex(value) { if (index == value) { return(undefined); } index = value; onChanged(); } function getNode() { return(node); } function setNode(newNode) { if (node != newNode) { node.getValueStream().removeSink(this); node = newNode; node.getValueStream().addSink(this); onChanged(); } } function update(incomingValue, source) { if (pointToValue && (indexNode && ((indexNode != getValue()) && (node.children[indexNode.index] == indexNode)))) { setIndex(indexNode.index); return(undefined); } indexNode = getValue(); super.update(incomingValue, source); } function getValue() { return(node.getChildren()[index]); } function moveTo(node, index) { this.index = index; this.node = node; onChanged(); } function setIndexOffset(offset, isLooping) { var _local4 = index; var _local5 = node.getChildrenCount(); if (!_local5) { return(undefined); } if (isLooping) { index = ((index + offset) + _local5) % _local5; } else if (offset > 0) { index = Math.min(index + offset, _local5 - 1); } else { index = Math.max(index + offset, 0); } if (index != _local4) { onChanged(); } } function toString() { return(("<Location " + instanceId) + ">"); } function propagate() { super.propagate(this); } function onChanged() { indexNode = getValue(); propagate(this); } var pointToValue = false; }
Symbol 20641 MovieClip [__Packages.com.google.youtube.tv.util.Base64] Frame 0
class com.google.youtube.tv.util.Base64 { static var byteToCharMap, charToByteMap, byteToCharMapWebSafe, charToByteMapWebSafe; function Base64 () { } static function init() { byteToCharMap = {}; charToByteMap = {}; byteToCharMapWebSafe = {}; charToByteMapWebSafe = {}; var _local2 = 0; for ( ; _local2 < ENCODED_VALS.length ; _local2++) { byteToCharMap[_local2] = ENCODED_VALS.charAt(_local2); charToByteMap[byteToCharMap[_local2]] = _local2; byteToCharMapWebSafe[_local2] = ENCODED_VALS_WEBSAFE.charAt(_local2); charToByteMapWebSafe[byteToCharMapWebSafe[_local2]] = _local2; } } static function encodeByteArray(input, opt_webSafe) { if (byteToCharMap == null) { init(); } var _local4 = (opt_webSafe ? (byteToCharMapWebSafe) : (byteToCharMap)); var _local5 = []; var _local6 = 0; while (_local6 < input.length) { var _local7 = input[_local6]; var _local8 = (_local6 + 1) < input.length; var _local9 = (_local8 ? (input[_local6 + 1]) : 0); var _local10 = (_local6 + 2) < input.length; var _local11 = (_local10 ? (input[_local6 + 2]) : 0); var _local12 = _local7 >> 2; var _local13 = ((_local7 & 3) << 4) | (_local9 >> 4); var _local14 = ((_local9 & 15) << 2) | (_local11 >> 6); var _local15 = _local11 & 63; if (!_local10) { _local15 = 64; if (!_local8) { _local14 = 64; } } _local5.push(_local4[_local12]); _local5.push(_local4[_local13]); _local5.push(_local4[_local14]); _local5.push(_local4[_local15]); _local6 = _local6 + 3; } return(_local5.join("")); } static function decodeString(input, opt_webSafe) { if (input.length % 4) { throw new Error("Length of b64 - encoded data must be zero mod four"); } if (byteToCharMap == null) { init(); } var _local4 = (opt_webSafe ? (charToByteMapWebSafe) : (charToByteMap)); var _local5 = []; var _local6 = 0; while (_local6 < input.length) { var _local7 = _local4[input.charAt(_local6)]; var _local8 = _local4[input.charAt(_local6 + 1)]; var _local9 = _local4[input.charAt(_local6 + 2)]; var _local10 = _local4[input.charAt(_local6 + 3)]; switch (_local7) { default : _local7 === undefined; case undefined : case _local8 === undefinedundefined : case _local9 === undefinedundefined : } if (_local10 === undefined) { throw new Error("String contains characters not in our alphabet: " + input); } var _local11 = (_local7 << 2) | (_local8 >> 4); _local5.push(_local11); if (_local9 != 64) { var _local12 = ((_local8 << 4) & 240) | (_local9 >> 2); _local5.push(_local12); if (_local10 != 64) { var _local13 = ((_local9 << 6) & 192) | _local10; _local5.push(_local13); } } _local6 = _local6 + 4; } return(_local5); } static function arrayifyString(str) { var _local3 = []; var _local4 = 0; for ( ; _local4 < str.length ; _local4++) { var _local5 = str.charCodeAt(_local4); while (_local5 > 255) { _local3.push(_local5 & 255); _local5 = _local5 >> 8; } _local3.push(_local5); } return(_local3); } static function stringifyArray(array) { var _local3 = []; var _local4 = 0; for ( ; _local4 < array.length ; _local4++) { _local3[_local4] = String.fromCharCode(array[_local4]); } return(_local3.join("")); } static var ENCODED_VALS = ("ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz") + "0123456789+/= "; static var ENCODED_VALS_WEBSAFE = (("ABCDEFGHIJKLMNOPQRSTUVWXY" + "Z") + "abcdefghijklmnopqrstuvwxyz") + "0123456789-_="; }
Symbol 20642 MovieClip [__Packages.com.google.youtube.tv.views.VerbThumbnail] Frame 0
class com.google.youtube.tv.views.VerbThumbnail extends com.google.youtube.tv.views.BaseThumbnail { var isButton, title, clip, width, subtitle, iconId, icon, height, thumbnailUrl, thumbnail; function VerbThumbnail (parent) { super(parent, "verbThumb") isButton = true; title = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(MARGIN, MARGIN, width - (2 * MARGIN), TEXT_HEIGHT), com.google.youtube.tv.ui.Font.getFontSizeForHeight(TEXT_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.VERB_ITEM, true); title.setAlign("center"); title.setMultiline(true); title.setAutoTruncate(true); subtitle = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(0, 0, width - (2 * MARGIN), SUBTITLE_MAX_HEIGHT), com.google.youtube.tv.ui.Font.getFontSizeForHeight(SUBTITLE_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); subtitle.setAlign("center"); subtitle.setMultiline(true); subtitle.setAutoTruncate(true); } function setTitle(value) { title.setText(value); positionTexts(); } function setSubTitle(value) { subtitle.setText(value || ""); positionTexts(); } function setIconId(value) { if (iconId == value) { return(undefined); } iconId = value; if (icon) { icon.remove(); icon = null; } if (iconId) { icon = new com.google.youtube.tv.ui.Symbol(clip, iconId, false); icon.setPos((width / 2) - (icon.getWidth() / 2), (height / 2) - (icon.getHeight() / 2)); } } function setThumbnailUrl(value) { if (thumbnailUrl == value) { return(undefined); } thumbnailUrl = value; if (thumbnail) { thumbnail.unregisterAll(); thumbnail.remove(); thumbnail = null; } if (thumbnailUrl) { thumbnail = new com.google.youtube.tv.ui.Image(clip, new flash.geom.Rectangle(0, 0, THUMBNAIL_SIZE, THUMBNAIL_SIZE)); thumbnail.registerEvent(com.google.youtube.tv.ui.Image.LOAD_COMPLETE, com.google.chianti.event.EventDelegate.create(this, positionThumbnail)); thumbnail.setImage(thumbnailUrl); } } function positionThumbnail() { thumbnail.setPos((width / 2) - (thumbnail.getWidth() / 2), (height / 2) - (thumbnail.getHeight() / 2)); } function toString() { return(" < VerbThumbnail > "); } function getClassName() { return(VERB_THUMBNAIL); } function cleanBeforeRecycle(keepImage) { super.cleanBeforeRecycle(keepImage); setTitle(""); setSubTitle(""); setIconId(null); setThumbnailUrl(null); } function positionTexts() { if (subtitle.getText()) { title.setHeight(TEXT_HEIGHT); subtitle.setHeight(SUBTITLE_MAX_HEIGHT); subtitle.setPos(MARGIN, (com.google.youtube.tv.views.BaseThumbnail.THUMBNAIL_HEIGHT - subtitle.getHeight()) - MARGIN); } else { title.setHeight(com.google.youtube.tv.views.BaseThumbnail.THUMBNAIL_HEIGHT - MARGIN); } } static var VERB_THUMBNAIL = "com.google.youtube.tv.views.VerbThumbnail"; static var MARGIN = 13 * com.google.youtube.tv.app.Config.SCALE; static var TEXT_HEIGHT = 150 * com.google.youtube.tv.app.Config.SCALE; static var TEXT_LINE_HEIGHT = 30; static var THUMBNAIL_SIZE = 88 * com.google.youtube.tv.app.Config.SCALE; static var SUBTITLE_LINE_HEIGHT = 20; static var SUBTITLE_MAX_HEIGHT = 90 * com.google.youtube.tv.app.Config.SCALE; }
Symbol 20643 MovieClip [__Packages.com.google.youtube.tv.components.TrayComponent] Frame 0
class com.google.youtube.tv.components.TrayComponent extends com.google.youtube.tv.components.BaseComponent { var playlistLocation, thumbstripLocation, thumbstrip, clip, hideControlsTimeout, pop, videoComponent; function TrayComponent (parent, videoComponent, playlistLocation) { super(parent, "tray"); this.playlistLocation = playlistLocation; thumbstripLocation = new com.google.youtube.tv.tree.Location(null, 0); } function build() { thumbstrip = new com.google.youtube.tv.components.ThumbstripComponent(clip, thumbstripLocation); thumbstrip.setPos(THUMBSTRIP_MARGIN, (Stage.height / 2) - (thumbstrip.getHeight() / 2)); thumbstrip.setWidth(Stage.width - (2 * THUMBSTRIP_MARGIN)); thumbstrip.registerEvent(com.google.youtube.tv.components.ThumbstripComponent.THUMBSTRIP_ITEM_SELECT, com.google.chianti.event.EventDelegate.create(this, playSelectedVideo)); } function activate() { if (!initialized) { build(); initialized = true; } var _local2 = playlistLocation.getNode(); var _local3 = playlistLocation.getIndex(); thumbstripLocation.moveTo(_local2, _local3); if (!hideControlsTimeout) { hideControlsTimeout = com.google.youtube.util.Scheduler.setTimeout(com.google.youtube.tv.app.Config.UI_TIMEOUT, com.google.chianti.event.EventDelegate.create(this, pop)); } else { hideControlsTimeout.restart(); } } function deactivate() { hideControlsTimeout.stop(); } function setVisible(value) { super.setVisible(value); thumbstrip.setVisible(value); } function handleKey(keyCode) { switch (keyCode) { case -Key.LEFT : thumbstripLocation.setIndexOffset(-1, false); hideControlsTimeout.restart(); return(true); case com.google.youtube.tv.controller.ExtendedKeys.PREVIOUS : if (videoComponent.getCurrentTime() > 5) { videoComponent.rewind(); } else { pop(); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_PREV_VIDEO, {showtray:true, videoId:videoComponent.getCurrentVideo().getVideoId()})); } return(true); case -Key.RIGHT : thumbstripLocation.setIndexOffset(1, false); hideControlsTimeout.restart(); return(true); case com.google.youtube.tv.controller.ExtendedKeys.NEXT : pop(); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_NEXT_VIDEO, {showtray:true, videoId:videoComponent.getCurrentVideo().getVideoId()})); return(true); case Key.ENTER : playSelectedVideo(); return(true); } return(false); } function playSelectedVideo() { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_WATCH_PLAYLIST, {playlist:thumbstripLocation.getNode(), index:thumbstripLocation.getIndex()})); } function getPlaybackRestriction() { return(undefined); } static var THUMBSTRIP_MARGIN = 100 * com.google.youtube.tv.app.Config.SCALE; var initialized = false; }
Symbol 20644 MovieClip [__Packages.com.google.youtube.tv.util.Hmac] Frame 0
class com.google.youtube.tv.util.Hmac { var hasher, blockSize, keyO, keyI; function Hmac (hasher, key, opt_blockSize) { if ((!hasher) || ((typeof(hasher) != "object") || ((!hasher.reset) || ((!hasher.update) || (!hasher.digest))))) { throw new Error("Invalid hasher object. Hasher unspecified or does not " + "implement expected interface."); } if (key.constructor != Array) { throw new Error("Invalid key."); } if (opt_blockSize && (typeof(opt_blockSize) != "number")) { throw new Error("Invalid block size."); } this.hasher = hasher; blockSize = opt_blockSize || 16; keyO = new Array(blockSize); keyI = new Array(blockSize); if (key.length > blockSize) { hasher.update(key); key = hasher.digest(); } var _local6 = 0; for ( ; _local6 < blockSize ; _local6++) { if (_local6 < key.length) { var _local5 = key[_local6]; } else { var _local5 = 0; } keyO[_local6] = _local5 ^ OPAD; keyI[_local6] = _local5 ^ IPAD; } } function reset() { hasher.reset(); hasher.update(keyI); } function update(data) { if (data.constructor != Array) { throw new Error("Invalid data. Data must be an array."); } hasher.update(data); } function digest() { var _local2 = hasher.digest(); hasher.reset(); hasher.update(keyO); hasher.update(_local2); return(hasher.digest()); } function getHMac(message) { reset(); update(message); return(digest()); } static var OPAD = 92; static var IPAD = 54; }
Symbol 20645 MovieClip [__Packages.com.google.youtube.tv.ui.Symbol] Frame 0
#initclip if (!com.google.youtube.tv.ui.Symbol) { if (!com) { _global.com = new Object(); } if (!com.google) { _global.com.google = new Object(); } if (!com.google.youtube) { _global.com.google.youtube = new Object(); } if (!com.google.youtube.tv) { _global.com.google.youtube.tv = new Object(); } if (!com.google.youtube.tv.ui) { _global.com.google.youtube.tv.ui = new Object(); } //(_global.com.google.youtube.tv.ui.Symbol = function (parent, symbolName, isBitmap, initObject) { if (isBitmap || (isBitmap == undefined)) { super(parent, "symbol"); var _local7 = flash.display.BitmapData.loadBitmap(symbolName); this.clip.attachBitmap(_local7, 0); this.clip._xscale = 100; this.clip._yscale = 100; } else { var _local8 = parent.getNextHighestDepth(); var _local9 = "clip" + _local8; this.clip = parent.attachMovie(symbolName, _local9, _local8, initObject); this.scale(); } }) extends com.google.youtube.tv.ui.View var _local1 = (_global.com.google.youtube.tv.ui.Symbol /* register */).prototype; _local1.scale = function () { this.clip._xscale = com.google.youtube.tv.app.Config.SCALE * 100; this.clip._yscale = com.google.youtube.tv.app.Config.SCALE * 100; }; ASSetPropFlags(_local1, null, 1); } #endinitclip
Symbol 20646 MovieClip [__Packages.com.google.youtube.tv.components.GuideComponent] Frame 0
class com.google.youtube.tv.components.GuideComponent extends com.google.youtube.tv.components.BaseComponent { var playlistLocation, thumbstripUpdateTimeout, root, menuLocation, thumbstripLocation, thumbstrip, clip, menu, collapsed, oldNode, menuNodeWatcher, isExitKeyCode; function GuideComponent (parent, playlistLocation) { super(parent, "guide"); this.playlistLocation = playlistLocation; thumbstripUpdateTimeout = com.google.youtube.util.Scheduler.setTimeout(500, com.google.chianti.event.EventDelegate.create(this, updateThumbstripData)); root = com.google.youtube.tv.tree.ContentTree.getRoot(); menuLocation = new com.google.youtube.tv.tree.Location(root, 0); menuLocation.pointToValue = true; menuLocation.vmap(com.google.chianti.event.EventDelegate.create(this, onMenuLocationChanged)); thumbstripLocation = new com.google.youtube.tv.tree.Location(menuLocation.getValue(), 0); thumbstripLocation.pointToValue = true; thumbstrip = new com.google.youtube.tv.components.ThumbstripComponent(clip, thumbstripLocation); updateThumbstripSizeAndPosition(); thumbstrip.registerEvent(com.google.youtube.tv.components.ThumbstripComponent.THUMBSTRIP_ITEM_SELECT, com.google.chianti.event.EventDelegate.create(this, descend)); menu = new com.google.youtube.tv.components.MenuComponent(clip, menuLocation); menu.registerEvent(com.google.youtube.tv.components.MenuComponent.SEARCH, com.google.chianti.event.EventDelegate.create(this, onMenuSearch)); menu.registerEvent(com.google.youtube.tv.components.MenuComponent.BACK, com.google.chianti.event.EventDelegate.create(this, ascend)); menu.registerEvent(com.google.youtube.tv.components.MenuComponent.UP, com.google.chianti.event.EventDelegate.create(this, onMenuUp)); menu.registerEvent(com.google.youtube.tv.components.MenuComponent.DOWN, com.google.chianti.event.EventDelegate.create(this, onMenuDown)); menu.registerEvent(com.google.youtube.tv.components.MenuComponent.SELECT, com.google.chianti.event.EventDelegate.create(this, onMenuSelect)); menu.registerEvent(com.google.youtube.tv.components.MenuComponent.CONTROL_SELECTION_CHANGE, com.google.chianti.event.EventDelegate.create(this, updateShowSelection)); } function updateThumbstripSizeAndPosition() { var _local2 = (isCollapsed() ? (H_MARGIN) : (THUMBSTRIP_LEFT)); thumbstrip.setPos(_local2, THUMBSTRIP_TOP); thumbstrip.setWidth((Stage.width - H_MARGIN) - _local2); } function isCollapsed() { return(collapsed); } function setCollapsed(value) { if (collapsed == value) { return(undefined); } collapsed = value; menu.setCollapsed(collapsed); updateThumbstripSizeAndPosition(); } function activate() { super.activate(); menu.selectMenu(); } function setVisible(value) { super.setVisible(value); thumbstrip.setVisible(value); } function home() { menuLocation.moveTo(root, 0); updateThumbstripData(); } function onMenuLocationChanged() { setCollapsed(menuLocation.getNode().isMenuCapturing()); if (!thumbstripLocation.getValue()) { updateThumbstripData(); } else { thumbstripUpdateTimeout.restart(); } } function updateThumbstripData(opt_node, opt_index) { thumbstripUpdateTimeout.stop(); var _local4 = opt_node || (menuLocation.getValue()); if (opt_index != undefined) { var _local5 = opt_index; } else if (_local4 == oldNode) { var _local5 = thumbstripLocation.getIndex(); } else { var _local5 = 0; } var _local5 = Math.max(0, Math.min(_local5, _local4.getChildren().length - 1)); _local4.load(); if (!menuNodeWatcher) { menuNodeWatcher = new com.google.youtube.tv.wiring.EventStream("GuideMenuLocationWatcher", null, []); menuNodeWatcher.emap(com.google.chianti.event.EventDelegate.create(this, onMenuNodeUpdate)); } if (oldNode != _local4) { if (oldNode) { oldNode.getValueStream().removeSink(menuNodeWatcher); } if (_local4) { _local4.getValueStream().addSink(menuNodeWatcher); } oldNode = _local4; } thumbstripLocation.moveTo(_local4, _local5); } function onMenuNodeUpdate() { thumbstrip.refresh(true); } function handleNavigationKey(keyCode) { if (isExitKeyCode(keyCode)) { ascend(); return(true); } return(false); } function handleKey(keyCode) { switch (keyCode) { case Key.ENTER : if (!menu.enter()) { descend(); } return(true); case -Key.UP : navigateMenu(-1); return(true); case -Key.DOWN : navigateMenu(1); return(true); case -Key.LEFT : navigateThumbstrip(-1); return(true); case -Key.RIGHT : navigateThumbstrip(1); return(true); } return(false); } function handleWheel(delta) { if (clip._xmouse > com.google.youtube.tv.components.MenuComponent.MENU_WIDTH) { return(false); } return(super.handleWheel(delta)); } function refresh() { menu.refresh(); thumbstrip.refresh(); } function ascend() { var _local2 = menuLocation.getNode(); var _local3 = menuLocation.getIndex(); if (_local2 instanceof com.google.youtube.tv.tree.ChannelNode) { menuLocation.moveTo(_local2.parent.parent, _local2.parent.index); updateThumbstripData(_local2.parent, _local2.index); } else if (_local2.parent) { menuLocation.moveTo(_local2.parent, _local2.index); updateThumbstripData(_local2, _local3); } else { com.google.youtube.tv.platform.Box.exitOnBack(); } } function descend() { if (thumbstripUpdateTimeout.isRunning()) { updateThumbstripData(); } var _local2 = com.google.youtube.tv.tree.TreeNode(thumbstripLocation.getValue()); if (!_local2) { return(undefined); } if (_local2 instanceof com.google.youtube.tv.tree.PlaylistFeedNode) { menuLocation.moveTo(thumbstripLocation.getNode(), thumbstripLocation.getIndex()); updateThumbstripData(); } else if (_local2 instanceof com.google.youtube.tv.tree.ChannelNode) { menuLocation.moveTo(_local2, 0); updateThumbstripData(); } else if (_local2 instanceof com.google.youtube.tv.tree.SearchNode) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_WATCH_PLAYLIST, {playlist:_local2, index:0})); } else if (_local2 instanceof com.google.youtube.tv.tree.VideoNode) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_WATCH_PLAYLIST, {playlist:thumbstripLocation.getNode(), index:thumbstripLocation.getIndex()})); } else if (_local2 instanceof com.google.youtube.tv.tree.VerbNode) { com.google.youtube.tv.tree.VerbNode(_local2).execute(); } else { if (_local2 instanceof com.google.youtube.tv.tree.LoadingNode) { return(undefined); } if (_local2 && (!_local2.isTerminal())) { menuLocation.moveTo(thumbstripLocation.getNode(), thumbstripLocation.getIndex()); updateThumbstripData(); } } } function updateShowSelection() { thumbstrip.setShowSelection(!menu.isControlButtonSelected()); } function navigateMenu(dir) { if (menuLocation.getNode().isMenuCapturing()) { menu.navigate(dir); } else if ((menuLocation.getIndex() != 0) || (!menu.navigate(dir))) { menuLocation.setIndexOffset(dir); } } function onMenuUp(event) { navigateMenu(-1); } function onMenuDown(event) { navigateMenu(1); } function onMenuSelect(event) { menuLocation.setIndex(event.index); updateThumbstripData(); } function onMenuSearch(event) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SEARCH)); } function navigateThumbstrip(dir) { menu.selectMenu(); thumbstripLocation.setIndexOffset(dir, false); } function toString() { return("GuideComponent"); } static var H_MARGIN = 65 * com.google.youtube.tv.app.Config.SCALE; static var THUMBSTRIP_LEFT = 342 * com.google.youtube.tv.app.Config.SCALE; static var THUMBSTRIP_TOP = 225 * com.google.youtube.tv.app.Config.SCALE; }
Symbol 20647 MovieClip [__Packages.com.google.youtube.tv.view.ui.VideoActionBar] Frame 0
class com.google.youtube.tv.view.ui.VideoActionBar extends com.google.youtube.tv.view.ui.UIComponentBase { var manageServiceCompleteHandler, manageServiceErrorHandler, manageService, root, buttons, subscribeButton, clip, likeButton, dislikeButton, playlistButton, width, height, messageText, commandRunning, videoNode, isVisible; function VideoActionBar (container) { super(container); manageServiceCompleteHandler = com.google.chianti.event.EventDelegate.create(this, onVideoManageComplete); manageServiceErrorHandler = com.google.chianti.event.EventDelegate.create(this, onVideoManageError); manageService = com.google.youtube.tv.services.VideoManageService.getInstance(); root = com.google.youtube.tv.tree.ContentTree.getRoot(); buttons = []; subscribeButton = new com.google.youtube.tv.view.ui.SubscribeButton(clip, BUTTON_WIDTH, BUTTON_HEIGHT, SUBSCRIBE); subscribeButton.setTooltips(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.SUBSCRIBE_QUESTION), com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.SUBSCRIBED)); registerButton(subscribeButton); likeButton = createButton(LIKE, "playerLikeIcon"); likeButton.setTooltips(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.LIKE_QUESTION), com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.LIKED)); dislikeButton = createButton(DISLIKE, "playerDislikeIcon"); dislikeButton.setTooltips(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.DISLIKE_QUESTION), com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.DISLIKED)); playlistButton = createButton(PLAYLIST, "playerAddToPlaylistIcon"); playlistButton.setTooltips(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.ADD_TO_PLAYLIST_QUESTION), com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.ADDED_TO_PLAYLIST)); width = buttons.length * BUTTON_WIDTH; height = BUTTON_Y + BUTTON_HEIGHT; var _local4 = 0; var _local5 = 0; for ( ; _local5 < buttons.length ; _local5++) { com.google.youtube.tv.view.ui.TransportButton(buttons[_local5]).setPos(_local4, BUTTON_Y); _local4 = _local4 + BUTTON_WIDTH; } messageText = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(0, 0, Stage.width, BUTTON_Y), com.google.youtube.tv.ui.Text.DEFAULT_FONT_SIZE, com.google.youtube.tv.ui.Colors.WHITE); messageText.setMultiline(true); messageText.setAlign("center"); com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, BUTTON_Y, width, BUTTON_HEIGHT, 0, 0, 0, {start:com.google.youtube.tv.ui.Colors.BLACK, end:com.google.youtube.tv.ui.Colors.BLACK, alphas:[50, 80], angle:90}); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.SUBSCRIPTIONS_CHANGE, com.google.chianti.event.EventDelegate.create(this, initSubscriptionState)); } function setIsActive(value) { super.setIsActive(value); if (value) { if (signingIn && (com.google.youtube.tv.services.SignInService.isSignedIn())) { executeCommand(getActiveButton().getCommand()); } signingIn = false; if (commandRunning && (!manageService.isLoading())) { cancelCommand(); } root.getUserPlaylistsNode().load(); } } function setVideoNode(value) { videoNode = value; resetSelection(); initButtonsState(); } function onKeyUp() { switch (Key.getCode()) { case Key.LEFT : moveSelection(false); break; case Key.RIGHT : moveSelection(true); break; case Key.ENTER : var _local2 = getActiveButton(); if (!(_local2 && (_local2.isEnabled()))) { break; } executeCommand(getActiveButton().getCommand()); } } function initButtonsState() { initSubscriptionState(); likeButton.setSelected(false); dislikeButton.setSelected(false); playlistButton.setSelected(false); updateMessage(); } function initSubscriptionState() { subscribeButton.setSelected(root.getUserSubscriptionsNode().getSubscription(videoNode.getUploaderId()) != null); updateMessage(); } function resetSelection() { setActiveButton(subscribeButton); } function createButton(command, iconId) { var _local4 = new com.google.youtube.tv.view.ui.TransportButton(clip, BUTTON_WIDTH, BUTTON_HEIGHT, command, iconId); registerButton(_local4); return(_local4); } function registerButton(button) { button.setUsingKeys(false); button.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, onButtonMouseClick)); button.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.USER_ACTIVITY, com.google.chianti.event.EventDelegate.create(this, onButtonUserActivity)); buttons.push(button); } function executeCommand(command) { if (!com.google.youtube.tv.services.SignInService.isSignedIn()) { signingIn = true; com.google.youtube.tv.services.StatsLoggerService.getInstance().recordSignInFromBarCommand(command); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SIGN_IN)); return(undefined); } var _local3 = getButtonByCommand(command); if ((((_local3 == likeButton) || (_local3 == dislikeButton)) && (_local3.isSelected())) || (manageService.isLoading())) { return(undefined); } commandRunning = command; showMessage(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.LOADING)); switch (command) { case DISLIKE : case LIKE : case SUBSCRIBE : manageService.registerEvent(com.google.youtube.tv.services.VideoManageService.COMPLETE, manageServiceCompleteHandler); manageService.registerEvent(com.google.youtube.tv.services.VideoManageService.ERROR, manageServiceErrorHandler); if (command == LIKE) { manageService.like(videoNode.getVideoId()); } else if (command == DISLIKE) { manageService.dislike(videoNode.getVideoId()); } else if (command == SUBSCRIBE) { if (_local3.isSelected()) { manageService.unsubscribe(root.getUserSubscriptionsNode().getSubscription(videoNode.getUploaderId()).getSubscriptionId()); } else { manageService.subscribe(videoNode.getUploaderId()); } } break; case PLAYLIST : var _local4 = root.getUserPlaylistsNode().getChildren(); if (!_local4.length) { showMessage(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.NO_PLAYLISTS)); return(undefined); } manageService.registerEvent(com.google.youtube.tv.services.VideoManageService.ERROR, manageServiceErrorHandler); manageService.registerEvent(com.google.youtube.tv.services.VideoManageService.COMPLETE, manageServiceCompleteHandler); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_ADD_TO_PLAYLIST, {videoId:videoNode.getVideoId(), userPlaylists:_local4})); } } function moveSelection(toTheRight) { var _local5 = 0; for ( ; _local5 < buttons.length ; _local5++) { var _local6 = buttons[_local5]; if (_local6.getIsActive()) { var _local3 = _local6; break; } } if (!_local3) { resetSelection(); return(undefined); } if (toTheRight) { _local5++; for ( ; _local5 < buttons.length ; _local5++) { var _local7 = buttons[_local5]; if (_local7.isEnabled()) { var _local3 = _local7; break; } } } else { _local5--; for ( ; _local5 >= 0 ; _local5--) { var _local8 = buttons[_local5]; if (_local8.isEnabled()) { var _local3 = _local8; break; } } } setActiveButton(_local3); } function getActiveButton() { var _local2 = 0; for ( ; _local2 < buttons.length ; _local2++) { var _local3 = buttons[_local2]; if (_local3.getIsActive()) { return(_local3); } } return(null); } function setActiveButton(button) { var _local3 = 0; for ( ; _local3 < buttons.length ; _local3++) { var _local4 = buttons[_local3]; _local4.setIsActive(_local4 == button); } updateMessage(); } function getButtonByCommand(command) { var _local3 = 0; for ( ; _local3 < buttons.length ; _local3++) { var _local4 = buttons[_local3]; if (_local4.getCommand() == command) { return(_local4); } } return(null); } function updateMessage() { var _local2 = getActiveButton(); if (!_local2) { showMessage(""); return(undefined); } showMessage(_local2.getTooltip() || "", (com.google.youtube.tv.services.SignInService.isSignedIn() ? "" : (com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.WILL_ASK_TO_SIGN_IN)))); } function showMessage(line1, opt_line2) { var _local4 = ""; if (line1) { _local4 = ((("<font size=\"" + LINE1_SIZE) + "\">") + line1) + "</font>"; if (opt_line2) { _local4 = _local4 + (((("<br><font size=\"" + LINE2_SIZE) + "\">") + opt_line2) + "</font>"); } } messageText.setHtmlText(_local4); messageText.setPos((width / 2) - (Stage.width / 2), Math.max(0, (BUTTON_Y / 2) - (messageText.getHeight() / 2))); } function cancelCommand() { manageService.unregisterEvent(com.google.youtube.tv.services.VideoManageService.COMPLETE, manageServiceCompleteHandler); manageService.unregisterEvent(com.google.youtube.tv.services.VideoManageService.ERROR, manageServiceErrorHandler); updateMessage(); commandRunning = null; } function onButtonMouseClick(event) { var _local3 = event.target; if (isVisible() && (_local3.isEnabled())) { executeCommand(_local3.getCommand()); } } function onButtonUserActivity(event) { var _local3 = event.target; if (isVisible() && (_local3.isEnabled())) { setActiveButton(_local3); } } function onVideoManageComplete(event) { manageService.unregisterEvent(com.google.youtube.tv.services.VideoManageService.COMPLETE, manageServiceCompleteHandler); manageService.unregisterEvent(com.google.youtube.tv.services.VideoManageService.ERROR, manageServiceErrorHandler); var _local3 = getButtonByCommand(commandRunning); if (_local3) { if (_local3 != subscribeButton) { _local3.setSelected(!_local3.isSelected()); } showMessage(_local3.getTooltip()); if (_local3 == likeButton) { dislikeButton.setSelected(false); } else if (_local3 == dislikeButton) { likeButton.setSelected(false); } } commandRunning = null; } function onVideoManageError(event) { manageService.unregisterEvent(com.google.youtube.tv.services.VideoManageService.COMPLETE, manageServiceCompleteHandler); manageService.unregisterEvent(com.google.youtube.tv.services.VideoManageService.ERROR, manageServiceErrorHandler); showMessage(event.message); commandRunning = null; } static var SUBSCRIBE = "SUBSCRIBE"; static var LIKE = "LIKE"; static var DISLIKE = "DISLIKE"; static var PLAYLIST = "PLAYLIST"; static var BUTTON_Y = 80 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_WIDTH = 100 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_HEIGHT = 70 * com.google.youtube.tv.app.Config.SCALE; static var LINE1_SIZE = com.google.youtube.tv.ui.Font.getFontSizeForHeight(22 * com.google.youtube.tv.app.Config.SCALE); static var LINE2_SIZE = com.google.youtube.tv.ui.Font.getFontSizeForHeight(15 * com.google.youtube.tv.app.Config.SCALE); var signingIn = false; }
Symbol 20648 MovieClip [__Packages.com.google.youtube.tv.ui.ProgressBar] Frame 0
class com.google.youtube.tv.ui.ProgressBar extends com.google.youtube.tv.ui.View { var setPos, width, height, progressColor, progress, buffer, clip; function ProgressBar (parent, x, y, width, height, progressColor) { super(parent, "progressBar"); setPos(x, y); this.width = width; this.height = height; this.progressColor = progressColor; } function setProgress(percent) { if (progress == percent) { return(undefined); } progress = percent; redraw(); } function setBuffer(percent) { if (buffer == percent) { return(undefined); } buffer = percent; redraw(); } function setProgressColor(value) { if (progressColor == value) { return(undefined); } progressColor = value; redraw(); } function redraw() { clip.clear(); if ((!width) || (!height)) { return(undefined); } com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, width, height, 0, 0, 0, com.google.youtube.tv.ui.Colors.WHITE, 10); if (buffer) { com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, (width * buffer) / 100, height, 0, 0, 0, com.google.youtube.tv.ui.Colors.BUFFER_GRAY, 100); } if (progress) { com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, (width * progress) / 100, height, 0, 0, 0, progressColor, 100); } com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, 0, 0, (width * Math.max(buffer, progress)) / 100, 1, 0, 0, 0, com.google.youtube.tv.ui.Colors.WHITE, 15); } }
Symbol 20649 MovieClip [__Packages.com.adobe.serialization.json.JSONTokenType] Frame 0
class com.adobe.serialization.json.JSONTokenType { function JSONTokenType () { } static var UNKNOWN = -1; static var COMMA = 0; static var LEFT_BRACE = 1; static var RIGHT_BRACE = 2; static var LEFT_BRACKET = 3; static var RIGHT_BRACKET = 4; static var COLON = 6; static var TRUE = 7; static var FALSE = 8; static var NULL = 9; static var STRING = 10; static var NUMBER = 11; }
Symbol 20650 MovieClip [__Packages.com.google.youtube.tv.tree.SearchNode] Frame 0
class com.google.youtube.tv.tree.SearchNode extends com.google.youtube.tv.tree.PlaylistFeedNode { var needLoadMore, initialNeededLoadMore, setTrackingType, query, hdOnly, url, broadcast, cobj, videoCount, refresh, children, title; function SearchNode (paginated) { super(); needLoadMore = paginated; initialNeededLoadMore = paginated; setTrackingType(com.google.youtube.tv.tree.TreeNode.TRACKING_TYPE_SEARCH); com.google.chianti.event.EventBroadcaster.initialize(this); } function appendDefaultParamsToUrl(url) { url = super.appendDefaultParamsToUrl(url); var _local4 = ["q=" + query, "paid-content=false"]; if (hdOnly) { _local4.push("hd=true"); } return(com.google.youtube.tv.util.StringUtil.addParamsToRequest(url, _local4)); } function load() { if (query) { url = appendDefaultParamsToUrl(com.google.youtube.tv.util.StringUtil.replacePlaceholders(SEARCH_URL)); super.load(); } } function onLoadComplete(event) { super.onLoadComplete(event); broadcast({type:SEARCH_COMPLETE}); } function search(query, hdOnly) { this.query = query; this.hdOnly = hdOnly; cobj = null; videoCount = 0; refresh(); } function toString() { return(((("<SearchNode title:" + title) + " count:") + children.length) + " />"); } static var SEARCH_COMPLETE = "SEARCH_COMPLETE"; static var SEARCH_URL = "${gdataUrl}/feeds/api/videos"; }
Symbol 20651 MovieClip [__Packages.com.google.youtube.tv.view.ui.list.PairedDeviceListItem] Frame 0
class com.google.youtube.tv.view.ui.list.PairedDeviceListItem extends com.google.youtube.tv.view.ui.list.ListItem { var icon, clip, height, textView, data; function PairedDeviceListItem (parent) { super(parent); } function createChildren() { super.createChildren(); icon = new com.google.youtube.tv.ui.Symbol(clip, "phoneIcon", false); icon.setPos(0, (height / 2) - (icon.getHeight() / 2)); textView = new com.google.youtube.tv.ui.Text(clip, null, com.google.youtube.tv.ui.Text.DEFAULT_FONT_SIZE, com.google.youtube.tv.ui.Colors.MENU_GRAY); } function updateChildren() { textView.setText(data.name); textView.setPos(icon.getWidth() + (icon.getWidth() / 2), (height / 2) - (textView.getHeight() / 2)); } }
Symbol 20652 MovieClip [__Packages.com.google.youtube.tv.controller.ClearCookiesController] Frame 0
class com.google.youtube.tv.controller.ClearCookiesController { var clip, dialog; function ClearCookiesController (clip) { this.clip = clip; com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_CLEAR_COOKIES, com.google.chianti.event.EventDelegate.create(this, clearCookies)); } function clearCookies() { if (!dialog) { dialog = new com.google.youtube.tv.components.Dialog(clip); dialog.setTitle(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.CLEAR_COOKIES_TITLE)); dialog.setHtmlMessage(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.CLEAR_COOKIES_TEXT)); dialog.addButton(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.CANCEL_BTN), null, true); dialog.addOKButton(); dialog.registerEvent(com.google.youtube.tv.components.DialogWithButtons.BUTTON_CLICK, com.google.chianti.event.EventDelegate.create(this, onButtonClick)); } dialog.show(); } function onButtonClick(event) { if (dialog.getSelectedButtonId() == "OK") { } } }
Symbol 20653 MovieClip [__Packages.com.google.youtube.tv.components.VideoInfoContentView] Frame 0
class com.google.youtube.tv.components.VideoInfoContentView extends com.google.youtube.tv.ui.View { var playlistText, clip, titleText, image, channelText, descriptionText, durationCircle, viewsCircle, actionBar, videoNode, setVisible; function VideoInfoContentView (parent, videoNode) { super(parent, "infoPanel"); PLAYLIST_BOX.height = com.google.youtube.tv.ui.Font.getComponentHeight(PLAYLIST_LINE_HEIGHT); playlistText = new com.google.youtube.tv.ui.Text(clip, PLAYLIST_BOX, com.google.youtube.tv.ui.Font.getFontSizeForHeight(PLAYLIST_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.TEXT_GRAY); TITLE_BOX.height = com.google.youtube.tv.ui.Font.getComponentHeight(TITLE_LINE_HEIGHT); titleText = new com.google.youtube.tv.ui.Text(clip, TITLE_BOX, com.google.youtube.tv.ui.Font.getFontSizeForHeight(TITLE_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITEST); titleText.setAutoTruncate(true); image = new com.google.youtube.tv.ui.Image(clip, IMAGE_BOX); CHANNEL_BOX.height = com.google.youtube.tv.ui.Font.getComponentHeight(CHANNEL_LINE_HEIGHT); channelText = new com.google.youtube.tv.ui.Text(clip, CHANNEL_BOX, com.google.youtube.tv.ui.Font.getFontSizeForHeight(CHANNEL_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); channelText.setAutoTruncate(true); descriptionText = new com.google.youtube.tv.ui.Text(clip, DESCRIPTION_BOX, com.google.youtube.tv.ui.Font.getFontSizeForHeight(DESCRIPTION_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); descriptionText.setMultiline(true); descriptionText.setAutoTruncate(true); durationCircle = new com.google.youtube.tv.ui.TextCircle(clip, DURATION_BOX, com.google.youtube.tv.ui.Colors.WHITE, CIRCLE_BASELINE); viewsCircle = new com.google.youtube.tv.ui.TextCircle(clip, VIEWS_BOX, com.google.youtube.tv.ui.Colors.WHITE, CIRCLE_BASELINE); actionBar = new com.google.youtube.tv.view.ui.VideoActionBar(clip); actionBar.setPos((Stage.width / 2) - (actionBar.getWidth() / 2), (Stage.height - actionBar.getHeight()) - ACTION_BAR_BOTTOM); } function setVideoNode(value) { if (videoNode == value) { return(undefined); } videoNode = value; actionBar.setVideoNode(videoNode); setVisible(videoNode); if (videoNode) { update(); } } function update() { playlistText.setHtmlText((videoNode.parent ? (com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.NOW_PLAYING_IN, {PLAYLIST:((("<font color=\"#" + com.google.youtube.tv.ui.Colors.WHITE.toString(16)) + "\">") + videoNode.parent.getTitle()) + "</font>"})) : (com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.NOW_PLAYING)))); titleText.setText(videoNode.getTitle()); image.setImage(com.google.youtube.tv.util.YTUtil.getImageUrl(videoNode.getUploaderId())); channelText.setText(videoNode.getAuthor() || (videoNode.getUserId() || "")); descriptionText.setText(videoNode.getDescription()); durationCircle.setVisible(videoNode.getDuration()); durationCircle.setHtmlText(getCircleHtml(videoNode.getDuration(), com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.TIME))); viewsCircle.setVisible((videoNode.getViewCount()) && (videoNode.getViewCount() != "0")); viewsCircle.setHtmlText(getCircleHtml(videoNode.getViewCount(), com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.VIEWS))); } function getCircleHtml(line1, line2) { var _local4 = ((line1.length > 9) ? (CIRCLE_LINE1_FALLBACK_SIZE) : (CIRCLE_LINE1_SIZE)); return((((((((("<font size=\"" + _local4) + "\">") + line1) + "</font><br>") + "<font size=\"") + CIRCLE_LINE2_SIZE) + "\">") + line2) + "</font>"); } function activate() { actionBar.setIsActive(true); actionBar.setPos((Stage.width / 2) - (actionBar.getWidth() / 2), (Stage.height - actionBar.getHeight()) - ACTION_BAR_BOTTOM); } function deactivate() { actionBar.setIsActive(false); } static var PLAYLIST_LINE_HEIGHT = 17; static var PLAYLIST_BOX = new flash.geom.Rectangle(95 * com.google.youtube.tv.app.Config.SCALE, 133 * com.google.youtube.tv.app.Config.SCALE, 900 * com.google.youtube.tv.app.Config.SCALE, 0); static var TITLE_LINE_HEIGHT = 28; static var TITLE_BOX = new flash.geom.Rectangle(93 * com.google.youtube.tv.app.Config.SCALE, 171 * com.google.youtube.tv.app.Config.SCALE, 750 * com.google.youtube.tv.app.Config.SCALE, 0); static var IMAGE_BOX = new flash.geom.Rectangle(96 * com.google.youtube.tv.app.Config.SCALE, 239 * com.google.youtube.tv.app.Config.SCALE, 60 * com.google.youtube.tv.app.Config.SCALE, 60 * com.google.youtube.tv.app.Config.SCALE); static var CHANNEL_LINE_HEIGHT = 21; static var CHANNEL_BOX = new flash.geom.Rectangle(170 * com.google.youtube.tv.app.Config.SCALE, 233 * com.google.youtube.tv.app.Config.SCALE, 600 * com.google.youtube.tv.app.Config.SCALE, 0); static var DESCRIPTION_LINE_HEIGHT = 16; static var DESCRIPTION_BOX = new flash.geom.Rectangle(170 * com.google.youtube.tv.app.Config.SCALE, 273 * com.google.youtube.tv.app.Config.SCALE, 600 * com.google.youtube.tv.app.Config.SCALE, 150 * com.google.youtube.tv.app.Config.SCALE); static var CIRCLE_LINE1_SIZE = com.google.youtube.tv.ui.Font.getFontSizeForHeight(28 * com.google.youtube.tv.app.Config.SCALE); static var CIRCLE_LINE1_FALLBACK_SIZE = com.google.youtube.tv.ui.Font.getFontSizeForHeight(20 * com.google.youtube.tv.app.Config.SCALE); static var CIRCLE_LINE2_SIZE = com.google.youtube.tv.ui.Font.getFontSizeForHeight(13 * com.google.youtube.tv.app.Config.SCALE); static var DURATION_BOX = new flash.geom.Rectangle(840 * com.google.youtube.tv.app.Config.SCALE, 205 * com.google.youtube.tv.app.Config.SCALE, 160 * com.google.youtube.tv.app.Config.SCALE, 160 * com.google.youtube.tv.app.Config.SCALE); static var VIEWS_BOX = new flash.geom.Rectangle(1000 * com.google.youtube.tv.app.Config.SCALE, 180 * com.google.youtube.tv.app.Config.SCALE, 210 * com.google.youtube.tv.app.Config.SCALE, 210 * com.google.youtube.tv.app.Config.SCALE); static var CIRCLE_BASELINE = 5 * com.google.youtube.tv.app.Config.SCALE; static var ACTION_BAR_BOTTOM = 137 * com.google.youtube.tv.app.Config.SCALE; }
Symbol 20654 MovieClip [__Packages.com.google.youtube.tv.components.AdInfoComponent] Frame 0
class com.google.youtube.tv.components.AdInfoComponent extends com.google.youtube.tv.components.BaseComponent { var playlist, hideContextTimeout, adsService, hostVideoThumbnail, clip, background, headerText, titleText, skippableText, nextUpText, hostVideoTitle, adActive; function AdInfoComponent (parent, playlist) { super(parent, "adInfo"); this.playlist = playlist; hideContextTimeout = com.google.youtube.util.Scheduler.setTimeout(CONEXT_TIMEOUT, com.google.chianti.event.EventDelegate.create(this, setVideoContextVisible, false)); adsService = com.google.youtube.tv.ads.AdsService.getInstance(); adsService.adState.filter(function (value) { return(value == com.google.youtube.tv.ads.AdsService.AD_STATE_PLAY); }).emap(com.google.chianti.event.EventDelegate.create(this, build)); adsService.adState.filter(function (value) { return((value == com.google.youtube.tv.ads.AdsService.AD_STATE_PLAY) || ((value == com.google.youtube.tv.ads.AdsService.AD_STATE_COMPLETE) || (value == com.google.youtube.tv.ads.AdsService.AD_STATE_ERROR))); }).emap(com.google.chianti.event.EventDelegate.create(this, onAdState)); adsService.adInfo.vmap(com.google.chianti.event.EventDelegate.create(this, onAdInfo)); adsService.adProgress.vmap(com.google.chianti.event.EventDelegate.create(this, onAdProgress)); } function build() { if (initialized) { return(undefined); } initialized = true; var _local2 = new flash.geom.Rectangle((Stage.width - HORIZONTAL_MARGIN) - THUMBNAIL_WIDTH, (((Stage.height - HEIGHT) - THUMBNAIL_HEIGHT) - 7) + (com.google.youtube.tv.ui.Font.getComponentHeight(SMALL_LINE_HEIGHT) * 2), THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT); hostVideoThumbnail = new com.google.youtube.tv.ui.CroppedImage(clip, _local2); background = clip.createEmptyMovieClip("background", clip.getNextHighestDepth()); com.google.youtube.tv.util.DrawUtil.drawRectangle(background, 0, Stage.height - HEIGHT, Stage.width, HEIGHT, 0, null, null, com.google.youtube.tv.ui.Colors.DARK_GRAY, 80); headerText = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(HORIZONTAL_MARGIN, (Stage.height - HEIGHT) + (PADDING / 2), TEXT_FIELDS_WIDTH, com.google.youtube.tv.ui.Font.getComponentHeight(SMALL_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(SMALL_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.AD_COLOR, false, "none"); titleText = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(HORIZONTAL_MARGIN, headerText.getRect().bottom - 5, TEXT_FIELDS_WIDTH, com.google.youtube.tv.ui.Font.getComponentHeight(DEFAULT_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(DEFAULT_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE, false, "none"); titleText.setAutoTruncate(true); skippableText = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(Stage.width / 2, (Stage.height - HEIGHT) - 4, 1, com.google.youtube.tv.ui.Font.getComponentHeight(SMALL_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(SMALL_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE, false, "center"); nextUpText = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(_local2.x + 5, Stage.height - HEIGHT, THUMBNAIL_WIDTH, com.google.youtube.tv.ui.Font.getComponentHeight(SMALL_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(SMALL_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.TEXT_GRAY); nextUpText.setText(com.google.youtube.tv.services.MessagesService.get().getMsg(com.google.youtube.tv.services.MessagesService.AD_NEXT_LABEL)); hostVideoTitle = new com.google.youtube.tv.ui.Text(clip, new flash.geom.Rectangle(nextUpText.getPos().x, nextUpText.getRect().bottom - 5, THUMBNAIL_WIDTH, com.google.youtube.tv.ui.Font.getComponentHeight(SMALL_LINE_HEIGHT)), com.google.youtube.tv.ui.Font.getFontSizeForHeight(SMALL_LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); hostVideoTitle.setAutoTruncate(true); } function onAdState() { adActive = adsService.isAdActive(); if (adActive) { refreshHostVideoInfo(); hideContextTimeout.restart(); } setVisible(adActive); } function onAdProgress(progress) { var _local3 = com.google.youtube.util.StringUtil.secondsToTimeString(int(progress[com.google.youtube.tv.ads.AdsService.AD_DURATION] - progress[com.google.youtube.tv.ads.AdsService.AD_CURRENT_TIME])); headerText.setText(com.google.youtube.tv.services.MessagesService.get().getMsg(com.google.youtube.tv.services.MessagesService.AD_TIMING, {AD_TIME:_local3})); if (adsService.adInfo.getValue()[com.google.youtube.tv.ads.AdsService.AD_SKIPPABLE]) { var _local4 = (adsService.canSkipAd() ? (com.google.youtube.tv.services.MessagesService.get().getMsg(com.google.youtube.tv.services.MessagesService.SKIP_AD, {SKIP_ICON:"\u25B6|"})) : (com.google.youtube.tv.services.MessagesService.get().getMsg(com.google.youtube.tv.services.MessagesService.PRE_SKIP_AD, {X_SECONDS:progress[com.google.youtube.tv.ads.AdsService.CAN_SKIP_IN]}))); skippableText.setText(_local4); } else { skippableText.setText(""); } } function onAdInfo(info) { titleText.setText(info[com.google.youtube.tv.ads.AdsService.AD_TITLE]); } function refreshHostVideoInfo() { hostVideoThumbnail.setImage(com.google.youtube.tv.tree.VideoNode(playlist.getValue()).getThumbnailUrl()); hostVideoTitle.setText(com.google.youtube.tv.tree.VideoNode(playlist.getValue()).getTitle()); } function setVideoContextVisible(visible) { hostVideoThumbnail.setVisible(visible); hostVideoTitle.setVisible(visible); nextUpText.setVisible(visible); } function setVisible(visible) { setVideoContextVisible(visible); super.setVisible(visible); } function getPlaybackRestriction() { return(undefined); } function toString() { return("<AdInfoComponent />"); } static var HEIGHT = 120 * com.google.youtube.tv.app.Config.SCALE; static var PADDING = 18 * com.google.youtube.tv.app.Config.SCALE; static var HORIZONTAL_MARGIN = 40 * com.google.youtube.tv.app.Config.SCALE; static var SMALL_LINE_HEIGHT = 14; static var DEFAULT_LINE_HEIGHT = 16; static var LARGE_LINE_HEIGHT = 20; static var TEXT_FIELDS_WIDTH = 500 * com.google.youtube.tv.app.Config.SCALE; static var THUMBNAIL_WIDTH = 270 * com.google.youtube.tv.app.Config.SCALE; static var THUMBNAIL_HEIGHT = 200 * com.google.youtube.tv.app.Config.SCALE; static var CONEXT_TIMEOUT = 3000; var initialized = false; }
Symbol 20655 MovieClip [__Packages.com.google.youtube.tv.util.DateUtil] Frame 0
class com.google.youtube.tv.util.DateUtil { static var serverDate, timeFetcher, serverDateTimer; function DateUtil () { } static function initServerDate() { if (serverDate) { return(undefined); } timeFetcher = new com.google.youtube.tv.data.DataFetcher(); timeFetcher.registerEvent(com.google.youtube.tv.data.DataFetcher.LOAD_COMPLETE, onFetcherFinish); timeFetcher.registerEvent(com.google.youtube.tv.data.DataFetcher.LOAD_ERROR, onFetcherFinish); timeFetcher.fetch("https://gdata.youtube.com/feeds/api/videos/-/-?v=2.1&fields=updated"); } static function getDate() { if (serverDate) { return(new Date((serverDate.getTime() + getTimer()) - serverDateTimer)); } return(new Date()); } static function dateToString(dateStr) { var _local3 = ""; if (!_global.isNaN(dateStr)) { var _local4 = new Date(Number(dateStr) * 1000); _local3 = _local3 + (((_local4.getMonth() + 1) < 10) ? "0" : ""); _local3 = _local3 + ((_local4.getMonth() + 1) + "/"); _local3 = _local3 + ((_local4.getDate() < 10) ? "0" : ""); _local3 = _local3 + (_local4.getDate() + "/"); _local3 = _local3 + String(_local4.getFullYear()).substr(-2); } else if ((dateStr.indexOf("T") != -1) && (dateStr.indexOf("-") != -1)) { var _local5 = dateStr.split("T")[0].split("-"); _local3 = (((_local5[1] + "/") + _local5[2]) + "/") + _local5[0].substr(2); } else if (dateStr) { _local3 = dateStr; } return(_local3); } static function parseUTCDate(str) { var _local3 = str.split("-"); var _local4 = _global.parseInt(_local3[0]); var _local5 = _global.parseInt(_local3[1]); var _local6 = _local3[2].split("T"); var _local7 = _global.parseInt(_local6[0]); var _local8 = _local6[1].split(":"); var _local9 = _global.parseInt(_local8[0]); var _local10 = _global.parseInt(_local8[1]); var _local11 = _global.parseInt(_local8[2]); var _local12 = new Date(); _local12.setUTCFullYear(_local4); _local12.setUTCMonth(_local5 - 1); _local12.setUTCDate(_local7); _local12.setUTCHours(_local9); _local12.setUTCMinutes(_local10); _local12.setUTCSeconds(_local11); return(_local12); } static function formatDurationInSeconds(seconds) { var _local3 = Math.floor(seconds / 60) % 60; var _local4 = Math.floor((seconds / 60) / 60); var _local5 = String(seconds % 60); if (_local5.length == 1) { _local5 = "0" + _local5; } var _local6 = _local3.toString(); if ((_local4 > 0) && (_local6.length == 1)) { _local6 = "0" + _local6; } var _local7 = (_local6 + ":") + _local5; if (_local4 > 0) { _local7 = (_local4.toString() + ":") + _local7; } return(_local7); } static function durationToSeconds(duration) { if ((!duration) || (duration.charAt(0) != "P")) { return(0); } if (duration.indexOf(",") > 0) { duration = duration.split(",").join("."); } duration = duration.substr(1); var _local3 = duration.indexOf("M"); if ((_local3 > 0) && (_local3 < duration.indexOf("T"))) { duration = (duration.substr(0, _local3) + "N") + duration.substring(_local3 + 1); } duration = duration.split("T").join(""); var _local4 = 0; var _local5 = ""; var _local6 = 0; for ( ; _local6 < duration.length ; _local6++) { var _local7 = duration.charAt(_local6); if (DURATION_MULTIPLIERS[_local7]) { var _local8 = Number(_local5); for ( ; _global.isNaN(_local8) ; _local6++) { } _local4 = _local4 + (_local8 * DURATION_MULTIPLIERS[_local7]); _local5 = ""; } else { _local5 = _local5 + _local7; } } return(_local4); } static function onFetcherFinish(event) { if (event.type == com.google.youtube.tv.data.DataFetcher.LOAD_COMPLETE) { serverDateTimer = getTimer(); var _local3 = new XML(); _local3.ignoreWhite = true; _local3.parseXML(event.src); serverDate = parseUTCDate(_local3.firstChild.firstChild.firstChild.nodeValue); } timeFetcher.unregisterAll(); timeFetcher = null; } static var DURATION_MULTIPLIERS = {Y:((60 * 60) * 24) * 365, N:((60 * 60) * 24) * 30, D:(60 * 60) * 24, H:60 * 60, M:60, S:1}; }
Symbol 20656 MovieClip [__Packages.com.google.youtube.tv.view.ui.SuggestionButton] Frame 0
class com.google.youtube.tv.view.ui.SuggestionButton extends com.google.youtube.tv.view.ui.Button { var setUsingKeys, initText, setContentAlign, icon, clip, tipText; function SuggestionButton (container, width, height) { super(container, width, height); setUsingKeys(false); initText("", LINE_HEIGHT, com.google.youtube.tv.ui.Colors.WHITE); setContentAlign(com.google.youtube.tv.view.ui.Button.LEFT); createIcon(); } function createIcon() { icon = new com.google.youtube.tv.ui.View(clip); com.google.youtube.tv.util.DrawUtil.drawRectangle(icon.clip, 0, 0, TIP_SIZE, TIP_SIZE, 1, com.google.youtube.tv.ui.Colors.WHITE, 50, 0, 0); tipText = new com.google.youtube.tv.ui.Text(icon.clip, null, com.google.youtube.tv.ui.Font.getFontSizeForHeight(LINE_HEIGHT), com.google.youtube.tv.ui.Colors.WHITE); } function setTip(value) { tipText.setText(value); tipText.setPos((icon.clip._width / 2) - (tipText.clip._width / 2), (icon.clip._height / 2) - (tipText.clip._height / 2)); } static var TIP_SIZE = 30 * com.google.youtube.tv.app.Config.SCALE; static var LINE_HEIGHT = 14; }
Symbol 20657 MovieClip [__Packages.com.google.youtube.tv.controller.ChromelessHost] Frame 0
class com.google.youtube.tv.controller.ChromelessHost extends com.google.chianti.event.EventBroadcaster { var container, player, adsService, seeking, seekAllowed, seekOnPlay, seekTimeout, videoNode, lastCurrentTime, playbackFirstDetectedTime, tid, storage, SK, adHostVideoNode, adPaused, autoPlay, streamStartSeconds, seekToTime, playerTimeBeforeSeek; function ChromelessHost (container) { super(); com.google.chianti.event.EventBroadcaster.initialize(this); this.container = container; } function init() { System.security.allowDomain("www.youtube.com"); player = container.createEmptyMovieClip("PLAYER", container.getNextHighestDepth()); player._x = (Stage.width - DEFAULT_PLAYER_WIDTH) - LOGO_SHIFT; player._y = (Stage.height - DEFAULT_PLAYER_HEIGHT) - LOGO_SHIFT; if (com.google.youtube.tv.app.Environment.getOverridenFlashVar("sc") == "0") { API_PLAYER_PATH = API_PLAYER_PATH.split("https").join("http"); } com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.LGUPLUS_FEATURE, com.google.chianti.event.EventDelegate.create(this, onLGUPlusFeature)); var _local2 = new MovieClipLoader(); _local2.addListener(this); _local2.loadClip(API_PLAYER_PATH, player); adsService = com.google.youtube.tv.ads.AdsService.getInstance(); } function onInterval() { if (!ready) { initializeChromelessPlayer(); return(undefined); } var _local2 = getDuration(); var _local3 = 0; if (_local2 > 0) { _local3 = getCurrentTime(); } else { _local3 = 0; } var _local4 = isPlaybackDetected(); if (_local4 && (seeking)) { completeSeek(); } if ((com.google.youtube.tv.platform.Box.getVendor() == com.google.youtube.tv.platform.Box.VENDOR_SAMSUNG) && (_local4 && (getPlayerState() == com.google.youtube.tv.model.PlayerState.BUFFERING))) { player.playVideo(); } if ((getCurrentTime() > 1) && ((!seekAllowed) && (getPlayerState() == com.google.youtube.tv.model.PlayerState.PLAYING))) { seekAllowed = true; if (seekOnPlay) { seekOnPlay = false; if (!seekTimeout) { seek(); } } } if (videoNode && (_local2 >= 0)) { reportProgress(); } lastCurrentTime = _local3; } function isPlaybackDetected() { var _local2 = player.getCurrentTime(); var _local3 = (_local2 > 0) && ((lastCurrentTime > 0) && (_local2 != lastCurrentTime)); if (_local3) { if (_global.isNaN(playbackFirstDetectedTime)) { playbackFirstDetectedTime = _local2; } else { if (Math.abs(_local2 - playbackFirstDetectedTime) > PLAYBACK_DETECTION_RESET_TIME) { playbackFirstDetectedTime = _global.NaN; return(false); } if ((_local2 - playbackFirstDetectedTime) > PLAYBACK_DETECTION_TIME) { playbackFirstDetectedTime = _global.NaN; return(true); } } } return(false); } function reportProgress() { var _local2 = player.loadClip.overallHolder.videoPlayer.videoLoader; var _local3 = 100 * player.getVideoLoadedFraction(); var _local4 = _local2.isInPreroll(); var _local5 = ((getDuration() && (player.getVideoBytesTotal())) ? (player.getVideoBytesTotal() / getDuration()) : 0); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_PROGRESS, {duration:getDuration(), loaded:_local3, currentTime:getCurrentTime(), adPreRoll:_local4, bitrate:_local5})); } function initializeChromelessPlayer() { if (!player.isPlayerLoaded()) { return(undefined); } player.addEventListener("onStateChange", com.google.chianti.event.EventDelegate.create(this, onChromelessStateChange)); player.addEventListener("onErrorWithData", com.google.chianti.event.EventDelegate.create(this, onChromelessError)); player.addEventListener("onAdModuleEvent", com.google.chianti.event.EventDelegate.create(this, onAdModuleEvent)); player.addEventListener("onBrandingOptions", com.google.chianti.event.EventDelegate.create(this, onBrandingOptions)); player.addEventListener("onSubtitlesDataLoaded", com.google.chianti.event.EventDelegate.create(this, onSubtitlesData)); player.addEventListener("onSubtitlesScreenUpdate", com.google.chianti.event.EventDelegate.create(this, onSubtitlesScreenUpdate)); player.useHandCursor = false; player.setSize(Stage.width, Stage.height); player._x = 0; player._y = 0; player.enableH264ForFlashLite(); player.setLogoVisible(false); if (com.google.youtube.tv.platform.Box.forceFullscreen()) { player.forceFullscreen(); player.setSize(Stage.width, Stage.height); } com.google.youtube.tv.services.SignInService.getInstance().registerEvents(com.google.youtube.tv.services.SignInService.ACCESS_TOKEN_FIRST_RECEIVE, com.google.youtube.tv.services.SignInService.ACCESS_TOKEN_UPDATE, com.google.youtube.tv.services.SignInService.SIGN_OUT, com.google.chianti.event.EventDelegate.create(this, updateAccessToken)); updateAccessToken(); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_INIT)); ready = true; com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_READY)); } function onLGUPlusFeature(event) { var _local3 = com.google.youtube.tv.platform.Box.getExplicitVideoRectangle(); if (_local3) { player.setExplicitVideoSize(_local3.width, _local3.height); } } function onLoadComplete(mc) { tid = _global.setInterval(this, "onInterval", 500); } function onLoadInit(mc) { player.eurl = "https://s.ytimg.com/yt/swf/leanbacklite_v3.swf"; player.c = com.google.youtube.tv.platform.Box.getBoxId(); storage = com.google.youtube.tv.services.StorageService.get(); storage.registerEvent(com.google.youtube.tv.services.StorageService.STORAGE_READY, com.google.chianti.event.EventDelegate.create(this, onStorageReady)); } function onStorageReady() { SK = storage.getValue(com.google.youtube.tv.services.StorageService.SK); if (SK) { player.sk = SK; } else { SK = player.sk; storage.setValueWithoutFlush(com.google.youtube.tv.services.StorageService.SK, SK); storage.setValue(com.google.youtube.tv.services.StorageService.SK_TIMESTAMP, com.google.youtube.tv.services.StorageService.getTimestamp()); } } function onChromelessStateChange(playerState) { if (playerState == com.google.youtube.tv.model.PlayerState.ENDED) { setVisible(false); } com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_STATE_CHANGE, {playerState:playerState, videoId:videoNode.getVideoId(), currentTime:getCurrentTime()})); if (seeking && ((!seekOnPlay) && (playerState == com.google.youtube.tv.model.PlayerState.PLAYING))) { completeSeek(); } } function onChromelessError(data) { com.google.youtube.tv.services.StatsLoggerService.getInstance().sendVideoSkippedReason(videoNode.getVideoId(), data.errorCode); com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_ERROR, {error:data.errorCode, description:data.description, videoId:videoNode.getVideoId()})); } function updateAccessToken() { if (player && (player.setAccessToken)) { player.setAccessToken(com.google.youtube.tv.services.SignInService.getInstance().accessToken || null); } } function onBrandingOptions(options) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.BRANDING_OPTIONS_READY, options)); } function onSubtitlesData(event) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.SUBTITLES_EVENT, event)); } function onSubtitlesScreenUpdate(event) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.SUBTITLES_SCREEN_UPDATE)); } function unserialize(serializedString) { var _local3 = new LoadVars(); _local3.decode(serializedString); return(Object(_local3)); } function onAdModuleEvent(evtData) { var _local3 = unserialize(evtData); var _local4 = _local3.type; delete _local3.type; adsService.processAdEvent(_local4, _local3); switch (_local4) { case "onAdModuleLoaded" : adHostVideoNode = videoNode; break; case "onAdModuleComplete" : adVideoLastTimestamp = new Date().getTime() / 1000; case "onAdModuleError" : videoNode = adHostVideoNode; adHostVideoNode = null; } } function onPlayerClick() { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_CLICK)); } function getVideoNode() { return(videoNode); } function getCurrentTime() { var _local2 = player.getCurrentTime(); return(((_global.isNaN(_local2) || ((_local2 < 0) || (!videoNode))) ? 0 : (_local2))); } function getDuration() { var _local2 = player.getDuration(); return(((_global.isNaN(_local2) || ((_local2 < 0) || (!videoNode))) ? 0 : (_local2))); } function getPlayerState() { return(player.getPlayerState()); } function isPlaying() { if (adHostVideoNode) { return(!adPaused); } return((player.getPlayerState() == com.google.youtube.tv.model.PlayerState.PLAYING) || ((player.getPlayerState() == com.google.youtube.tv.model.PlayerState.BUFFERING) || (player.getPlayerState() == com.google.youtube.tv.model.PlayerState.SEEKING))); } function isPlayerReady() { return(ready); } function autoPlayOnce() { autoPlay = true; } function play(videoNode) { this.videoNode = videoNode; var _local3 = videoNode.parent; player.setListId(_local3.getTrackingType()); player.setFeature(_local3.getFeatureType(), _local3.getFeatureBunch().ytr); seekAllowed = false; resetSeek(); player.setAdsTimestamp(adVideoLastTimestamp); player.setAutoPlay(autoPlay); autoPlay = false; setVisible(true); streamStartSeconds = videoNode.getStartSeconds(); player.loadVideoById(videoNode.getVideoId(), videoNode.getStartSeconds()); } function pause() { if (videoNode && (!seeking)) { if (adHostVideoNode) { adPaused = true; } player.pauseVideo(); return(true); } return(false); } function unpause() { if (videoNode && (!seeking)) { if (adHostVideoNode) { adPaused = false; } player.playVideo(); return(true); } return(false); } function stop() { if (adsService.isAdActive()) { player.pauseVideo(); adsService.processAdEvent("onAdModuleError"); } resetSeek(); player.stopVideo(); player.showWatermark(); videoNode.setStartSeconds(0); streamStartSeconds = 0; videoNode = null; seekAllowed = false; } function rewind() { resetSeek(); seekTo(0); } function seekForward() { seekTo(getCurrentTime() + SEEK_TIME); } function seekBack() { seekTo(getCurrentTime() - SEEK_TIME); } function seekTo(time) { if (!videoNode) { return(undefined); } if (getDuration() > 0) { time = Math.min(time, getDuration() - SEEK_END_OFFSET); } time = Math.max(time, 0); if (Math.abs(time - getCurrentTime()) <= SEEK_PRECISION) { return(undefined); } if (getPlayerState() == com.google.youtube.tv.model.PlayerState.PAUSED) { unpause(); } seeking = true; seekToTime = time; if (seekAllowed) { if ((!seekTimeout) && ((getPlayerState() == com.google.youtube.tv.model.PlayerState.PLAYING) || (getPlayerState() == com.google.youtube.tv.model.PlayerState.PAUSED))) { seek(); } else if (!seekTimeout) { seekTimeout = com.google.youtube.util.Scheduler.setTimeout(SEEK_GROUP_TIMEOUT, com.google.chianti.event.EventDelegate.create(this, onSeekGroupTimeout)); } else { seekTimeout.restart(); } } else { seekOnPlay = true; } com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SEEK_TO, {seekToTime:time, playerState:getPlayerState()})); } function onSeekGroupTimeout() { seekTimeout = null; seek(); } function seek() { playerTimeBeforeSeek = player.getCurrentTime(); var _local2 = ((!com.google.youtube.tv.platform.Box.isWii()) && (isOutOfBuffer(seekToTime, ALLOW_SEEK_AHEAD_TIME))) || ((seekToTime == 0) && (!com.google.youtube.tv.platform.Box.canSeekTo0())); if (_local2) { streamStartSeconds = seekToTime; } player.seekTo(seekToTime, _local2); completeSeek(); } function isOutOfBuffer(seconds, bufferOffset) { return((seconds < streamStartSeconds) || (seconds > Math.max(getCurrentTime() + bufferOffset, player.getVideoLoadedFraction() * getDuration()))); } function completeSeek() { if (seekTimeout) { seekTimeout.stop(); seekTimeout = null; onSeekGroupTimeout(); } else if (seeking) { seeking = false; } } function resetSeek() { seekToTime = _global.NaN; seekOnPlay = false; seeking = false; playerTimeBeforeSeek = _global.NaN; lastCurrentTime = _global.NaN; playbackFirstDetectedTime = _global.NaN; if (seekTimeout) { seekTimeout.stop(); seekTimeout = null; } } function adSkip() { player.adSkip(); } function destroy() { player.stopVideo(); player.clearVideo(); player.destroy(); player.unloadMovie(); player.removeMovieClip(); } function clearVideo() { player.clearVideo(); } function setVisible(visible) { player._visible = visible; } static var SEEK_TIME = 10; static var ALLOW_SEEK_AHEAD_TIME = 20; static var SEEK_END_OFFSET = 3; static var SEEK_PRECISION = 2; static var SEEK_GROUP_TIMEOUT = 2000; static var PLAYBACK_DETECTION_RESET_TIME = 5; static var PLAYBACK_DETECTION_TIME = 0.5; static var API_PLAYER_PATH = ((("https://youtube.googleapis.com/apiplayer?" + "version=2") + "&ps=lbl") + "&el=leanback") + "&cc_auto_caps=1"; static var DEFAULT_PLAYER_WIDTH = 320; static var DEFAULT_PLAYER_HEIGHT = 240; static var LOGO_SHIFT = 12; var ready = false; var adVideoLastTimestamp = 0; }
Symbol 20658 MovieClip [__Packages.com.google.youtube.tv.app.Environment] Frame 0
class com.google.youtube.tv.app.Environment { static var SERVLET_HOST, BASE_URL, GDATA_URL, overridenFlashVarsLoader; function Environment () { } static function init(swfUrl, opt_secure) { var _local4 = new com.google.utils.Url(swfUrl); var _local5 = _local4.getHost(); var _local6 = (opt_secure ? "https" : "http") + "://"; var _local7 = getTestHost(); if (_local7) { SERVLET_HOST = _local7; } else if (isTestHost(_local5)) { SERVLET_HOST = _local5; } else { SERVLET_HOST = "www.youtube.com"; } BASE_URL = _local6 + SERVLET_HOST; GDATA_URL = "https://gdata.youtube.com"; com.google.youtube.tv.util.StringUtil.addCommonPlaceholder("baseUrl", BASE_URL); com.google.youtube.tv.util.StringUtil.addCommonPlaceholder("gdataUrl", GDATA_URL); com.google.youtube.tv.util.StringUtil.addCommonPlaceholder("servletHost", SERVLET_HOST); com.google.youtube.tv.util.StringUtil.addCommonPlaceholder("country", com.google.youtube.tv.platform.Box.getCountry()); com.google.youtube.tv.util.StringUtil.addCommonPlaceholder("model", com.google.youtube.tv.util.StringUtil.encodeUriComponent(com.google.youtube.tv.platform.Box.getModel())); com.google.youtube.tv.util.StringUtil.addCommonPlaceholder("vendor", com.google.youtube.tv.util.StringUtil.encodeUriComponent(com.google.youtube.tv.platform.Box.getVendor())); } static function loadOverridenFlashVars() { var _local2 = com.google.youtube.tv.util.StringUtil.replacePlaceholders(OVERRIDEN_FLASHVARS_URL); if (com.google.youtube.tv.platform.Box.getFlashVar("enabled_features")) { _local2 = _local2 + ("&enabled_features=" + _global.escape(com.google.youtube.tv.platform.Box.getFlashVar("enabled_features"))); } overridenFlashVarsLoader = new LoadVars(); overridenFlashVarsLoader.onLoad = onOverridenFlashVarsLoad; overridenFlashVarsLoader.load(_local2); } static function isLoading() { return(loading); } static function getLaunchVar() { return(com.google.youtube.tv.platform.Box.getFlashVar(LAUNCH_PARAM) || "menu"); } static function getLoader() { return(com.google.youtube.tv.platform.Box.getFlashVar(LOADER_PARAM)); } static function getPackage() { return(com.google.youtube.tv.platform.Box.getFlashVar(PACKAGE_PARAM)); } static function hasPlaylistId() { var _local2 = getPlaylistId(); return(_local2.length > 0); } static function getPlaylistId() { return(com.google.youtube.tv.platform.Box.getFlashVar(PLAYLIST_PARAM)); } static function hasVideoPlusRelatedId() { var _local2 = com.google.youtube.tv.platform.Box.getFlashVar(VIDEO_PLUS_RELATED_PARAM); return((_local2 != undefined) && (_local2.length > 0)); } static function getVideoPlusRelatedId() { return(com.google.youtube.tv.platform.Box.getFlashVar(VIDEO_PLUS_RELATED_PARAM)); } static function hasVideoId() { var _local2 = com.google.youtube.tv.platform.Box.getFlashVar(VIDEO_PARAM); return((_local2 != undefined) && (_local2.length > 0)); } static function getVideoId() { return(com.google.youtube.tv.platform.Box.getFlashVar(VIDEO_PARAM)); } static function getTestHost() { var _local2 = com.google.youtube.tv.platform.Box.getFlashVar(TEST_ENVIRONMENT); var _local3 = _local2 + ".youtube.com"; return(((_local2 && (TEST_ENVIRONMENT_REGEXP.test(_local2) && (isTestHost(_local3)))) ? (_local3) : null)); } static function hasSearchVar() { var _local2 = com.google.youtube.tv.platform.Box.getFlashVar(QUERY_PARAM); return((_local2 != undefined) && (_local2.length > 0)); } static function getSearchQuery() { return(com.google.youtube.tv.platform.Box.getFlashVar(QUERY_PARAM).split("+").join(" ")); } static function getOverridenFlashVar(name) { return(overridenFlashVarsLoader[name] || (com.google.youtube.tv.platform.Box.getFlashVar(name))); } static function isTestHost(host) { var _local3 = 0; for ( ; _local3 < TEST_HOSTS.length ; _local3++) { if (TEST_HOSTS[_local3] == host) { return(true); } } return(false); } static function onOverridenFlashVarsLoad(success) { loading = false; com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.OVERRIDEN_FLASHVARS_RECEIVE)); } static var ABR_PARAM = "abr"; static var LAUNCH_PARAM = "launch"; static var PLAYLIST_PARAM = "p"; static var QUERY_PARAM = "q"; static var VIDEO_PARAM = "v"; static var VIDEO_PLUS_RELATED_PARAM = "vv"; static var SECRET_PARAM = "ea"; static var TEST_ENVIRONMENT = "testenv"; static var LOADER_PARAM = "loader"; static var PACKAGE_PARAM = "package"; static var TEST_ENVIRONMENT_REGEXP = new com.as2regexp.RegExp("^[-a-z]+$"); static var OVERRIDEN_FLASHVARS_URL = "${baseUrl}/leanbacklite?action_get_flashvars&" + "country=${country}&vendor=${vendor}&model=${model}"; static var TEST_HOSTS = ["web-release-qa.youtube.com", "web-release-oldytfe-qa.youtube.com", "web-trunk-qa.youtube.com", "web-trunk-oldytfe.qa.youtube.com"]; static var OVERRIDEN_FLASHVARS = {}; static var loading = true; }
Symbol 20659 MovieClip [__Packages.com.google.youtube.tv.tree.LoadingNode] Frame 0
class com.google.youtube.tv.tree.LoadingNode extends com.google.youtube.tv.tree.MenuNode { var messages; function LoadingNode () { super(messages.getMsg(com.google.youtube.tv.services.MessagesService.LOADING), true) messages = com.google.youtube.tv.services.MessagesService.get(); } function getChildren() { return([]); } function toString() { return(" < LoadingNode... > "); } }
Symbol 20660 MovieClip [__Packages.com.google.youtube.tv.controller.SubtitleController] Frame 0
class com.google.youtube.tv.controller.SubtitleController { static var enableRichCaptions; var videoComponent, remoteService, storage, ccLoadPolicy; function SubtitleController (video, opt_remoteService) { enableRichCaptions = com.google.youtube.tv.experiments.Experiment.EXP_RICH_CAPTIONS.isActive() && (com.google.youtube.tv.platform.Box.getGeoCountry() == "US"); if (com.google.youtube.tv.platform.Box.isWii() && (_global.parseFloat(com.google.youtube.tv.platform.Box.getFlashVar("loader")) == 6)) { enableRichCaptions = true; } videoComponent = video; remoteService = opt_remoteService; storage = com.google.youtube.tv.services.StorageService.get(); storage.registerEvent(com.google.youtube.tv.services.StorageService.STORAGE_READY, com.google.chianti.event.EventDelegate.create(this, onStorageReady)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_INIT, com.google.chianti.event.EventDelegate.create(this, updateSubtitleConfig)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.RICH_CAPTIONS_FEATURE, com.google.chianti.event.EventDelegate.create(this, onRichCaptions)); } function onRichCaptions() { enableRichCaptions = true; updateSubtitleConfig(); } function buttonToggle() { if ((videoComponent.getSubtitleMenuState() == MENU_READY) && (enableRichCaptions)) { videoComponent.toggleSubtitleMenu(); return(false); } toggleSubtitles(); return(true); } function handleKey() { return(enableRichCaptions && (videoComponent.getSubtitleMenuState() == MENU_ACTIVE)); } function onStorageReady() { ccLoadPolicy = (com.google.youtube.tv.platform.Box.isFeatureBlocked(com.google.youtube.tv.platform.Box.FEATURE_CAPTIONS) ? (com.google.youtube.players.modules.ModuleLoadPolicy.MODULE_LOAD_BY_REQUEST) : (Number(storage.getValue(com.google.youtube.tv.services.StorageService.CC_LOAD_POLICY)))); updateSubtitleConfig(); } function updateSubtitleConfig() { var _local2 = {interfaceLanguage:com.google.youtube.tv.services.MessagesService.get().getLocale(), overrideInterfaceLanguage:true, ccFontConfig:{font:com.google.youtube.tv.platform.Box.getInternationalFontName(), embedFonts:com.google.youtube.tv.platform.Box.isFontEmbedded(), richCaptions:enableRichCaptions, remoteService:remoteService}, ccLoadPolicy:ccLoadPolicy}; videoComponent.updateSubtitleConfig(_local2); } function toggleSubtitles() { ccLoadPolicy = ((ccLoadPolicy == com.google.youtube.players.modules.ModuleLoadPolicy.MODULE_LOAD_BY_REQUEST) ? (com.google.youtube.players.modules.ModuleLoadPolicy.MODULE_LOAD_ALWAYS) : (com.google.youtube.players.modules.ModuleLoadPolicy.MODULE_LOAD_BY_REQUEST)); storage.setValue(com.google.youtube.tv.services.StorageService.CC_LOAD_POLICY, ccLoadPolicy); videoComponent.toggleSubtitles(); updateSubtitleConfig(); } static var MENU_ACTIVE = "active"; static var MENU_READY = "ready"; static var MENU_UNAVAILABLE = "unavailable"; }
Symbol 20661 MovieClip [__Packages.com.google.youtube.tv.controller.ExtendedKeys] Frame 0
class com.google.youtube.tv.controller.ExtendedKeys { function ExtendedKeys () { } static var AUDIO = 16777239; static var BACK = 16777238; static var CHANNEL_UP = 16777220; static var CHANNEL_DOWN = 16777221; static var EXIT = 16777237; static var INFO = 16777235; static var INPUT = 16777243; static var MENU = 16777234; static var POWER = 16777216; static var SETUP = 16777244; static var SUBTITLE = 16777240; static var VOLUME_DOWN = 16777218; static var VOLUME_MUTE = 16777219; static var VOLUME_UP = 16777217; static var BLUE = 16777250; static var GREEN = 16777248; static var YELLOW = 16777249; static var RED = 16777247; static var DVR = 16777241; static var GUIDE = 16777236; static var HELP = 16777245; static var LAST = 16777233; static var LIVE = 16777232; static var MASTER_SHELL = 16777246; static var RECORD = 16777222; static var SEARCH = 16777473; static var VOD = 16777242; static var FAST_FORWARD = 16777226; static var NEXT = 16777230; static var PAUSE = 16777224; static var PLAY = 16777223; static var PREVIOUS = 16777231; static var REWIND = 16777227; static var SKIP_FORWARD = 16777228; static var SKIP_BACKWARD = 16777229; static var STOP = 16777225; static var RESET = 33558528; static var LANGUAGE_SWITCH = 33558529; static var S = 83; }
Symbol 20662 MovieClip [__Packages.com.google.youtube.tv.remotes.partner.VirginMediaRemoteController] Frame 0
class com.google.youtube.tv.remotes.partner.VirginMediaRemoteController extends com.google.youtube.tv.remotes.DefaultRemoteController { function VirginMediaRemoteController () { super(); } function processKey(keyCode) { switch (keyCode) { case com.google.youtube.tv.controller.ExtendedKeys.SKIP_FORWARD : return(com.google.youtube.tv.controller.ExtendedKeys.NEXT); case com.google.youtube.tv.controller.ExtendedKeys.SKIP_BACKWARD : return(com.google.youtube.tv.controller.ExtendedKeys.PREVIOUS); } return(super.processKey(keyCode)); } }
Symbol 20663 MovieClip [__Packages.com.google.youtube.tv.tree.ChannelNode] Frame 0
class com.google.youtube.tv.tree.ChannelNode extends com.google.youtube.tv.tree.GDataNode { var customFields, root, prefetchedData, generation, subscribe, children, about, getTitle, overview, addItem, uploads, playlists; function ChannelNode (data) { super(data.username, com.google.youtube.tv.util.StringUtil.replacePlaceholders(INFO_URL, {channelId:data.user_id}), false, data) data.thumbnail = com.google.youtube.tv.app.Config.adjustThumbQuality(data.thumbnail); customFields = INFO_FIELDS; root = com.google.youtube.tv.tree.ContentTree.getRoot(); } function parse(src) { var _local3 = new XML(); _local3.ignoreWhite = true; _local3.parseXML(src); var _local4 = com.google.youtube.tv.util.Xtract.getComplexValues(_local3, INFO_XTRACTOR)[0]; for (var p in _local4) { prefetchedData[p] = _local4[p]; } generation++; updateSubscription(); } function getChildren() { if (!subscribe) { createChildren(); } return(children); } function createChildren() { subscribe = new com.google.youtube.tv.tree.VerbNode("", "", com.google.youtube.tv.wiring.AppEvent.ACTION_TOGGLE_SUBSCRIPTION, {treeNode:this}); updateSubscription(); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.SUBSCRIPTIONS_CHANGE, com.google.chianti.event.EventDelegate.create(this, updateSubscription)); about = new com.google.youtube.tv.tree.VerbNode(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.ABOUT), getTitle(), com.google.youtube.tv.wiring.AppEvent.ACTION_ABOUT_CHANNEL, {treeNode:this}); about.thumbnailUrl = com.google.youtube.tv.app.Config.adjustThumbQuality(getThumbnailUrl(), com.google.youtube.tv.app.Config.CHANNEL_QUALITY_LOW); if (hasUploads()) { overview = new com.google.youtube.tv.tree.ChannelOverviewNode(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.OVERVIEW), com.google.youtube.tv.util.StringUtil.replacePlaceholders(FIRST_UPLOAD_URL_TEMPLATE, {user_id:getUserId()}), false, [subscribe, about]); } else { overview = new com.google.youtube.tv.tree.TreeNode(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.OVERVIEW)); overview.addItems([subscribe, about]); } addItem(overview); if (hasUploads()) { uploads = new com.google.youtube.tv.tree.PlaylistFeedNode(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.UPLOADS_CHANNEL), com.google.youtube.tv.util.StringUtil.replacePlaceholders(UPLOADS_URL_TEMPLATE, {user_id:getUserId()}), false, null, true); uploads.setType(com.google.youtube.tv.tree.PlaylistFeedNode.TYPE_UPLOADS); addItem(uploads); } playlists = new com.google.youtube.tv.tree.UserPlaylistsFeedNode(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.PLAYLISTS), com.google.youtube.tv.util.StringUtil.replacePlaceholders(CHANNEL_URL, {channelId:getUserId()}), false, prefetchedData, true); playlists.setMenuCapturing(true); addItem(playlists); } function removeEmptyNode(node) { if ((node == playlists) && (playlists.getChildrenCount() == 0)) { playlists.addItem(new com.google.youtube.tv.tree.TreeNode(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.NO_CHANNEL_PLAYLISTS))); playlists.update(); } else { super.removeEmptyNode(node); } } function hasUploads() { return(getUserId() != MUSIC_CHANNEL_ID); } function updateSubscription() { var _local2 = root.getUserSubscriptionsNode().getSubscription(getUserId()); subscribe.setTitle((_local2 ? (com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.SUBSCRIBED)) : (com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.SUBSCRIBE)))); subscribe.iconId = (_local2 ? "subscribedLargeIcon" : "subscribeLargeIcon"); subscribe.subtitle = ((getSubscriberCount() > 0) ? (com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.CHANNEL_INFO_SUBSCRIBERS, {NUMSUBSCRIBERS_1:com.google.youtube.tv.util.StringUtil.formatNumberString(getSubscriberCount())})) : ""); subscribe.generation++; if (overview.isLoaded()) { overview.update(); } } function requiresAutoLoad() { return(getSubscriberCount() == 0); } function getThumbnailUrl() { return(prefetchedData.thumbnail); } function getUserId() { return(prefetchedData.user_id); } function getVideosCount() { return(Number(prefetchedData.video_count) || 0); } function getTotalUploadViews() { return(Number(prefetchedData.total_upload_views) || 0); } function getSubscriberCount() { return(Number(prefetchedData.subscriber_count) || 0); } function getSubscriptionId() { return(prefetchedData.subscriptionId); } function getSummary() { return(prefetchedData.summary); } static var FIRST_UPLOAD_URL_TEMPLATE = "${gdataUrl}/feeds/api/users/${user_id}/uploads?max-results=1"; static var UPLOADS_URL_TEMPLATE = "${gdataUrl}/feeds/api/users/${user_id}/uploads"; static var CHANNEL_URL = "${gdataUrl}/feeds/api/users/${channelId}/playlists"; static var INFO_URL = "${gdataUrl}/feeds/api/users/${channelId}"; static var INFO_XTRACTOR = ("/entry(summary," + "yt:statistics/@subscriberCount as subscriber_count,") + "yt:statistics/@totalUploadViews as total_upload_views)"; static var INFO_FIELDS = "summary,yt:statistics"; static var MUSIC_CHANNEL_ID = "UC-9-kyTW8ZkZNDHQJ6FgpwQ"; }
Symbol 20664 MovieClip [__Packages.com.google.youtube.tv.wiring.AppEvent] Frame 0
class com.google.youtube.tv.wiring.AppEvent { var type, query, playlist; function AppEvent (type, options) { this.type = type; for (var key in options) { this[key] = options[key]; } if (!(type === SEARCH_COMPLETE)) { } else { query = options.query; playlist = options.playlist; } } function toString() { return((" < AppEvent type:" + type) + " > "); } static var ACTION_ABOUT_CHANNEL = "ACTION_ABOUT_CHANNEL"; static var ACTION_AD_SKIP = "ACTION_AD_SKIP"; static var ACTION_ADD_TO_PLAYLIST = "ACTION_ADD_TO_PLAYLIST"; static var ACTION_OPEN_PIVOT = "ACTION_OPEN_PIVOT"; static var ACTION_SEEK_TO = "ACTION_SEEK_TO"; static var ACTION_SIGN_IN = "ACTION_SIGN_IN"; static var ACTION_SIGNED_IN = "ACTION_SIGNED_IN"; static var ACTION_SIGN_OUT = "ACTION_SIGN_OUT"; static var ACTION_SIGN_OUT_INVITATION = "ACTION_SIGN_OUT_INVITATION"; static var ACTION_SEARCH = "ACTION_SEARCH"; static var ACTION_TOGGLE_SUBSCRIPTION = "ACTION_TOGGLE_SUBSCRIPTION"; static var ACTION_WATCH_PLAYLIST = "ACTION_WATCH_PLAYLIST"; static var ACTION_NEXT_VIDEO = "ACTION_NEXT_VIDEO"; static var ACTION_PREV_VIDEO = "ACTION_PREV_VIDEO"; static var ACTION_SHOW_INFO = "ACTION_SHOW_INFO"; static var ACTION_SHOW_GUIDE = "ACTION_SHOW_GUIDE"; static var ACTION_SHOW_TRAY = "ACTION_SHOW_TRAY"; static var ACTION_FLAG_VIDEO = "ACTION_FLAG_VIDEO"; static var ACTION_PAIR = "ACTION_PAIR"; static var ACTION_IMPROVE_YOUTUBE = "ACTION_IMPROVE_YOUTUBE"; static var ACTION_CLEAR_COOKIES = "ACTION_CLEAR_COOKIES"; static var ACTION_EXIT_ON_BACK = "ACTION_EXIT_ON_BACK"; static var ACTION_REMOTE_PLAYER_CONTROL = "ACTION_REMOTE_PLAYER_CONTROL"; static var SEARCH_COMPLETE = "SEARCH_COMPLETE"; static var VIDEO_PLAYER_INIT = "VIDEO_PLAYER_INIT"; static var VIDEO_PLAYER_READY = "VIDEO_PLAYER_READY"; static var VIDEO_PLAYER_PROGRESS = "VIDEO_PLAYER_PROGRESS"; static var VIDEO_PLAYER_STATE_CHANGE = "VIDEO_PLAYER_STATE_CHANGE"; static var VIDEO_PLAYER_ERROR = "VIDEO_PLAYER_ERROR"; static var VIDEO_PLAYER_CLICK = "VIDEO_PLAYER_CLICK"; static var CONTENT_LOADED = "CONTENT_LOADED"; static var CONTENT_ERROR = "CONTENT_ERROR"; static var SWITCHED_TO_COMPONENT = "SWITCHED_TO_COMPONENT"; static var OVERRIDEN_FLASHVARS_RECEIVE = "OVERRIDEN_FLASHVARS_RECEIVE"; static var MOUSE_WHEEL = "MOUSE_WHEEL"; static var MOUSE_ON = "MOUSE_ON"; static var SUBSCRIPTIONS_CHANGE = "SUBSCRIPTIONS_CHANGE"; static var TOGGLE_PAUSE = "TOGGLE_PAUSE"; static var BRANDING_OPTIONS_READY = "BRANDING_OPTIONS_READY"; static var SUBTITLES_EVENT = "SUBTITLES_EVENT"; static var SUBTITLES_SCREEN_UPDATE = "SUBTITLES_SCREEN_UPDATE"; static var FLAG_FLIP = "FLAG_FLIP"; static var SHOW_DEBUG_INFO = "SHOW_DEBUG_INFO"; static var LGUPLUS_FEATURE = "LGUPLUS_FEATURE"; static var RICH_CAPTIONS_FEATURE = "RICH_CAPTIONS_FEATURE"; }
Symbol 20665 MovieClip [__Packages.com.google.youtube.event.DataEvent] Frame 0
class com.google.youtube.event.DataEvent { function DataEvent () { } static var DATA_EXHAUSTED = "onDataExhausted"; static var ERROR = "onError"; static var INITIALIZED = "onInitialized``"; static var LOAD = "onLoad"; static var SET = "onSet"; }
Symbol 20666 MovieClip [__Packages.com.google.youtube.tv.util.Sha1] Frame 0
class com.google.youtube.tv.util.Sha1 { var chain, buf, W, pad, inbuf, total; function Sha1 () { chain = new Array(5); buf = new Array(64); W = new Array(80); pad = new Array(64); pad[0] = 128; var _local2 = 1; for ( ; _local2 < 64 ; _local2++) { pad[_local2] = 0; } reset(); } function reset() { chain[0] = 1732584193 /* 0x67452301 */; chain[1] = -271733879; chain[2] = -1732584194; chain[3] = 271733878 /* 0x10325476 */; chain[4] = -1009589776; inbuf = 0; total = 0; } function rotl(w, r) { return(((w << r) | (w >>> (32 - r))) & -1); } function compress(buf) { var _local3 = 0; for ( ; _local3 < 64 ; _local3 = _local3 + 4) { var _local4 = (((buf[_local3] << 24) | (buf[_local3 + 1] << 16)) | (buf[_local3 + 2] << 8)) | buf[_local3 + 3]; W[_local3 / 4] = _local4; } var _local5 = 16; for ( ; _local5 < 80 ; _local5++) { W[_local5] = rotl(((W[_local5 - 3] ^ W[_local5 - 8]) ^ W[_local5 - 14]) ^ W[_local5 - 16], 1); } var _local6 = chain[0]; var _local7 = chain[1]; var _local8 = chain[2]; var _local9 = chain[3]; var _local10 = chain[4]; var _local13 = 0; for ( ; _local13 < 80 ; _local13++) { if (_local13 < 40) { if (_local13 < 20) { var _local11 = _local9 ^ (_local7 & (_local8 ^ _local9)); var _local12 = 1518500249 /* 0x5A827999 */; } else { var _local11 = (_local7 ^ _local8) ^ _local9; var _local12 = 1859775393 /* 0x6ED9EBA1 */; } } else if (_local13 < 60) { var _local11 = (_local7 & _local8) | (_local9 & (_local7 | _local8)); var _local12 = -1894007588; } else { var _local11 = (_local7 ^ _local8) ^ _local9; var _local12 = -899497514; } var _local14 = ((((rotl(_local6, 5) + _local11) + _local10) + _local12) + W[_local13]) & -1; _local10 = _local9; _local9 = _local8; _local8 = rotl(_local7, 30); _local7 = _local6; _local6 = _local14; } chain[0] = (chain[0] + _local6) & -1; chain[1] = (chain[1] + _local7) & -1; chain[2] = (chain[2] + _local8) & -1; chain[3] = (chain[3] + _local9) & -1; chain[4] = (chain[4] + _local10) & -1; } function update(bytes, opt_length) { if (!opt_length) { opt_length = bytes.length; } var _local4 = 0; if (inbuf == 0) { while ((_local4 + 64) < opt_length) { compress(bytes.slice(_local4, _local4 + 64)); _local4 = _local4 + 64; total = total + 64; } } while (_local4 < opt_length) { buf[inbuf++] = bytes[_local4++]; total++; if (inbuf == 64) { inbuf = 0; compress(buf); while ((_local4 + 64) < opt_length) { compress(bytes.slice(_local4, _local4 + 64)); _local4 = _local4 + 64; total = total + 64; } } } } function digest() { var _local2 = new Array(20); var _local3 = total * 8; if (inbuf < 56) { update(pad, 56 - inbuf); } else { update(pad, 64 - (inbuf - 56)); } var _local4 = 63; for ( ; _local4 >= 56 ; _local4--) { buf[_local4] = _local3 & 255; _local3 = _local3 >>> 8; } compress(buf); var _local5 = 0; var _local6 = 0; for ( ; _local6 < 5 ; _local6++) { var _local7 = 24; for ( ; _local7 >= 0 ; _local7 = _local7 - 8) { _local2[_local5++] = (chain[_local6] >> _local7) & 255; } } return(_local2); } }
Symbol 20667 MovieClip [__Packages.com.google.youtube.tv.tree.UserSubscriptionsNode] Frame 0
class com.google.youtube.tv.tree.UserSubscriptionsNode extends com.google.youtube.tv.tree.GDataNode { var menuCapturing, xtractor, cobj, addItem, userSubscriptionsChannel, getChildrenCount, addItemAt, children, update, removeItem, needsRefresh; function UserSubscriptionsNode (title) { super(title, com.google.youtube.tv.util.StringUtil.replacePlaceholders(URL_TEMPLATE, {fields:FIELDS}), true); menuCapturing = true; xtractor = XTRACTOR; } function createChildren() { var _local2 = 0; for ( ; _local2 < cobj.length ; _local2++) { var _local3 = cobj[_local2]; for ( ; (!_local3.user_id) || ((!_local3.thumbnail) || (com.google.youtube.tv.app.Config.CHANNEL_BLACKLIST[_local3.user_id])) ; _local2++) { } addItem(createChild(_local3)); } if ((!userSubscriptionsChannel) && (getChildrenCount())) { userSubscriptionsChannel = new com.google.youtube.tv.tree.PlaylistFeedNode(com.google.youtube.tv.services.MessagesService.getMsg(com.google.youtube.tv.services.MessagesService.SUBSCRIPTIONS_CHANNEL), com.google.youtube.tv.util.StringUtil.replacePlaceholders(FEED_SUBSCRIPTION_URL_TEMPLATE), false, null, true); userSubscriptionsChannel.setTrackingType(com.google.youtube.tv.tree.TreeNode.TRACKING_TYPE_SUBTIVITY); addItemAt(userSubscriptionsChannel, 0); } com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.SUBSCRIPTIONS_CHANGE)); } function createChild(channel) { channel.subscriptionId = channel.self.split("/").pop().split("?")[0]; return(new com.google.youtube.tv.tree.ChannelNode(channel)); } function clear(opt_unlinkChildren) { super.clear(opt_unlinkChildren); userSubscriptionsChannel = null; } function getSubscription(uploaderId) { var _local3 = 0; for ( ; (_local3 < children.length) || 0 ; _local3++) { var _local4 = com.google.youtube.tv.tree.ChannelNode(children[_local3]); if (_local4 && (_local4.getUserId() == uploaderId)) { return(_local4); } } return(null); } function addSubscription(xmlString) { var _local3 = new XML(); _local3.ignoreWhite = true; _local3.parseXML(xmlString); var _local4 = com.google.youtube.tv.util.Xtract.getComplexValues(_local3, SINGLE_ENTRY_XTRACTOR)[0]; if (_local4) { addItemAt(createChild(_local4), 1); update(); } if (userSubscriptionsChannel) { userSubscriptionsChannel.setNeedsRefresh(true); } com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.SUBSCRIPTIONS_CHANGE)); } function removeSubscription(subscriptionId) { var _local3 = false; var _local4 = 0; for ( ; (_local4 < children.length) || 0 ; _local4++) { var _local5 = com.google.youtube.tv.tree.ChannelNode(children[_local4]); if (_local5.getSubscriptionId() == subscriptionId) { removeItem(_local5); _local3 = true; break; } } if (!_local3) { needsRefresh = true; } else { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.SUBSCRIPTIONS_CHANGE)); } if (userSubscriptionsChannel) { userSubscriptionsChannel.setNeedsRefresh(true); } } function toString() { return("UserSubscriptionsNode getChildrenCount " + getChildrenCount()); } static var URL_TEMPLATE = "${gdataUrl}/feeds/api/users/default/subscriptions?fields=${fields}"; static var FIELDS = "openSearch:*,entry(yt:username," + "yt:channelId,yt:countHint,media:thumbnail,link[@rel=\"self\"])"; static var XTRACTOR_PROPERTIES = ((("(yt:username/@display as username," + "yt:channelId as user_id,") + "yt:countHint as video_count,") + "link[@rel=\"self\"]/@href as self,") + "media:thumbnail/@url as thumbnail)"; static var XTRACTOR = "/feed/entry[*]" + XTRACTOR_PROPERTIES; static var SINGLE_ENTRY_XTRACTOR = "/entry" + XTRACTOR_PROPERTIES; static var CHANNEL_URL_TEMPLATE = "${gdataUrl}/feeds/api/users/${channel}/playlists"; static var FEED_SUBSCRIPTION_URL_TEMPLATE = "${gdataUrl}/feeds/api/users/default/newsubscriptionvideos"; }
Symbol 20668 MovieClip [__Packages.com.google.youtube.players.modules.ModuleLoadPolicy] Frame 0
class com.google.youtube.players.modules.ModuleLoadPolicy { function ModuleLoadPolicy () { } static var MODULE_LOAD_ALWAYS = 1; static var MODULE_LOAD_BY_PREFERENCE = 2; static var MODULE_LOAD_BY_REQUEST = 3; static var MODULE_LOAD_INTRINSIC = 4; }
Symbol 20669 MovieClip [__Packages.com.google.youtube.tv.ads.AdsService] Frame 0
class com.google.youtube.tv.ads.AdsService { static var instance; var adState, adInfo, adProgress; function AdsService () { adState = new com.google.youtube.tv.wiring.ValueStream("adState"); adInfo = new com.google.youtube.tv.wiring.ValueStream("adInfo"); adProgress = new com.google.youtube.tv.wiring.ValueStream("adProgress"); } static function getInstance() { if (!instance) { instance = new com.google.youtube.tv.ads.AdsService(); } return(instance); } function isAdActive() { return(adState.getValue() == AD_STATE_PLAY); } function canSkipAd() { return(adInfo.getValue()[AD_SKIPPABLE] && (adProgress.getValue()[CAN_SKIP_IN] == 0)); } function updateAdInfo(data) { if (data.title) { var _local3 = {}; _local3[AD_TITLE] = data.title; _local3[AD_DESCRIPTION] = data.description || ""; _local3[AD_AUTHOR] = data.author || ""; _local3[AD_SKIPPABLE] = data.skippable == "1"; _local3[AD_DURATION] = data.duration; _local3[AD_DURATION_MIN] = com.google.youtube.tv.util.DateUtil.formatDurationInSeconds(int(data.duration)); adInfo.setValue(_local3); adInfo.propagate(adInfo.getValue()); } } function updateAdProgress(data) { if (data.time && (data.duration)) { var _local3 = {}; _local3[AD_CURRENT_TIME] = data.time; _local3[AD_DURATION] = data.duration; _local3[AD_PERCENT_LOADED] = 100; _local3[AD_TIME_LEFT] = int(data.duration - data.time); _local3[AD_DURATION_MIN] = com.google.youtube.tv.util.DateUtil.formatDurationInSeconds(int(data.duration)); _local3.AD_TIMING_MIN = _local3[AD_DURATION_MIN]; if (adInfo.getValue()[AD_SKIPPABLE]) { _local3[CAN_SKIP_IN] = Math.max(0, CAN_SKIP_IN_TIMEOUT - int(data.time)); } adProgress.setValue(_local3); adProgress.propagate(adProgress.getValue()); } } function updateAdState(state) { adState.setValue(state); adState.propagate(adState.getValue()); } function processAdEvent(type, opt_event) { var _local4 = opt_event || ({}); switch (type) { case com.google.youtube.event.ModuleEvent.AD_LOADED : processAdLoadEvent(_local4); break; case com.google.youtube.event.ModuleEvent.AD_PLAYED : processAdPlayEvent(_local4); break; case com.google.youtube.event.ModuleEvent.AD_PROGRESS : processAdProgressEvent(_local4); break; case com.google.youtube.event.ModuleEvent.AD_COMPLETE : processAdCompleteEvent(_local4); break; case com.google.youtube.event.ModuleEvent.AD_ERROR : processAdErrorEvent(_local4); } } function processAdLoadEvent(event) { updateAdState(AD_STATE_LOAD); updateAdInfo(event); updateAdProgress(event); } function processAdPlayEvent(event) { updateAdState(AD_STATE_PLAY); updateAdInfo(event); updateAdProgress(event); } function processAdProgressEvent(event) { updateAdProgress(event); } function processAdCompleteEvent(event) { updateAdState(AD_STATE_COMPLETE); updateAdInfo({}); updateAdProgress({}); } function processAdErrorEvent(event) { updateAdState(AD_STATE_ERROR); updateAdInfo({}); updateAdProgress({}); } function toString() { return(("<AdsService adState: " + adState.getValue()) + " />"); } static var AD_STATE_LOAD = "AD_STATE_LOAD"; static var AD_STATE_PLAY = "AD_STATE_PLAY"; static var AD_STATE_COMPLETE = "AD_STATE_COMPLETE"; static var AD_STATE_ERROR = "AD_STATE_ERROR"; static var AD_CURRENT_TIME = "AD_CURRENT_TIME"; static var AD_DURATION = "AD_DURATION"; static var AD_DURATION_MIN = "AD_DURATION_MIN"; static var AD_PERCENT_LOADED = "AD_PERCENT_LOADED"; static var AD_TIME_LEFT = "AD_TIME_LEFT"; static var CAN_SKIP_IN = "CAN_SKIP_IN"; static var AD_TITLE = "AD_TITLE"; static var AD_DESCRIPTION = "AD_DESCRIPTION"; static var AD_AUTHOR = "AD_AUTHOR"; static var AD_SKIPPABLE = "AD_SKIPPABLE"; static var CAN_SKIP_IN_TIMEOUT = 5; }
Symbol 20670 MovieClip [__Packages.com.google.youtube.tv.components.VideoComponent] Frame 0
class com.google.youtube.tv.components.VideoComponent extends com.google.youtube.tv.components.BaseComponent { var playlistLocation, player, clip, playerOverlay, subtitleController, broadcast, previousPlaybackRestriction; function VideoComponent (parent, playlistLocation) { super(parent, "videoComp"); this.playlistLocation = playlistLocation; player = new com.google.youtube.tv.controller.ChromelessHost(clip); playerOverlay = clip.createEmptyMovieClip("playerOverlay", clip.getNextHighestDepth()); com.google.youtube.tv.ui.View.disableFocusRect(playerOverlay); com.google.youtube.tv.util.DrawUtil.drawRectangle(playerOverlay, 0, 0, Stage.width, Stage.height, 0, 0, 0, 65280, 100, 0); playerOverlay._alpha = 0; playerOverlay.useHandCursor = false; playerOverlay.onRelease = com.google.chianti.event.EventDelegate.create(this, onMouseClick); this.playlistLocation = playlistLocation; playlistLocation.vmap(com.google.chianti.event.EventDelegate.create(this, onLocationChanged)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.SWITCHED_TO_COMPONENT, com.google.chianti.event.EventDelegate.create(this, onSwitchedToComponent)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_READY, com.google.chianti.event.EventDelegate.create(this, onPlayerReady)); } function getPlaybackRestriction() { return(undefined); } function init() { player.init(); } function getCurrentVideo() { return(player.getVideoNode()); } function isPlaying() { return(player.isPlaying()); } function getCurrentTime() { return(player.getCurrentTime()); } function pause() { if (player.pause()) { com.google.youtube.tv.platform.Box.setMouseOffTime(MOUSE_ALWAYS_ON_TIME); } } function unpause() { if (player.unpause()) { com.google.youtube.tv.platform.Box.setMouseOffTime(MOUSE_OFF_TIME); } } function stop() { if (player.getVideoNode()) { com.google.youtube.tv.platform.Box.setMouseOffTime(MOUSE_ALWAYS_ON_TIME); player.stop(); player.clearVideo(); } } function rewind() { if (player.getVideoNode()) { com.google.youtube.tv.platform.Box.setMouseOffTime(MOUSE_OFF_TIME); player.rewind(); } } function seekTo(time) { player.seekTo(time); } function seekForward() { player.seekForward(); } function seekBack() { player.seekBack(); } function toggleSubtitles() { player.player.toggleSubtitles(); } function toggleSubtitleMenu() { player.player.toggleSubtitleMenu(); } function getSubtitleMenuState() { return(player.player.getSubtitleMenuState()); } function handleNavigationKey(keyCode) { if (subtitleController.handleKey()) { return(true); } super.handleNavigationKey(keyCode); } function updateSubtitleConfig(config) { player.player.updateSubtitleConfig(config); } function onMouseClick() { broadcast({type:MOUSE_CLICK}); } function playNode(videoNode) { if (videoNode == player.getVideoNode()) { return(undefined); } stop(); if (playlistLocation.getNode() != com.google.youtube.tv.tree.ContentTree.getRoot().getWatchHistoryNode()) { com.google.youtube.tv.tree.ContentTree.getRoot().getWatchHistoryNode().setNeedsRefresh(true); } com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_PROGRESS, {duration:0, loaded:0, currentTime:0})); player.play(videoNode); unpause(); } function onSwitchedToComponent() { var _local2 = com.google.youtube.tv.controller.Switcher.getSwitcher().getTos().getPlaybackRestriction(); if (previousPlaybackRestriction == com.google.youtube.tv.components.BaseComponent.PAUSE_PLAYBACK) { unpause(); } if (_local2 == com.google.youtube.tv.components.BaseComponent.PAUSE_PLAYBACK) { pause(); } else if (_local2 == com.google.youtube.tv.components.BaseComponent.STOP_PLAYBACK) { stop(); } previousPlaybackRestriction = _local2; } function onPlayerReady() { if (locationUpdatePending) { locationUpdatePending = false; onLocationChanged(playlistLocation); } } function onLocationChanged(location) { if (!player.isPlayerReady()) { locationUpdatePending = true; return(undefined); } var _local3 = com.google.youtube.tv.controller.Switcher.getSwitcher().getTos(); if (_local3.getPlaybackRestriction() == com.google.youtube.tv.components.BaseComponent.PAUSE_PLAYBACK) { pause(); return(undefined); } if (_local3.getPlaybackRestriction() == com.google.youtube.tv.components.BaseComponent.STOP_PLAYBACK) { stop(); return(undefined); } if (location.getValue() instanceof com.google.youtube.tv.tree.VideoNode) { playNode(com.google.youtube.tv.tree.VideoNode(location.getValue())); } if ((location.getNode().getChildrenCount() - location.getIndex()) <= com.google.youtube.tv.app.Config.GDATA_NUM_RESULTS_PER_PAGE) { location.getNode().loadMore(); } } static var MOUSE_CLICK = "MOUSE_CLICK"; static var MOUSE_OFF_TIME = 3; static var MOUSE_ALWAYS_ON_TIME = ((60 * 60) * 24) * 7; var locationUpdatePending = false; }
Symbol 20671 MovieClip [__Packages.com.google.third_party.json.JSON] Frame 0
class com.google.third_party.json.JSON { function JSON () { } static function stringify(arg) { var _local6 = ""; switch (typeof(arg)) { case "object" : if (arg) { if (arg instanceof Array) { var _local4 = 0; for ( ; _local4 < arg.length ; _local4++) { var _local7 = stringify(arg[_local4]); if (_local6) { _local6 = _local6 + ","; } _local6 = _local6 + _local7; } return(("[" + _local6) + "]"); } if (typeof(arg.toString) != "undefined") { for (var _local4 in arg) { var _local7 = arg[_local4]; if ((typeof(_local7) != "undefined") && (typeof(_local7) != "function")) { _local7 = stringify(_local7); if (_local6) { _local6 = _local6 + ","; } _local6 = _local6 + ((stringify(_local4) + ":") + _local7); } } return(("{" + _local6) + "}"); } } return("null"); case "number" : return((_global.isFinite(arg) ? (String(arg)) : "null")); case "string" : var _local5 = arg.length; _local6 = "\""; var _local4 = 0; for ( ; _local4 < _local5 ; _local4 = _local4 + 1) { var _local3 = arg.charAt(_local4); if (_local3.charCodeAt() >= 128) { var _local8 = _local3.charCodeAt().toString(16); var _local7 = "\\u"; var _local9 = _local8.length; for ( ; _local9 < 4 ; _local9++) { _local7 = _local7 + "0"; } _local7 = _local7 + _local8; _local6 = _local6 + _local7; } else if (_local3 >= " ") { if ((_local3 == "\\") || (_local3 == "\"")) { _local6 = _local6 + "\\"; } _local6 = _local6 + _local3; } else { switch (_local3) { case "\b" : _local6 = _local6 + "\\b"; break; case "\f" : _local6 = _local6 + "\\f"; break; case newline : _local6 = _local6 + "\\n"; break; case "\r" : _local6 = _local6 + "\\r"; break; case "\t" : _local6 = _local6 + "\\t"; break; default : _local3 = _local3.charCodeAt(); _local6 = _local6 + (("\\u00" + Math.floor(_local3 / 16).toString(16)) + (_local3 % 16).toString(16)); } } } return(_local6 + "\""); case "boolean" : return(String(arg)); } return("null"); } static function parse(text) { var at = 0; var ch = " "; var _value; var _error = function (m) { throw {name:"JSONError", message:m, at:at - 1, text:text}; }; var _next = function () { ch = text.charAt(at); at = at + 1; return(ch); }; var _white = function () { while (ch) { if (ch <= " ") { _next(); } else if (ch == "/") { switch (_next()) { case "/" : while (_next() && ((ch != newline) && (ch != "\r"))) { } break; case "*" : _next(); for(;;){ if (ch) { if (ch == "*") { if (_next() == "/") { _next(); // unexpected jump } } else { _next(); } } else { _error("Unterminated comment"); } }; break; default : _error("Syntax error"); } } else { break; } } }; var _string = function () { var _local3 = ""; var _local6 = false; if (ch == "\"") { while (_next()) { if (ch == "\"") { _next(); return(_local3); } if (ch == "\\") { switch (_next()) { case "b" : _local3 = _local3 + "\b"; break; case "f" : _local3 = _local3 + "\f"; break; case "n" : _local3 = _local3 + newline; break; case "r" : _local3 = _local3 + "\r"; break; case "t" : _local3 = _local3 + "\t"; break; case "u" : var _local5 = 0; var _local2 = 0; for ( ; _local2 < 4 ; _local2 = _local2 + 1) { var _local4 = _global.parseInt(_next(), 16); if (!_global.isFinite(_local4)) { _local6 = true; break; } _local5 = (_local5 * 16) + _local4; } if (_local6) { _local6 = false; break; } _local3 = _local3 + String.fromCharCode(_local5); break; default : _local3 = _local3 + ch; } } else { _local3 = _local3 + ch; } } } _error("Bad string"); }; var _array = function () { var _local2 = []; if (ch == "[") { _next(); _white(); if (ch == "]") { _next(); return(_local2); } while (ch) { _white(); if (ch == ",") { _local2.push(undefined); } else { _local2.push(_value()); _white(); } if (ch == "]") { _next(); return(_local2); } if (ch != ",") { break; } _next(); _white(); } } _error("Bad array"); }; var _object = function () { var _local3 = {}; if (ch == "{") { _next(); _white(); if (ch == "}") { _next(); return(_local3); } while (ch) { var _local2 = _string(); _white(); if (ch != ":") { break; } _next(); _local3[_local2] = _value(); _white(); if (ch == "}") { _next(); return(_local3); } if (ch != ",") { break; } _next(); _white(); } } _error("Bad object"); }; var _number = function () { var _local2 = ""; if (ch == "-") { _local2 = "-"; _next(); } while ((ch >= "0") && (ch <= "9")) { _local2 = _local2 + ch; _next(); } if (ch == ".") { _local2 = _local2 + "."; while (_next() && ((ch >= "0") && (ch <= "9"))) { _local2 = _local2 + ch; } } var _local3 = 1 * _local2; if (!_global.isFinite(_local3)) { _error("Bad number"); } else { return(_local3); } }; var _word = function () { switch (ch) { case "t" : if ((_next() == "r") && ((_next() == "u") && (_next() == "e"))) { _next(); return(true); } break; case "f" : if ((_next() == "a") && ((_next() == "l") && ((_next() == "s") && (_next() == "e")))) { _next(); return(false); } break; case "n" : if (!((_next() == "u") && ((_next() == "l") && (_next() == "l")))) { break; } _next(); return(null); } _error("Syntax error"); }; _value = function () { _white(); switch (ch) { case "{" : return(_object()); case "[" : return(_array()); case "\"" : return(_string()); case "-" : return(_number()); } return((((ch >= "0") && (ch <= "9")) ? (_number()) : (_word()))); }; return(_value()); } static function stripQuotes(arg) { if ((arg.length > 2) && ((arg.charAt(0) == "\"") && (arg.charAt(arg.length - 1) == "\""))) { return(arg.substr(1, arg.length - 2)); } return(arg); } }
Symbol 20672 MovieClip [__Packages.com.adobe.serialization.json.JSON] Frame 0
class com.adobe.serialization.json.JSON { function JSON () { } static function encode(o) { var _local3 = new com.adobe.serialization.json.JSONEncoder(o); return(_local3.getString()); } static function decode(s) { var _local3 = new com.adobe.serialization.json.JSONDecoder(s); return(_local3.getValue()); } }
Symbol 20673 MovieClip [__Packages.com.google.youtube.tv.LBLv3] Frame 0
class com.google.youtube.tv.LBLv3 { var container, storageService, statsLogger, experimentsService, experimentsReadyDelegate, messages, messagesReadyDelegate, preloader, signIn, signInService, signInReadyDelegate, strongAuthService, strongAuthReadyDelegate, root, playlistLocation, video, adInfo, background, guide, switcher, nextVideoDelegate, nextVideoFromStateChangeDelegate, brandingController, subtitleController, improveYouTubeController, clearCookiesController, addToPlaylist, pair, search, tray, flagging, videoInfo, pivot, transport, channelInfo, nextVideoFromStateChangeScheduler; function LBLv3 (container) { if (!com.google.youtube.tv.platform.Box.hasAutoPlay()) { playerReady = true; } this.container = container; storageService = com.google.youtube.tv.services.StorageService.get(container._parent.sharedObject); com.google.youtube.tv.app.Environment.init(container._url); com.google.youtube.tv.app.Environment.loadOverridenFlashVars(); statsLogger = com.google.youtube.tv.services.StatsLoggerService.getInstance(); statsLogger.recordSwfLoadTime(); experimentsService = com.google.youtube.tv.experiments.ExperimentsService.getInstance(); experimentsReadyDelegate = com.google.chianti.event.EventDelegate.create(this, onExperimentsServiceReady); experimentsService.registerEvent(com.google.youtube.tv.experiments.ExperimentsService.READY, experimentsReadyDelegate); System.security.loadPolicyFile("http://www.youtube.com/crossdomain.xml"); System.security.loadPolicyFile("http://gdata.youtube.com/crossdomain.xml"); System.security.loadPolicyFile("https://gdata.youtube.com/crossdomain.xml"); messages = com.google.youtube.tv.services.MessagesService.get(); messagesReadyDelegate = com.google.chianti.event.EventDelegate.create(this, onMessagesReady); messages.registerEvents(com.google.youtube.event.MessagesEvent.UPDATE, com.google.youtube.event.DataEvent.ERROR, messagesReadyDelegate); messages.load(); preloader = new com.google.youtube.tv.components.PreloadComponent(container); signIn = new com.google.youtube.tv.components.SignInComponent(container); signIn.setVisible(false); signInService = com.google.youtube.tv.services.SignInService.getInstance(); signInReadyDelegate = com.google.chianti.event.EventDelegate.create(this, onSignInReady); signInService.registerEvent(com.google.youtube.tv.services.SignInService.READY, signInReadyDelegate); } function onExperimentsServiceReady(event) { experimentsService.unregisterEvent(com.google.youtube.tv.experiments.ExperimentsService.READY, experimentsReadyDelegate); experimentsReadyDelegate = null; preloader.advanceProgressBar(); strongAuthService = com.google.youtube.tv.services.StrongAuthService.getInstance(); strongAuthReadyDelegate = com.google.chianti.event.EventDelegate.create(this, onStrongAuthComplete); strongAuthService.registerEvents(com.google.youtube.tv.services.StrongAuthService.READY, com.google.youtube.tv.services.StrongAuthService.FAIL, strongAuthReadyDelegate); strongAuthService.registerEvent(com.google.youtube.tv.services.StrongAuthService.CONNECTION_FAILURE, com.google.chianti.event.EventDelegate.create(this, onConnectionFailure)); strongAuthService.init(); } function onStrongAuthComplete(event) { strongAuthService.unregisterEvents(com.google.youtube.tv.services.StrongAuthService.READY, com.google.youtube.tv.services.StrongAuthService.FAIL, strongAuthReadyDelegate); strongAuthReadyDelegate = null; preloader.advanceProgressBar(); strongAuthReady = true; build(); } function onSignInReady(event) { signInService.unregisterEvent(com.google.youtube.tv.services.SignInService.READY, signInReadyDelegate); signInReadyDelegate = null; preloader.advanceProgressBar(); signInReady = true; build(); } function onMessagesReady(event) { messages.unregisterEvents(com.google.youtube.event.MessagesEvent.UPDATE, com.google.youtube.event.DataEvent.ERROR, messagesReadyDelegate); messagesReadyDelegate = null; preloader.advanceProgressBar(); if (event.type == com.google.youtube.event.DataEvent.ERROR) { statsLogger.sendMessagesError(); } messagesReady = true; build(); } function build() { if ((!messagesReady) || ((!strongAuthReady) || ((!signInReady) || (built)))) { return(undefined); } built = true; preloader.advanceProgressBar(); root = com.google.youtube.tv.tree.ContentTree.getRoot(); root.init(); playlistLocation = new com.google.youtube.tv.tree.Location(root, 0); video = new com.google.youtube.tv.components.VideoComponent(container, playlistLocation); video.setVisible(false); adInfo = new com.google.youtube.tv.components.AdInfoComponent(container, playlistLocation); adInfo.setVisible(false); background = new com.google.youtube.tv.ui.ApplicationBackground(container); guide = new com.google.youtube.tv.components.GuideComponent(container, playlistLocation); guide.setVisible(false); signIn.bringToFront(); switcher = com.google.youtube.tv.controller.Switcher.getSwitcher(); switcher.setBackground(background); switcher.switchTo(preloader); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_ABOUT_CHANNEL, com.google.chianti.event.EventDelegate.create(this, onActionAboutChannel)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_TOGGLE_SUBSCRIPTION, com.google.chianti.event.EventDelegate.create(this, onActionToggleSubscription)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_ADD_TO_PLAYLIST, com.google.chianti.event.EventDelegate.create(this, onActionAddToPlaylist)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SIGN_IN, com.google.chianti.event.EventDelegate.create(this, onActionSignIn)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SIGN_OUT_INVITATION, com.google.chianti.event.EventDelegate.create(this, onActionSignOutInvitation)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SEARCH, com.google.chianti.event.EventDelegate.create(this, onActionSearch)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.SEARCH_COMPLETE, com.google.chianti.event.EventDelegate.create(this, onSearchComplete)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_WATCH_PLAYLIST, com.google.chianti.event.EventDelegate.create(this, onActionWatchPlaylist)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_PREV_VIDEO, com.google.chianti.event.EventDelegate.create(this, onActionPrevVideo)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_NEXT_VIDEO, com.google.chianti.event.EventDelegate.create(this, onActionNextVideo)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_AD_SKIP, com.google.chianti.event.EventDelegate.create(this, onActionAdSkip)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_STATE_CHANGE, com.google.chianti.event.EventDelegate.create(this, onPlayerStateChange)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_ERROR, com.google.chianti.event.EventDelegate.create(this, onPlayerError)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_OPEN_PIVOT, com.google.chianti.event.EventDelegate.create(this, onOpenPivot)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SHOW_GUIDE, com.google.chianti.event.EventDelegate.create(this, onShowGuide)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SHOW_INFO, com.google.chianti.event.EventDelegate.create(this, onShowInfo)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_SHOW_TRAY, com.google.chianti.event.EventDelegate.create(this, onShowTray)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_FLAG_VIDEO, com.google.chianti.event.EventDelegate.create(this, onFlagVideo)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_PAIR, com.google.chianti.event.EventDelegate.create(this, onPair)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.VIDEO_PLAYER_READY, com.google.chianti.event.EventDelegate.create(this, onPlayerReady)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.SHOW_DEBUG_INFO, com.google.chianti.event.EventDelegate.create(this, onShowDebugInfo)); com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.FLAG_FLIP, com.google.chianti.event.EventDelegate.create(this, onFlagFlip)); nextVideoDelegate = com.google.chianti.event.EventDelegate.create(this, playNextVideo); nextVideoFromStateChangeDelegate = com.google.chianti.event.EventDelegate.create(this, playNextVideo, true); brandingController = new com.google.youtube.tv.controller.BrandingController(video); subtitleController = new com.google.youtube.tv.controller.SubtitleController(video); video.subtitleController = subtitleController; improveYouTubeController = new com.google.youtube.tv.controller.ImproveYouTubeController(container); clearCookiesController = new com.google.youtube.tv.controller.ClearCookiesController(container); if (com.google.youtube.tv.platform.Box.hasAutoPlay()) { video.init(); } statsLogger.recordBuildCompleteTime(); if (root.isLoaded()) { checkPlayerAndContentReady(); } else { com.google.youtube.tv.wiring.EventBus.registerForEvent(com.google.youtube.tv.wiring.AppEvent.CONTENT_LOADED, com.google.chianti.event.EventDelegate.create(this, checkPlayerAndContentReady)); } } function createAddToPlayList() { addToPlaylist = addToPlaylist || (new com.google.youtube.tv.components.AddToPlaylistComponent(container)); return(addToPlaylist); } function createPair() { pair = pair || (new com.google.youtube.tv.components.PairComponent(container)); return(pair); } function createSearch() { search = search || (new com.google.youtube.tv.components.SearchComponent(container)); return(search); } function createTray() { tray = tray || (new com.google.youtube.tv.components.TrayComponent(container, video, playlistLocation)); return(tray); } function createFlagging() { flagging = flagging || (new com.google.youtube.tv.components.FlaggingComponent(container)); return(flagging); } function createVideoInfo() { videoInfo = videoInfo || (new com.google.youtube.tv.components.VideoInfoComponent(container, playlistLocation)); return(videoInfo); } function createPivot() { pivot = pivot || (new com.google.youtube.tv.components.PivotComponent(container, playlistLocation)); return(pivot); } function createTransport() { transport = transport || (new com.google.youtube.tv.components.TransportComponent(container, video, playlistLocation)); transport.subtitleController = subtitleController; return(transport); } function createChannelInfo() { channelInfo = channelInfo || (new com.google.youtube.tv.components.ChannelInfoComponent(container)); return(channelInfo); } function onPlayerStateChange(event) { if (event.playerState == 0) { if (!nextVideoFromStateChangeScheduler) { nextVideoFromStateChangeScheduler = com.google.youtube.util.Scheduler.setTimeout(1, nextVideoFromStateChangeDelegate); } else { nextVideoFromStateChangeScheduler.restart(); } com.google.youtube.tv.services.StatsLoggerService.getInstance().sendEndOfVideo(); } } function onConnectionFailure(event) { statsLogger.sendConnectionError(); var _local3 = messages.getMsg(com.google.youtube.tv.services.MessagesService.CONNECTION_FAILURE); if (com.google.youtube.tv.services.SignInService.isSignedIn()) { _local3 = _local3 + ("\n\n" + messages.getMsg(com.google.youtube.tv.services.MessagesService.CONNECTION_FAILURE_SIGN_OUT)); } com.google.youtube.tv.components.Dialog.showDialog(container, _local3); } function onPlayerReady(event) { if (!playerReady) { statsLogger.recordPlayerReadyTime(); playerReady = true; checkPlayerAndContentReady(); } } function checkPlayerAndContentReady() { if ((!initialized) && (playerReady && (root.isLoaded()))) { initialized = true; com.google.youtube.tv.services.PairService.getInstance().init(playlistLocation, video.player.isPlayerReady()); if (com.google.youtube.tv.platform.Box.isDebugViewVisible()) { var _local2 = com.google.youtube.tv.view.DebugView.get(container); _local2.setVisible(true); } com.google.youtube.tv.platform.Box.externalOnLoaded(); video.setVisible(true); adInfo.setVisible(true); switcher.reset(); switcher.setFallback(guide); switcher.switchTo(guide); statsLogger.recordSwitchGuideTime(); statsLogger.sendSessionInitMessage(); if (!com.google.youtube.tv.platform.Box.hasAutoPlay()) { video.init(); } var _local3 = root.getAutoPlayNode(); if (_local3 && (_local3.getChildrenCount() && (!com.google.youtube.tv.app.Environment.getPlaylistId()))) { com.google.youtube.tv.wiring.EventBus.broadcastEvent(new com.google.youtube.tv.wiring.AppEvent(com.google.youtube.tv.wiring.AppEvent.ACTION_WATCH_PLAYLIST, {playlist:_local3, index:0})); } if (com.google.youtube.tv.app.Environment.hasSearchVar()) { switcher.switchTo(createSearch()); search.runSearch(com.google.youtube.tv.app.Environment.getSearchQuery()); } com.google.youtube.tv.platform.Box.listenToJSEvents(); com.google.youtube.tv.services.MagicSequencesService.get(); guide.clip.onMouseMove = com.google.chianti.event.EventDelegate.create(this, onMouseMove); } } function onMouseMove() { guide.clip.onMouseMove = null; statsLogger.sendMouseUsage(); } function onPlayerError(event) { transport.showErrorDialog(nextVideoDelegate, event.description); } function onActionAboutChannel(event) { switcher.switchTo(createChannelInfo()); channelInfo.setChannelNode(com.google.youtube.tv.tree.ChannelNode(event.treeNode)); } function onActionToggleSubscription(event) { var _local3 = com.google.youtube.tv.tree.ChannelNode(event.treeNode); var _local4 = _local3.getUserId(); if (!_local4) { return(undefined); } if (!com.google.youtube.tv.services.SignInService.isSignedIn()) { statsLogger.recordSignInFromMenuSubscribe(); onActionSignIn(); } else { _local3 = root.getUserSubscriptionsNode().getSubscription(_local4); if (_local3) { com.google.youtube.tv.services.VideoManageService.getInstance().unsubscribe(_local3.getSubscriptionId()); } else { com.google.youtube.tv.services.VideoManageService.getInstance().subscribe(_local4); } } } function onActionAddToPlaylist(event) { switcher.switchTo(createAddToPlayList()); addToPlaylist.setData(event.videoId, event.userPlaylists); } function onPair(event) { switcher.switchTo(createPair()); } function onActionSignIn() { switcher.switchTo(signIn); } function onActionSignOutInvitation() { switcher.switchTo(signIn); } function onActionSearch(event) { switcher.switchTo(createSearch()); } function onActionWatchPlaylist(event) { switcher.resetUntil(createTransport()); switcher.switchTo(createTransport()); playlistLocation.moveTo(event.playlist, event.index); transport.showControls(); } function onSearchComplete(event) { onActionWatchPlaylist(event); } function onActionPrevVideo(event) { playPrevVideo(); if (event.showtray) { onShowTray(); } } function onActionNextVideo(event) { playNextVideo(); if (event.showtray) { onShowTray(); } } function onActionAdSkip(event) { video.player.adSkip(); } function onOpenPivot() { switcher.switchTo(createPivot()); } function onShowInfo() { switcher.switchTo(createVideoInfo()); } function onShowTray() { if (com.google.youtube.tv.tree.PlaylistFeedNode(playlistLocation.getNode()).containsOnlyVideoNodes()) { switcher.switchTo(createTray()); } } function onShowGuide(event) { switcher.reset(); switcher.switchTo(guide); if (event.home) { guide.home(); } } function onFlagVideo(event) { createFlagging(); switcher.switchTo(flagging); flagging.setVideoId(event.videoId); } function onShowDebugInfo(event) { var _local3 = com.google.youtube.tv.services.StorageService.get(); var _local4 = (((((((((((((((((((((((((((((((((((((("vendor " + com.google.youtube.tv.platform.Box.getVendor()) + "\nmodel ") + com.google.youtube.tv.platform.Box.getModel()) + "\nFirst app launch ") + _local3.isFirstLaunch()) + "\nStorage type ") + _local3.getStorageType()) + "\nSystem ") + System.capabilities.version) + (container._parent ? ("\nShim " + container._parent._url) : "")) + "\nApp ") + container._url) + (com.google.youtube.tv.app.Environment.getTestHost() ? ("\nTest host " + com.google.youtube.tv.app.Environment.getTestHost()) : "")) + (com.google.youtube.tv.app.Environment.getLoader() ? ("\nLoader " + com.google.youtube.tv.app.Environment.getLoader()) : "")) + (com.google.youtube.tv.app.Environment.getPackage() ? ("\nPackage " + com.google.youtube.tv.app.Environment.getPackage()) : "")) + "\ncountry ") + com.google.youtube.tv.platform.Box.getCountry()) + " geoCountry ") + com.google.youtube.tv.platform.Box.getGeoCountry()) + "\nlang ") + com.google.youtube.tv.platform.Box.getLang()) + "\nCJK ") + com.google.youtube.tv.platform.Box.isFontEmbedded()) + "\nexp ") + com.google.youtube.tv.platform.Box.getExp()) + ", hasMouse ") + com.google.youtube.tv.platform.Box.hasMouse()) + ", type ") + com.google.youtube.tv.platform.Box.getType()) + ", firmware ") + com.google.youtube.tv.platform.Box.getFirmware()) + ", sku ") + com.google.youtube.tv.platform.Box.getSku()) + ", remote ") + com.google.youtube.tv.platform.Box.getRemote()) + ", pairingCode ") + com.google.youtube.tv.platform.Box.getPairingCode()) + ", all features ") + _local3.getValue(com.google.youtube.tv.services.StorageService.ALL_FEATURES); com.google.youtube.tv.components.Dialog.showDialog(container, _local4); } function onFlagFlip(event) { if (event.flagName == com.google.youtube.tv.services.StorageService.ALL_FEATURES) { com.google.youtube.tv.components.Dialog.showDialog(container, (event.flagValue ? ("All possibly hidden features will be enabled. Please restart the " + "app.") : ("Only launched features will be enabled. Please restart " + "the app."))); } } function playPrevVideo() { playlistLocation.setIndexOffset(-1, false); } function playNextVideo(fromPlayerStateChange) { var _local3 = playlistLocation.getNode().isAutoAdvancing(); var _local4 = (playlistLocation.getIndex() == (playlistLocation.getNode().getChildrenCount() - 1)) || (!com.google.youtube.tv.tree.VideoNode(playlistLocation.getNode().getChildren()[playlistLocation.getIndex() + 1])); if ((!_local3) || (_local4)) { if (fromPlayerStateChange) { switcher.resetUntil(createTransport()); switcher.pop(); } if (_local3) { switcher.switchTo(createVideoInfo()); } } else { if (fromPlayerStateChange) { video.player.autoPlayOnce(); } playlistLocation.setIndexOffset(1, false); } } static function main(container) { var _local3 = new com.google.youtube.tv.LBLv3(container); } var messagesReady = false; var strongAuthReady = false; var signInReady = false; var playerReady = false; var built = false; var initialized = false; }
Symbol 20674 MovieClip [__Packages.com.google.youtube.tv.views.ViewFactory] Frame 0
class com.google.youtube.tv.views.ViewFactory { var messages; function ViewFactory () { } function createView(clip, treeNode, isSelected, lastViews) { if (!messages) { messages = com.google.youtube.tv.services.MessagesService.get(); } if (treeNode instanceof com.google.youtube.tv.tree.VerbNode) { var _local6 = com.google.youtube.tv.tree.VerbNode(treeNode); var _local7 = com.google.youtube.tv.views.VerbThumbnail(recycleView(lastViews, treeNode, com.google.youtube.tv.views.VerbThumbnail.VERB_THUMBNAIL)) || (new com.google.youtube.tv.views.VerbThumbnail(clip)); _local7.setHighlight(isSelected); if (_local7.represents(treeNode)) { return(_local7); } _local7.setData(treeNode); _local7.setTitle(_local6.getTitle()); _local7.setSubTitle(_local6.subtitle); _local7.setIconId(_local6.iconId); _local7.setThumbnailUrl(_local6.thumbnailUrl); return(_local7); } if (treeNode instanceof com.google.youtube.tv.tree.PlaylistFeedNode) { var _local8 = com.google.youtube.tv.tree.PlaylistFeedNode(treeNode); var _local9 = com.google.youtube.tv.views.ListThumbnail(recycleView(lastViews, treeNode, com.google.youtube.tv.views.ListThumbnail.LIST_THUMBNAIL)) || (new com.google.youtube.tv.views.ListThumbnail(clip)); _local9.setSettings(com.google.youtube.tv.views.ListThumbnail.NORMAL); _local9.setHighlight(isSelected); if (_local9.represents(treeNode)) { return(_local9); } _local9.setData(treeNode); _local9.setOverlayText(messages.getMsg(com.google.youtube.tv.services.MessagesService.BADGE_PLAYLIST).toUpperCase()); _local9.setImageUrl(treeNode.getThumbnailUrl()); _local9.setTitle(_local8.getTitle()); var _local10 = []; if (_local8.getVideosCount() > 0) { _local9.setMetaInfo(messages.getMsg(com.google.youtube.tv.services.MessagesService.NUMBER_OF_VIDEOS, {VIDEO_COUNT_1:com.google.youtube.tv.util.StringUtil.formatNumberString(_local8.getVideosCount())})); } return(_local9); } if (treeNode instanceof com.google.youtube.tv.tree.UserPlaylistsFeedNode) { var _local11 = com.google.youtube.tv.tree.UserPlaylistsFeedNode(treeNode); var _local12 = com.google.youtube.tv.views.VerbThumbnail(recycleView(lastViews, _local11, com.google.youtube.tv.views.VerbThumbnail.VERB_THUMBNAIL)) || (new com.google.youtube.tv.views.VerbThumbnail(clip)); _local12.setHighlight(isSelected); if (_local12.represents(_local11)) { return(_local12); } _local12.setData(_local11); _local12.setTitle(_local11.getTitle()); _local12.setIconId("playlistIcon"); return(_local12); } if (treeNode instanceof com.google.youtube.tv.tree.ChannelNode) { var _local13 = com.google.youtube.tv.tree.ChannelNode(treeNode); var _local14 = com.google.youtube.tv.views.ListThumbnail(recycleView(lastViews, _local13, com.google.youtube.tv.views.ListThumbnail.LIST_THUMBNAIL)) || (new com.google.youtube.tv.views.ListThumbnail(clip)); _local14.setSettings(com.google.youtube.tv.views.ListThumbnail.SQUARE); _local14.setHighlight(isSelected); if (_local14.represents(_local13)) { return(_local14); } _local14.setData(_local13); _local14.setTitle(_local13.getTitle()); if (_local13.getSubscriberCount()) { _local14.setMetaInfo(messages.getMsg(com.google.youtube.tv.services.MessagesService.CHANNEL_INFO_SUBSCRIBERS, {NUMSUBSCRIBERS_1:com.google.youtube.tv.util.StringUtil.formatNumberString(_local13.getSubscriberCount())})); } _local14.setImageUrl(_local13.getThumbnailUrl()); return(_local14); } if (treeNode instanceof com.google.youtube.tv.tree.LoadingNode) { var _local15 = com.google.youtube.tv.views.TextThumbnail(recycleView(lastViews, treeNode, com.google.youtube.tv.views.TextThumbnail.TEXT_THUMBNAIL)) || (new com.google.youtube.tv.views.TextThumbnail(clip)); _local15.setHighlight(true); if (_local15.represents(treeNode)) { return(_local15); } _local15.setData(treeNode); _local15.setText(treeNode.getTitle()); return(_local15); } if (treeNode instanceof com.google.youtube.tv.tree.VideoNode) { var _local16 = com.google.youtube.tv.tree.VideoNode(treeNode); var _local17 = com.google.youtube.tv.views.ListThumbnail(recycleView(lastViews, treeNode, com.google.youtube.tv.views.ListThumbnail.LIST_THUMBNAIL)) || (new com.google.youtube.tv.views.ListThumbnail(clip)); _local17.setSettings(com.google.youtube.tv.views.ListThumbnail.NORMAL); _local17.setHighlight(isSelected); if (_local17.represents(treeNode)) { return(_local17); } _local17.setData(treeNode); _local17.setTitle(_local16.getTitle()); _local17.setImageUrl(_local16.getThumbnailUrl()); _local17.setDuration(_local16.getDuration()); var _local18 = []; if (_local16.getAuthor()) { _local18.push(_local16.getAuthor()); } if (_local16.getViewCount() && (_local16.getViewCount() != "0")) { _local18.push(messages.getMsg(com.google.youtube.tv.services.MessagesService.N_VIEWS, {VIEWS:_local16.getViewCount()})); } _local17.setMetaInfo(_local18.join(" | ")); _local17.setBadge((_local16.isHd() ? "HD" : "")); return(_local17); } if (com.google.youtube.tv.tree.StaticNode(treeNode).getType() == com.google.youtube.tv.tree.StaticNode.TYPE_WATCH_LATER_UPSELL) { var _local19 = com.google.youtube.tv.tree.StaticNode(treeNode); var _local20 = com.google.youtube.tv.views.WatchLaterThumbnail(recycleView(lastViews, treeNode, com.google.youtube.tv.views.WatchLaterThumbnail.WATCH_LATER_THUMBNAIL)) || (new com.google.youtube.tv.views.WatchLaterThumbnail(clip)); _local20.setData(_local19); _local20.setLabels(_local19.getTitle(), _local19.getSubtitle()); return(_local20); } return(createGeneralView(clip, treeNode, isSelected)); } function recycleView(lastViews, treeNode, thumbClassName) { var _local5 = lastViews.length; var _local8 = false; var _local9 = 0; for ( ; _local9 < _local5 ; _local9++) { var _local10 = lastViews[_local9]; var _local11 = com.google.youtube.tv.views.IImageView(_local10); var _local12 = (_local11 != null) && (_local11.getImageUrl() == treeNode.getThumbnailUrl()); if (_local10.getClassName() == thumbClassName) { if (_local10.represents(treeNode)) { lastViews.splice(_local9, 1); return(_local10); } if (!_local8) { var _local6 = _local10; var _local7 = _local9; _local8 = _local12; } } } if (_local6) { lastViews.splice(_local7, 1); _local6.cleanBeforeRecycle(_local8); return(_local6); } return(null); } function createGeneralView(clip, treeNode, isSelected) { var _local5 = new com.google.youtube.tv.views.TextThumbnail(clip); _local5.setHighlight(isSelected); _local5.setData(treeNode); _local5.setText(treeNode.getTitle()); return(_local5); } }
Symbol 20675 MovieClip [__Packages.com.google.youtube.util.Scheduler] Frame 0
class com.google.youtube.util.Scheduler { static var ticker, head, current; var start, previous, next; function Scheduler (timeout, interval) { if (_global.isNaN(timeout)) { timeout = _global.Infinity; } if (_global.isNaN(interval)) { interval = 0; } if ((!ticker) && (blank)) { ticker = _root.createEmptyMovieClip("__ticker", _root.getNextHighestDepth()); ticker.onEnterFrame = com.google.chianti.event.EventDelegate.create(this, run); } this.timeout = timeout; this.interval = interval; if (blank) { restart(); } } static function setTimeout(timeout, callback) { var _local4 = new com.google.youtube.util.Scheduler(timeout, _global.Infinity); _local4.onEnd = callback; return(_local4); } static function setInterval(interval, callback) { var _local4 = new com.google.youtube.util.Scheduler(_global.Infinity, interval); _local4.onTick = callback; return(_local4); } function onEnd() { } function onTick(elapsed) { } function restart() { elapsedTimeAtPause = 0; start = clock(); lastTick = start; if ((!previous) && (!next)) { if (head && (head != this)) { head.previous = this; next = head; } head = this; } } function pause() { if (isRunning()) { stop(); elapsedTimeAtPause = clock() - start; } } function resume() { if (!isRunning()) { var _local2 = elapsedTimeAtPause; restart(); start = start - _local2; } } static function run(event) { var _local3 = clock(); current = head; while (current) { var _local4 = current; var _local5 = _local3 - _local4.start; if ((_local3 - _local4.lastTick) >= _local4.interval) { _local4.onTick(_local5); _local4.lastTick = _local3; } if (_local5 >= _local4.timeout) { _local4.onEnd(); _local4.stop(); } current = current.next; } current = null; blank.next = null; } function isRunning() { return((next != null) || ((previous != null) || (head == this))); } function stop() { if ((current == this) || ((current == blank) && (blank.next == this))) { blank.next = next; current = blank; } if (previous) { previous.next = next; } if (next) { next.previous = previous; } if (head == this) { head = next; } next = (previous = null); elapsedTimeAtPause = 0; } static function clock() { return(getTimer()); } static var blank = new com.google.youtube.util.Scheduler(); var timeout = _global.Infinity; var interval = 0; var lastTick = 0; var elapsedTimeAtPause = 0; }
Symbol 20676 MovieClip [__Packages.com.google.youtube.tv.view.ui.Toggle] Frame 0
class com.google.youtube.tv.view.ui.Toggle extends com.google.youtube.tv.view.ui.UIComponentBase implements com.google.youtube.tv.osk.IGridLayoutItem { var options, buttonWidth, buttonHeight, buttons, selectedButtonIndex, clip, dispatchUserActivity, columnIndex, rowIndex, broadcast, dispatchOutbound; function Toggle (container, options, opt_buttonWidth, opt_buttonHeight) { super(container); this.options = options; buttonWidth = opt_buttonWidth || (DEFAULT_BUTTON_WIDTH); buttonHeight = opt_buttonHeight || (DEFAULT_BUTTON_HEIGHT); build(); setSelectedIndex(0); } function build() { buttons = []; selectedButtonIndex = 0; var _local2 = 0; var _local3 = 0; for ( ; _local3 < options.length ; _local3++) { var _local4 = options[_local3]; var _local5 = new com.google.youtube.tv.view.ui.Button(clip, buttonWidth, buttonHeight); _local5.registerEvent(com.google.youtube.tv.view.ui.ButtonBase.MOUSE_CLICK, com.google.chianti.event.EventDelegate.create(this, toggleSelection)); _local5.registerEvent(com.google.youtube.tv.view.ui.UIComponentBase.USER_ACTIVITY, com.google.chianti.event.EventDelegate.create(this, dispatchUserActivity)); _local5.data = _local3; _local5.initText(_local4.label, BUTTON_LINE_HEIGHT, com.google.youtube.tv.ui.Colors.WHITE); _local5.setPos(_local2, 0); buttons.push(_local5); _local2 = _local2 + buttonWidth; if (_local3 < (options.length - 1)) { com.google.youtube.tv.util.DrawUtil.drawRectangle(clip, _local2, 0, DELIMITER_WIDTH, buttonHeight, 0, 0, 0, com.google.youtube.tv.ui.Colors.WHITE, 60); _local2 = _local2 + DELIMITER_WIDTH; } } } function toggleSelection() { setSelectedIndex((selectedButtonIndex + 1) % options.length); } function getColumnIndex() { return(columnIndex); } function setColumnIndex(value) { columnIndex = value; } function getRowIndex() { return(rowIndex); } function setRowIndex(value) { rowIndex = value; } function getSelectedButtonId() { return(options[selectedButtonIndex].id); } function setSelectedIndex(index) { var _local3 = buttons[selectedButtonIndex].getIsActive(); buttons[selectedButtonIndex].setIsActive(false); buttons[selectedButtonIndex].setSelected(false); selectedButtonIndex = index % options.length; buttons[selectedButtonIndex].setSelected(true); buttons[selectedButtonIndex].setIsActive(_local3); broadcast({type:TOGGLE_CHANGE}); } function getSelectedIndex() { return(selectedButtonIndex); } function setIsActive(value) { super.setIsActive(value); buttons[selectedButtonIndex].setIsActive(value); } function onKeyUp() { dispatchOutbound(); } function toString() { return("<Toggle />"); } static var TOGGLE_CHANGE = "TOGGLE_CHANGE"; static var DEFAULT_BUTTON_WIDTH = 100 * com.google.youtube.tv.app.Config.SCALE; static var DEFAULT_BUTTON_HEIGHT = 44 * com.google.youtube.tv.app.Config.SCALE; static var BUTTON_LINE_HEIGHT = 15; static var DELIMITER_WIDTH = 4; }
Symbol 20677 MovieClip [__Packages.com.google.youtube.tv.osk.layout.HiraganaLayout] Frame 0
class com.google.youtube.tv.osk.layout.HiraganaLayout extends com.google.youtube.tv.osk.layout.EnglishLayout { function HiraganaLayout () { super(); } function getLangCode() { return("ja"); } function toString() { return("<HiraganaLayout />"); } }
Symbol 20678 MovieClip [__Packages.com.google.youtube.tv.remotes.partner.LGRemoteController] Frame 0
class com.google.youtube.tv.remotes.partner.LGRemoteController extends com.google.youtube.tv.remotes.DefaultRemoteController { function LGRemoteController () { super(); } function processKey(keyCode) { var _local4 = 0; for ( ; _local4 < EXCLUDE_SINGLE.length ; _local4++) { if (keyCode == EXCLUDE_SINGLE[_local4]) { return(super.processKey(keyCode)); } } var _local5 = 0; for ( ; _local5 < EXCLUDE_RANGE.length ; _local5 = _local5 + 2) { if ((keyCode >= EXCLUDE_RANGE[_local5]) && (keyCode <= EXCLUDE_RANGE[_local5 + 1])) { return(super.processKey(keyCode)); } } switch (keyCode) { case LG_PLAY : return(com.google.youtube.tv.controller.ExtendedKeys.PLAY); case LG_STOP : return(com.google.youtube.tv.controller.ExtendedKeys.STOP); case LG_PAUSE : return(com.google.youtube.tv.controller.ExtendedKeys.PAUSE); case LG_FF : return(com.google.youtube.tv.controller.ExtendedKeys.FAST_FORWARD); case LG_FB : return(com.google.youtube.tv.controller.ExtendedKeys.REWIND); case LG_NEXT : return(com.google.youtube.tv.controller.ExtendedKeys.NEXT); case LG_PREVIOUS : return(com.google.youtube.tv.controller.ExtendedKeys.PREVIOUS); case LG_BLUE : return(com.google.youtube.tv.controller.ExtendedKeys.BLUE); case LG_GREEN : return(com.google.youtube.tv.controller.ExtendedKeys.GREEN); case LG_RED : return(com.google.youtube.tv.controller.ExtendedKeys.RED); case LG_YELLOW : return(com.google.youtube.tv.controller.ExtendedKeys.YELLOW); case LG_BACK : return(com.google.youtube.tv.controller.ExtendedKeys.BACK); case LG_EXIT : case LG_MENU : case LG_NETCAST : return(com.google.youtube.tv.controller.ExtendedKeys.EXIT); } return(super.processKey(keyCode)); } static var LG_BACK = 27; static var LG_EXIT = 88; static var LG_MENU = 77; static var LG_NETCAST = 36; static var LG_PLAY = 45; static var LG_STOP = 35; static var LG_PAUSE = 46; static var LG_FF = 17; static var LG_FB = 16; static var LG_NEXT = 16777228; static var LG_PREVIOUS = 16777229; static var LG_BLUE = 34; static var LG_GREEN = 190; static var LG_RED = 188; static var LG_YELLOW = 33; static var EXCLUDE_SINGLE = [8, 13, 20, 65, 66, 187, 189, 34, 33, 188, 190, 192, 220, 89, 69, 71, 350, 351, 357]; static var EXCLUDE_RANGE = [48, 57, 352, 356]; }
Symbol 20679 MovieClip [__Packages.com.google.youtube.tv.view.caret.AbstractCaret] Frame 0
class com.google.youtube.tv.view.caret.AbstractCaret { var text, caret; function AbstractCaret (text, caret) { this.text = text; this.caret = caret; } function updatePosition() { } }
Symbol 20680 MovieClip [__Packages.com.google.youtube.tv.view.caret.FixedSizeTextCaret] Frame 0
class com.google.youtube.tv.view.caret.FixedSizeTextCaret extends com.google.youtube.tv.view.caret.AbstractCaret { var delta, text, caret; function FixedSizeTextCaret (text, caret) { super(text, caret); } function updatePosition() { delta = text.textWidth - text._width; text.hscroll = text.maxhscroll; caret._x = text._x + Math.min(text._width, text.textWidth); } }
Symbol 20681 MovieClip [__Packages.com.google.youtube.tv.wiring.EventBus] Frame 0
class com.google.youtube.tv.wiring.EventBus extends com.google.chianti.event.EventBroadcaster { static var instance; function EventBus () { super(); com.google.chianti.event.EventBroadcaster.initialize(this); } static function getInstance() { if (!instance) { instance = new com.google.youtube.tv.wiring.EventBus(); } return(instance); } static function setInstance(eventBusInstance) { instance = eventBusInstance; } static function broadcastEvent(event) { getInstance().broadcast(event); } static function registerForEvent(type, handler) { getInstance().registerEvent(type, handler); } static function unregisterForEvent(type, handler) { getInstance().unregisterEvent(type, handler); } static function registerStream(type, es) { registerForEvent(type, com.google.chianti.event.EventDelegate.create(es, es.update, instance)); es.bindToSources([instance]); } }
Symbol 20682 MovieClip [__Packages.com.google.youtube.tv.util.YTUtil] Frame 0
class com.google.youtube.tv.util.YTUtil { function YTUtil () { } static function getImageUrl(userId, opt_hasPrefix, opt_useSsl) { var _local5 = ((opt_hasPrefix || (opt_hasPrefix == undefined)) ? (userId.substr(2)) : (userId)); var _local6 = (com.google.youtube.tv.util.Crypto.getHashCode(_local5) % 4) + 1; return((((((opt_useSsl ? "https" : "http") + "://i") + _local6) + ".ytimg.com/i/") + _local5) + "/1.jpg"); } }

Library Items

Symbol 1 Bitmap [youtube_logo_standard_againstblack.png]
Symbol 2 Bitmap [logo_youtube.png]
Symbol 3 Bitmap [flagOnWeb]
Symbol 4 Bitmap [backgroundImage]
Symbol 5 MovieClip [logo_old]
Symbol 6 GraphicUsed by:7
Symbol 7 MovieClip [watchLaterIcon]Uses:6
Symbol 8 GraphicUsed by:9
Symbol 9 MovieClip [watchHistoryIcon]Uses:8
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClip [uploadsIcon]Uses:10
Symbol 12 GraphicUsed by:13 38
Symbol 13 MovieClip [subscribeLargeIcon]Uses:12
Symbol 14 GraphicUsed by:15 41
Symbol 15 MovieClip [subscribedLargeIcon]Uses:14
Symbol 16 GraphicUsed by:17
Symbol 17 MovieClip [searchSpaceIcon]Uses:16
Symbol 18 GraphicUsed by:19
Symbol 19 MovieClip [searchIcon]Uses:18
Symbol 20 GraphicUsed by:21
Symbol 21 MovieClip [searchClearIcon]Uses:20
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClip [searchBackspaceIcon]Uses:22
Symbol 24 GraphicUsed by:25
Symbol 25 MovieClip [safetyModeIcon]Uses:24
Symbol 26 GraphicUsed by:27
Symbol 27 MovieClipUses:26Used by:29
Symbol 28 GraphicUsed by:29
Symbol 29 MovieClip [profileIcon]Uses:27 28
Symbol 30 GraphicUsed by:31
Symbol 31 MovieClipUses:30Used by:32 33
Symbol 32 MovieClipUses:31Used by:33
Symbol 33 MovieClip [preloader]Uses:32 31
Symbol 34 GraphicUsed by:35
Symbol 35 MovieClip [playYTIcon]Uses:34
Symbol 36 GraphicUsed by:37
Symbol 37 MovieClip [playlistIcon]Uses:36
Symbol 38 MovieClip [playerSubscribeUpIcon]Uses:12
Symbol 39 GraphicUsed by:40
Symbol 40 MovieClip [playerSubscribeIcon]Uses:39
Symbol 41 MovieClip [playerSubscribedIcon]Uses:14
Symbol 42 GraphicUsed by:43
Symbol 43 MovieClip [playerRewindIcon]Uses:42
Symbol 44 GraphicUsed by:45
Symbol 45 MovieClip [playerPrevIcon]Uses:44
Symbol 46 GraphicUsed by:47
Symbol 47 MovieClip [playerPlayIcon]Uses:46
Symbol 48 GraphicUsed by:49
Symbol 49 MovieClip [playerPauseIcon]Uses:48
Symbol 50 GraphicUsed by:51
Symbol 51 MovieClip [playerNextIcon]Uses:50
Symbol 52 GraphicUsed by:53
Symbol 53 MovieClip [playerLikeIcon]Uses:52
Symbol 54 GraphicUsed by:55
Symbol 55 MovieClip [playerHomeIcon]Uses:54
Symbol 56 GraphicUsed by:57
Symbol 57 MovieClip [playerForwardIcon]Uses:56
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClip [playerFlagIcon]Uses:58
Symbol 60 GraphicUsed by:61
Symbol 61 MovieClip [playerDislikeIcon]Uses:60
Symbol 62 GraphicUsed by:63
Symbol 63 MovieClip [playerCcIcon]Uses:62
Symbol 64 GraphicUsed by:65
Symbol 65 MovieClip [playerAddToPlaylistIcon]Uses:64
Symbol 66 GraphicUsed by:67
Symbol 67 MovieClip [playAllIcon]Uses:66
Symbol 68 GraphicUsed by:69
Symbol 69 MovieClip [phoneLandscape]Uses:68
Symbol 70 GraphicUsed by:71
Symbol 71 MovieClip [phoneIcon]Uses:70
Symbol 72 GraphicUsed by:73
Symbol 73 MovieClip [pairingIcon]Uses:72
Symbol 74 GraphicUsed by:75
Symbol 75 MovieClip [logoWhite]Uses:74
Symbol 76 GraphicUsed by:77
Symbol 77 MovieClip [clearIcon]Uses:76
Symbol 78 GraphicUsed by:79
Symbol 79 MovieClip [brokenImage]Uses:78
Symbol 80 GraphicUsed by:81
Symbol 81 MovieClip [backIcon]Uses:80
Symbol 82 GraphicUsed by:83
Symbol 83 MovieClipUses:82Used by:90
Symbol 84 GraphicUsed by:90
Symbol 85 GraphicUsed by:86
Symbol 86 MovieClipUses:85Used by:90
Symbol 87 GraphicUsed by:88
Symbol 88 MovieClipUses:87Used by:90
Symbol 89 GraphicUsed by:90
Symbol 90 MovieClip [yt_logo]Uses:83 84 86 88 89Used by:93
Symbol 91 FontUsed by:92
Symbol 92 EditableTextUses:91Used by:93
Symbol 93 MovieClip [ytLogo]Uses:90 92Used by:Timeline
Symbol 20480 MovieClip [__Packages.com.google.chianti.event.EventBroadcaster]
Symbol 20481 MovieClip [__Packages.com.google.youtube.tv.ui.View]
Symbol 20482 MovieClip [__Packages.com.google.youtube.tv.components.BaseComponent]
Symbol 20483 MovieClip [__Packages.com.google.youtube.tv.app.Config]
Symbol 20484 MovieClip [__Packages.com.google.youtube.tv.components.TransportComponent]
Symbol 20485 MovieClip [__Packages.ArrayParam]
Symbol 20486 MovieClip [__Packages.com.google.youtube.tv.components.DialogBase]
Symbol 20487 MovieClip [__Packages.com.google.youtube.tv.view.ui.UIComponentBase]
Symbol 20488 MovieClip [__Packages.com.google.youtube.tv.view.ui.PairingUpsell]
Symbol 20489 MovieClip [__Packages.com.adobe.crypto.MD5]
Symbol 20490 MovieClip [__Packages.com.adobe.serialization.json.JSONTokenizer]
Symbol 20491 MovieClip [__Packages.com.google.youtube.event.ModuleEvent]
Symbol 20492 MovieClip [__Packages.com.google.youtube.tv.tree.TreeNode]
Symbol 20493 MovieClip [__Packages.com.google.youtube.tv.tree.VideoContentTree]
Symbol 20494 MovieClip [__Packages.com.google.youtube.tv.data.DataFetcher]
Symbol 20495 MovieClip [__Packages.com.google.youtube.tv.data.StrongAuthDataFetcher]
Symbol 20496 MovieClip [__Packages.com.google.youtube.tv.services.BrandingOptionsService]
Symbol 20497 MovieClip [__Packages.com.google.youtube.tv.util.Logger]
Symbol 20498 MovieClip [__Packages.com.google.youtube.tv.tree.MenuNode]
Symbol 20499 MovieClip [__Packages.com.google.youtube.tv.tree.ListNode]
Symbol 20500 MovieClip [__Packages.com.google.youtube.tv.tree.GDataNode]
Symbol 20501 MovieClip [__Packages.com.google.youtube.tv.tree.ContentTree]
Symbol 20502 MovieClip [__Packages.com.google.youtube.tv.tree.PlaylistFeedNode]
Symbol 20503 MovieClip [__Packages.com.google.youtube.tv.tree.ChannelOverviewNode]
Symbol 20504 MovieClip [__Packages.com.google.youtube.tv.wiring.EventStream]
Symbol 20505 MovieClip [__Packages.com.google.youtube.tv.services.DeviceRetentionService]
Symbol 20506 MovieClip [__Packages.com.as2regexp.RegExp]
Symbol 20507 MovieClip [__Packages.com.google.youtube.tv.platform.Box]
Symbol 20508 MovieClip [__Packages.com.google.youtube.tv.remotes.DefaultRemoteController]
Symbol 20509 MovieClip [__Packages.com.google.youtube.tv.view.ui.ButtonBase]
Symbol 20510 MovieClip [__Packages.com.google.youtube.tv.services.StatsLoggerService]
Symbol 20511 MovieClip [__Packages.com.google.net.browserchannel.BrowserChannel]
Symbol 20512 MovieClip [__Packages.com.adobe.serialization.json.JSONEncoder]
Symbol 20513 MovieClip [__Packages.com.google.youtube.tv.ui.Rect]
Symbol 20514 MovieClip [__Packages.com.google.youtube.tv.remotes.partner.LGUPlusRemoteController]
Symbol 20515 MovieClip [__Packages.com.google.youtube.tv.components.TrayPageComponent]
Symbol 20516 MovieClip [__Packages.com.google.youtube.tv.components.PivotComponent]
Symbol 20517 MovieClip [__Packages.com.google.youtube.tv.components.FlaggingComponent]
Symbol 20518 MovieClip [__Packages.com.google.youtube.util.StringUtil]
Symbol 20519 MovieClip [__Packages.com.google.youtube.tv.controller.ScrollHistory]
Symbol 20520 MovieClip [__Packages.com.google.youtube.tv.util.Aes]
Symbol 20521 MovieClip [__Packages.com.google.youtube.tv.experiments.Experiment]
Symbol 20522 MovieClip [__Packages.com.google.youtube.tv.experiments.VariantExperiment]
Symbol 20523 MovieClip [__Packages.com.google.youtube.tv.osk.layout.ILayout]
Symbol 20524 MovieClip [__Packages.com.google.youtube.tv.osk.layout.EnglishLayout]
Symbol 20525 MovieClip [__Packages.com.google.youtube.tv.osk.layout.ChineseLayout]
Symbol 20526 MovieClip [__Packages.com.adobe.serialization.json.JSONParseError]
Symbol 20527 MovieClip [__Packages.com.google.youtube.tv.ui.Text]
Symbol 20528 MovieClip [__Packages.com.google.youtube.tv.components.DialogWithButtons]
Symbol 20529 MovieClip [__Packages.com.google.youtube.tv.components.Dialog]
Symbol 20530 MovieClip [__Packages.com.google.chianti.event.EventDelegate]
Symbol 20531 MovieClip [__Packages.com.google.youtube.tv.controller.Switcher]
Symbol 20532 MovieClip [__Packages.com.google.youtube.tv.view.TransportHeaderView]
Symbol 20533 MovieClip [__Packages.com.google.youtube.tv.views.BaseThumbnail]
Symbol 20534 MovieClip [__Packages.com.google.youtube.tv.views.TextThumbnail]
Symbol 20535 MovieClip [__Packages.com.google.youtube.tv.services.PairService]
Symbol 20536 MovieClip [__Packages.com.google.youtube.tv.util.Xtract]
Symbol 20537 MovieClip [__Packages.com.google.youtube.tv.ui.Font]
Symbol 20538 MovieClip [__Packages.com.google.youtube.tv.osk.layout.LayoutController]
Symbol 20539 MovieClip [__Packages.com.google.youtube.tv.view.ui.list.ListItem]
Symbol 20540 MovieClip [__Packages.com.google.youtube.tv.view.ui.list.PlaylistListItem]
Symbol 20541 MovieClip [__Packages.com.google.youtube.tv.view.DebugView]
Symbol 20542 MovieClip [__Packages.com.google.youtube.tv.ui.Tile]
Symbol 20543 MovieClip [__Packages.com.google.utils.UrlConstructor]
Symbol 20544 MovieClip [__Packages.com.google.youtube.event.MessagesEvent]
Symbol 20545 MovieClip [__Packages.com.google.youtube.tv.view.SearchComponentView]
Symbol 20546 MovieClip [__Packages.com.google.youtube.tv.view.ui.VideoInfo]
Symbol 20547 MovieClip [__Packages.com.google.youtube.tv.osk.language.Language]
Symbol 20548 MovieClip [__Packages.com.google.youtube.tv.services.TransliterationService]
Symbol 20549 MovieClip [__Packages.com.google.utils.MathUtils]
Symbol 20550 MovieClip [__Packages.com.google.youtube.IBroadcaster]
Symbol 20551 MovieClip [__Packages.com.google.youtube.AbstractBroadcaster]
Symbol 20552 MovieClip [__Packages.com.google.youtube.util.IMessages]
Symbol 20553 MovieClip [__Packages.com.google.youtube.tv.services.AbstractMessagesService]
Symbol 20554 MovieClip [__Packages.com.google.youtube.tv.services.MessagesService]
Symbol 20555 MovieClip [__Packages.com.google.youtube.tv.view.ui.list.List]
Symbol 20556 MovieClip [__Packages.com.google.youtube.tv.tree.WatchLaterNode]
Symbol 20557 MovieClip [__Packages.com.google.youtube.tv.components.ThumbstripInfoView]
Symbol 20558 MovieClip [__Packages.com.google.utils.EventReporter]
Symbol 20559 MovieClip [__Packages.com.google.youtube.tv.tree.WatchHistoryNode]
Symbol 20560 MovieClip [__Packages.com.google.youtube.tv.view.ui.list.SuggestionListItem]
Symbol 20561 MovieClip [__Packages.com.google.youtube.tv.services.StrongAuthService]
Symbol 20562 MovieClip [__Packages.com.google.youtube.tv.views.WatchLaterThumbnail]
Symbol 20563 MovieClip [__Packages.com.google.youtube.tv.osk.transliteration.ITransliterator]
Symbol 20564 MovieClip [__Packages.com.google.youtube.tv.osk.transliteration.SinglePartTransliterator]
Symbol 20565 MovieClip [__Packages.com.google.youtube.tv.osk.transliteration.MultiPartTransliterator]
Symbol 20566 MovieClip [__Packages.com.google.youtube.tv.util.StringUtil]
Symbol 20567 MovieClip [__Packages.com.google.youtube.tv.components.PreloadComponent]
Symbol 20568 MovieClip [__Packages.com.google.youtube.tv.components.SearchComponent]
Symbol 20569 MovieClip [__Packages.com.google.youtube.tv.components.AddToPlaylistComponent]
Symbol 20570 MovieClip [__Packages.com.google.youtube.tv.view.ui.Button]
Symbol 20571 MovieClip [__Packages.com.google.youtube.tv.components.MenuControlButton]
Symbol 20572 MovieClip [__Packages.com.google.youtube.tv.view.ui.list.VideoListItem]
Symbol 20573 MovieClip [__Packages.com.google.youtube.tv.osk.layout.RussianLayout]
Symbol 20574 MovieClip [__Packages.com.google.youtube.tv.tree.StaticNode]
Symbol 20575 MovieClip [__Packages.com.google.youtube.tv.components.ChannelInfoComponent]
Symbol 20576 MovieClip [__Packages.com.google.youtube.tv.osk.IGridLayoutItem]
Symbol 20577 MovieClip [__Packages.com.google.youtube.tv.osk.OskButton]
Symbol 20578 MovieClip [__Packages.com.google.youtube.tv.views.IImageView]
Symbol 20579 MovieClip [__Packages.com.google.youtube.tv.views.ListThumbnailSettings]
Symbol 20580 MovieClip [__Packages.com.google.youtube.tv.ui.Colors]
Symbol 20581 MovieClip [__Packages.com.google.youtube.tv.views.ListThumbnail]
Symbol 20582 MovieClip [__Packages.com.google.utils.Url]
Symbol 20583 MovieClip [__Packages.com.google.youtube.tv.util.DrawUtil]
Symbol 20584 MovieClip [__Packages.com.google.youtube.tv.components.SignInComponent]
Symbol 20585 MovieClip [__Packages.com.google.youtube.tv.tree.VideoNode]
Symbol 20586 MovieClip [__Packages.com.google.youtube.tv.osk.transliteration.Transliteration]
Symbol 20587 MovieClip [__Packages.com.google.youtube.tv.tree.WhatToWatchNode]
Symbol 20588 MovieClip [__Packages.com.google.youtube.tv.controller.BrandingController]
Symbol 20589 MovieClip [__Packages.com.google.youtube.util.ExternalInterfaceWrapper]
Symbol 20590 MovieClip [__Packages.com.google.youtube.tv.ui.ApplicationBackground]
Symbol 20591 MovieClip [__Packages.com.google.youtube.tv.wiring.ValueStream]
Symbol 20592 MovieClip [__Packages.com.google.youtube.tv.remotes.partner.SamsungRemoteController]
Symbol 20593 MovieClip [__Packages.com.google.youtube.tv.tree.VerbNode]
Symbol 20594 MovieClip [__Packages.com.google.youtube.tv.tree.SignOutNode]
Symbol 20595 MovieClip [__Packages.com.adobe.serialization.json.JSONToken]
Symbol 20596 MovieClip [__Packages.com.google.youtube.tv.tree.VideosNode]
Symbol 20597 MovieClip [__Packages.com.google.youtube.tv.ui.TextCircle]
Symbol 20598 MovieClip [__Packages.com.google.chianti.utils.StringUtil]
Symbol 20599 MovieClip [__Packages.com.google.youtube.tv.osk.language.Hangul]
Symbol 20600 MovieClip [__Packages.com.google.youtube.tv.util.ObjectUtil]
Symbol 20601 MovieClip [__Packages.com.google.youtube.tv.wiring.FRP]
Symbol 20602 MovieClip [__Packages.com.google.youtube.tv.view.ui.TransportButton]
Symbol 20603 MovieClip [__Packages.com.google.youtube.tv.view.ui.SubscribeButton]
Symbol 20604 MovieClip [__Packages.com.google.youtube.tv.tree.ChannelsNode]
Symbol 20605 MovieClip [__Packages.com.google.youtube.tv.services.StorageService]
Symbol 20606 MovieClip [__Packages.com.google.youtube.tv.osk.AbstractOnScreenKeyboard]
Symbol 20607 MovieClip [__Packages.com.google.youtube.tv.osk.OnScreenKeyboard]
Symbol 20608 MovieClip [__Packages.com.google.youtube.tv.osk.language.Hiragana]
Symbol 20609 MovieClip [__Packages.com.google.youtube.tv.view.ui.DialogOld]
Symbol 20610 MovieClip [__Packages.com.google.youtube.tv.services.MagicSequencesService]
Symbol 20611 MovieClip [__Packages.com.google.youtube.tv.controller.ImageQueue]
Symbol 20612 MovieClip [__Packages.com.google.youtube.tv.osk.layout.HangulLayout]
Symbol 20613 MovieClip [__Packages.com.google.youtube.tv.util.Crypto]
Symbol 20614 MovieClip [__Packages.com.google.youtube.tv.components.DialogWithCheckbox]
Symbol 20615 MovieClip [__Packages.com.google.youtube.tv.components.PairComponent]
Symbol 20616 MovieClip [__Packages.com.google.youtube.tv.ui.FontInfoDiff]
Symbol 20617 MovieClip [__Packages.com.google.youtube.tv.osk.OskInfo]
Symbol 20618 MovieClip [__Packages.com.adobe.serialization.json.JSONDecoder]
Symbol 20619 MovieClip [__Packages.com.google.testing.AssertionFailedError]
Symbol 20620 MovieClip [__Packages.com.google.youtube.tv.components.MenuButton]
Symbol 20621 MovieClip [__Packages.com.google.youtube.tv.ui.FontInfo]
Symbol 20622 MovieClip [__Packages.com.google.youtube.tv.view.ui.PageNavigationButton]
Symbol 20623 MovieClip [__Packages.com.google.youtube.tv.services.VideoManageService]
Symbol 20624 MovieClip [__Packages.com.google.youtube.tv.experiments.ExperimentsService]
Symbol 20625 MovieClip [__Packages.com.google.youtube.tv.components.MenuComponent]
Symbol 20626 MovieClip [__Packages.com.google.youtube.tv.tree.ComplexFeedNode]
Symbol 20627 MovieClip [__Packages.com.google.youtube.tv.components.ThumbstripComponent]
Symbol 20628 MovieClip [__Packages.com.google.youtube.tv.ui.Image]
Symbol 20629 MovieClip [__Packages.com.google.youtube.tv.ui.CroppedImage]
Symbol 20630 MovieClip [__Packages.com.google.youtube.tv.controller.ImproveYouTubeController]
Symbol 20631 MovieClip [__Packages.com.google.youtube.tv.tree.UserPlaylistsFeedNode]
Symbol 20632 MovieClip [__Packages.com.google.youtube.tv.view.ui.DialogButton]
Symbol 20633 MovieClip [__Packages.com.google.youtube.tv.services.SignInService]
Symbol 20634 MovieClip [__Packages.com.google.youtube.tv.model.PlayerState]
Symbol 20635 MovieClip [__Packages.com.google.youtube.tv.remotes.partner.TivoRemoteController]
Symbol 20636 MovieClip [__Packages.com.google.youtube.util.Drawing]
Symbol 20637 MovieClip [__Packages.com.google.youtube.tv.components.VideoInfoComponent]
Symbol 20638 MovieClip [__Packages.com.google.youtube.tv.view.ui.Checkbox]
Symbol 20639 MovieClip [__Packages.com.adobe.utils.IntUtil]
Symbol 20640 MovieClip [__Packages.com.google.youtube.tv.tree.Location]
Symbol 20641 MovieClip [__Packages.com.google.youtube.tv.util.Base64]
Symbol 20642 MovieClip [__Packages.com.google.youtube.tv.views.VerbThumbnail]
Symbol 20643 MovieClip [__Packages.com.google.youtube.tv.components.TrayComponent]
Symbol 20644 MovieClip [__Packages.com.google.youtube.tv.util.Hmac]
Symbol 20645 MovieClip [__Packages.com.google.youtube.tv.ui.Symbol]
Symbol 20646 MovieClip [__Packages.com.google.youtube.tv.components.GuideComponent]
Symbol 20647 MovieClip [__Packages.com.google.youtube.tv.view.ui.VideoActionBar]
Symbol 20648 MovieClip [__Packages.com.google.youtube.tv.ui.ProgressBar]
Symbol 20649 MovieClip [__Packages.com.adobe.serialization.json.JSONTokenType]
Symbol 20650 MovieClip [__Packages.com.google.youtube.tv.tree.SearchNode]
Symbol 20651 MovieClip [__Packages.com.google.youtube.tv.view.ui.list.PairedDeviceListItem]
Symbol 20652 MovieClip [__Packages.com.google.youtube.tv.controller.ClearCookiesController]
Symbol 20653 MovieClip [__Packages.com.google.youtube.tv.components.VideoInfoContentView]
Symbol 20654 MovieClip [__Packages.com.google.youtube.tv.components.AdInfoComponent]
Symbol 20655 MovieClip [__Packages.com.google.youtube.tv.util.DateUtil]
Symbol 20656 MovieClip [__Packages.com.google.youtube.tv.view.ui.SuggestionButton]
Symbol 20657 MovieClip [__Packages.com.google.youtube.tv.controller.ChromelessHost]
Symbol 20658 MovieClip [__Packages.com.google.youtube.tv.app.Environment]
Symbol 20659 MovieClip [__Packages.com.google.youtube.tv.tree.LoadingNode]
Symbol 20660 MovieClip [__Packages.com.google.youtube.tv.controller.SubtitleController]
Symbol 20661 MovieClip [__Packages.com.google.youtube.tv.controller.ExtendedKeys]
Symbol 20662 MovieClip [__Packages.com.google.youtube.tv.remotes.partner.VirginMediaRemoteController]
Symbol 20663 MovieClip [__Packages.com.google.youtube.tv.tree.ChannelNode]
Symbol 20664 MovieClip [__Packages.com.google.youtube.tv.wiring.AppEvent]
Symbol 20665 MovieClip [__Packages.com.google.youtube.event.DataEvent]
Symbol 20666 MovieClip [__Packages.com.google.youtube.tv.util.Sha1]
Symbol 20667 MovieClip [__Packages.com.google.youtube.tv.tree.UserSubscriptionsNode]
Symbol 20668 MovieClip [__Packages.com.google.youtube.players.modules.ModuleLoadPolicy]
Symbol 20669 MovieClip [__Packages.com.google.youtube.tv.ads.AdsService]
Symbol 20670 MovieClip [__Packages.com.google.youtube.tv.components.VideoComponent]
Symbol 20671 MovieClip [__Packages.com.google.third_party.json.JSON]
Symbol 20672 MovieClip [__Packages.com.adobe.serialization.json.JSON]
Symbol 20673 MovieClip [__Packages.com.google.youtube.tv.LBLv3]
Symbol 20674 MovieClip [__Packages.com.google.youtube.tv.views.ViewFactory]
Symbol 20675 MovieClip [__Packages.com.google.youtube.util.Scheduler]
Symbol 20676 MovieClip [__Packages.com.google.youtube.tv.view.ui.Toggle]
Symbol 20677 MovieClip [__Packages.com.google.youtube.tv.osk.layout.HiraganaLayout]
Symbol 20678 MovieClip [__Packages.com.google.youtube.tv.remotes.partner.LGRemoteController]
Symbol 20679 MovieClip [__Packages.com.google.youtube.tv.view.caret.AbstractCaret]
Symbol 20680 MovieClip [__Packages.com.google.youtube.tv.view.caret.FixedSizeTextCaret]
Symbol 20681 MovieClip [__Packages.com.google.youtube.tv.wiring.EventBus]
Symbol 20682 MovieClip [__Packages.com.google.youtube.tv.util.YTUtil]

Instance Names

"logo"Frame 1Symbol 93 MovieClip [ytLogo]

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
ExportAssets (56)Timeline Frame 1Symbol 1 as "youtube_logo_standard_againstblack.png"
ExportAssets (56)Timeline Frame 1Symbol 2 as "logo_youtube.png"
ExportAssets (56)Timeline Frame 1Symbol 3 as "flagOnWeb"
ExportAssets (56)Timeline Frame 1Symbol 4 as "backgroundImage"
ExportAssets (56)Timeline Frame 1Symbol 5 as "logo_old"
ExportAssets (56)Timeline Frame 1Symbol 7 as "watchLaterIcon"
ExportAssets (56)Timeline Frame 1Symbol 9 as "watchHistoryIcon"
ExportAssets (56)Timeline Frame 1Symbol 11 as "uploadsIcon"
ExportAssets (56)Timeline Frame 1Symbol 13 as "subscribeLargeIcon"
ExportAssets (56)Timeline Frame 1Symbol 15 as "subscribedLargeIcon"
ExportAssets (56)Timeline Frame 1Symbol 17 as "searchSpaceIcon"
ExportAssets (56)Timeline Frame 1Symbol 19 as "searchIcon"
ExportAssets (56)Timeline Frame 1Symbol 21 as "searchClearIcon"
ExportAssets (56)Timeline Frame 1Symbol 23 as "searchBackspaceIcon"
ExportAssets (56)Timeline Frame 1Symbol 25 as "safetyModeIcon"
ExportAssets (56)Timeline Frame 1Symbol 29 as "profileIcon"
ExportAssets (56)Timeline Frame 1Symbol 33 as "preloader"
ExportAssets (56)Timeline Frame 1Symbol 35 as "playYTIcon"
ExportAssets (56)Timeline Frame 1Symbol 37 as "playlistIcon"
ExportAssets (56)Timeline Frame 1Symbol 38 as "playerSubscribeUpIcon"
ExportAssets (56)Timeline Frame 1Symbol 40 as "playerSubscribeIcon"
ExportAssets (56)Timeline Frame 1Symbol 41 as "playerSubscribedIcon"
ExportAssets (56)Timeline Frame 1Symbol 43 as "playerRewindIcon"
ExportAssets (56)Timeline Frame 1Symbol 45 as "playerPrevIcon"
ExportAssets (56)Timeline Frame 1Symbol 47 as "playerPlayIcon"
ExportAssets (56)Timeline Frame 1Symbol 49 as "playerPauseIcon"
ExportAssets (56)Timeline Frame 1Symbol 51 as "playerNextIcon"
ExportAssets (56)Timeline Frame 1Symbol 53 as "playerLikeIcon"
ExportAssets (56)Timeline Frame 1Symbol 55 as "playerHomeIcon"
ExportAssets (56)Timeline Frame 1Symbol 57 as "playerForwardIcon"
ExportAssets (56)Timeline Frame 1Symbol 59 as "playerFlagIcon"
ExportAssets (56)Timeline Frame 1Symbol 61 as "playerDislikeIcon"
ExportAssets (56)Timeline Frame 1Symbol 63 as "playerCcIcon"
ExportAssets (56)Timeline Frame 1Symbol 65 as "playerAddToPlaylistIcon"
ExportAssets (56)Timeline Frame 1Symbol 67 as "playAllIcon"
ExportAssets (56)Timeline Frame 1Symbol 69 as "phoneLandscape"
ExportAssets (56)Timeline Frame 1Symbol 71 as "phoneIcon"
ExportAssets (56)Timeline Frame 1Symbol 73 as "pairingIcon"
ExportAssets (56)Timeline Frame 1Symbol 75 as "logoWhite"
ExportAssets (56)Timeline Frame 1Symbol 77 as "clearIcon"
ExportAssets (56)Timeline Frame 1Symbol 79 as "brokenImage"
ExportAssets (56)Timeline Frame 1Symbol 81 as "backIcon"
ExportAssets (56)Timeline Frame 1Symbol 90 as "yt_logo"
ExportAssets (56)Timeline Frame 1Symbol 93 as "ytLogo"
ExportAssets (56)Timeline Frame 2Symbol 20480 as "__Packages.com.google.chianti.event.EventBroadcaster"
ExportAssets (56)Timeline Frame 2Symbol 20481 as "__Packages.com.google.youtube.tv.ui.View"
ExportAssets (56)Timeline Frame 2Symbol 20482 as "__Packages.com.google.youtube.tv.components.BaseComponent"
ExportAssets (56)Timeline Frame 2Symbol 20483 as "__Packages.com.google.youtube.tv.app.Config"
ExportAssets (56)Timeline Frame 2Symbol 20484 as "__Packages.com.google.youtube.tv.components.TransportComponent"
ExportAssets (56)Timeline Frame 2Symbol 20485 as "__Packages.ArrayParam"
ExportAssets (56)Timeline Frame 2Symbol 20486 as "__Packages.com.google.youtube.tv.components.DialogBase"
ExportAssets (56)Timeline Frame 2Symbol 20487 as "__Packages.com.google.youtube.tv.view.ui.UIComponentBase"
ExportAssets (56)Timeline Frame 2Symbol 20488 as "__Packages.com.google.youtube.tv.view.ui.PairingUpsell"
ExportAssets (56)Timeline Frame 2Symbol 20489 as "__Packages.com.adobe.crypto.MD5"
ExportAssets (56)Timeline Frame 2Symbol 20490 as "__Packages.com.adobe.serialization.json.JSONTokenizer"
ExportAssets (56)Timeline Frame 2Symbol 20491 as "__Packages.com.google.youtube.event.ModuleEvent"
ExportAssets (56)Timeline Frame 2Symbol 20492 as "__Packages.com.google.youtube.tv.tree.TreeNode"
ExportAssets (56)Timeline Frame 2Symbol 20493 as "__Packages.com.google.youtube.tv.tree.VideoContentTree"
ExportAssets (56)Timeline Frame 2Symbol 20494 as "__Packages.com.google.youtube.tv.data.DataFetcher"
ExportAssets (56)Timeline Frame 2Symbol 20495 as "__Packages.com.google.youtube.tv.data.StrongAuthDataFetcher"
ExportAssets (56)Timeline Frame 2Symbol 20496 as "__Packages.com.google.youtube.tv.services.BrandingOptionsService"
ExportAssets (56)Timeline Frame 2Symbol 20497 as "__Packages.com.google.youtube.tv.util.Logger"
ExportAssets (56)Timeline Frame 2Symbol 20498 as "__Packages.com.google.youtube.tv.tree.MenuNode"
ExportAssets (56)Timeline Frame 2Symbol 20499 as "__Packages.com.google.youtube.tv.tree.ListNode"
ExportAssets (56)Timeline Frame 2Symbol 20500 as "__Packages.com.google.youtube.tv.tree.GDataNode"
ExportAssets (56)Timeline Frame 2Symbol 20501 as "__Packages.com.google.youtube.tv.tree.ContentTree"
ExportAssets (56)Timeline Frame 2Symbol 20502 as "__Packages.com.google.youtube.tv.tree.PlaylistFeedNode"
ExportAssets (56)Timeline Frame 2Symbol 20503 as "__Packages.com.google.youtube.tv.tree.ChannelOverviewNode"
ExportAssets (56)Timeline Frame 2Symbol 20504 as "__Packages.com.google.youtube.tv.wiring.EventStream"
ExportAssets (56)Timeline Frame 2Symbol 20505 as "__Packages.com.google.youtube.tv.services.DeviceRetentionService"
ExportAssets (56)Timeline Frame 2Symbol 20506 as "__Packages.com.as2regexp.RegExp"
ExportAssets (56)Timeline Frame 2Symbol 20507 as "__Packages.com.google.youtube.tv.platform.Box"
ExportAssets (56)Timeline Frame 2Symbol 20508 as "__Packages.com.google.youtube.tv.remotes.DefaultRemoteController"
ExportAssets (56)Timeline Frame 2Symbol 20509 as "__Packages.com.google.youtube.tv.view.ui.ButtonBase"
ExportAssets (56)Timeline Frame 2Symbol 20510 as "__Packages.com.google.youtube.tv.services.StatsLoggerService"
ExportAssets (56)Timeline Frame 2Symbol 20511 as "__Packages.com.google.net.browserchannel.BrowserChannel"
ExportAssets (56)Timeline Frame 2Symbol 20512 as "__Packages.com.adobe.serialization.json.JSONEncoder"
ExportAssets (56)Timeline Frame 2Symbol 20513 as "__Packages.com.google.youtube.tv.ui.Rect"
ExportAssets (56)Timeline Frame 2Symbol 20514 as "__Packages.com.google.youtube.tv.remotes.partner.LGUPlusRemoteController"
ExportAssets (56)Timeline Frame 2Symbol 20515 as "__Packages.com.google.youtube.tv.components.TrayPageComponent"
ExportAssets (56)Timeline Frame 2Symbol 20516 as "__Packages.com.google.youtube.tv.components.PivotComponent"
ExportAssets (56)Timeline Frame 2Symbol 20517 as "__Packages.com.google.youtube.tv.components.FlaggingComponent"
ExportAssets (56)Timeline Frame 2Symbol 20518 as "__Packages.com.google.youtube.util.StringUtil"
ExportAssets (56)Timeline Frame 2Symbol 20519 as "__Packages.com.google.youtube.tv.controller.ScrollHistory"
ExportAssets (56)Timeline Frame 2Symbol 20520 as "__Packages.com.google.youtube.tv.util.Aes"
ExportAssets (56)Timeline Frame 2Symbol 20521 as "__Packages.com.google.youtube.tv.experiments.Experiment"
ExportAssets (56)Timeline Frame 2Symbol 20522 as "__Packages.com.google.youtube.tv.experiments.VariantExperiment"
ExportAssets (56)Timeline Frame 2Symbol 20523 as "__Packages.com.google.youtube.tv.osk.layout.ILayout"
ExportAssets (56)Timeline Frame 2Symbol 20524 as "__Packages.com.google.youtube.tv.osk.layout.EnglishLayout"
ExportAssets (56)Timeline Frame 2Symbol 20525 as "__Packages.com.google.youtube.tv.osk.layout.ChineseLayout"
ExportAssets (56)Timeline Frame 2Symbol 20526 as "__Packages.com.adobe.serialization.json.JSONParseError"
ExportAssets (56)Timeline Frame 2Symbol 20527 as "__Packages.com.google.youtube.tv.ui.Text"
ExportAssets (56)Timeline Frame 2Symbol 20528 as "__Packages.com.google.youtube.tv.components.DialogWithButtons"
ExportAssets (56)Timeline Frame 2Symbol 20529 as "__Packages.com.google.youtube.tv.components.Dialog"
ExportAssets (56)Timeline Frame 2Symbol 20530 as "__Packages.com.google.chianti.event.EventDelegate"
ExportAssets (56)Timeline Frame 2Symbol 20531 as "__Packages.com.google.youtube.tv.controller.Switcher"
ExportAssets (56)Timeline Frame 2Symbol 20532 as "__Packages.com.google.youtube.tv.view.TransportHeaderView"
ExportAssets (56)Timeline Frame 2Symbol 20533 as "__Packages.com.google.youtube.tv.views.BaseThumbnail"
ExportAssets (56)Timeline Frame 2Symbol 20534 as "__Packages.com.google.youtube.tv.views.TextThumbnail"
ExportAssets (56)Timeline Frame 2Symbol 20535 as "__Packages.com.google.youtube.tv.services.PairService"
ExportAssets (56)Timeline Frame 2Symbol 20536 as "__Packages.com.google.youtube.tv.util.Xtract"
ExportAssets (56)Timeline Frame 2Symbol 20537 as "__Packages.com.google.youtube.tv.ui.Font"
ExportAssets (56)Timeline Frame 2Symbol 20538 as "__Packages.com.google.youtube.tv.osk.layout.LayoutController"
ExportAssets (56)Timeline Frame 2Symbol 20539 as "__Packages.com.google.youtube.tv.view.ui.list.ListItem"
ExportAssets (56)Timeline Frame 2Symbol 20540 as "__Packages.com.google.youtube.tv.view.ui.list.PlaylistListItem"
ExportAssets (56)Timeline Frame 2Symbol 20541 as "__Packages.com.google.youtube.tv.view.DebugView"
ExportAssets (56)Timeline Frame 2Symbol 20542 as "__Packages.com.google.youtube.tv.ui.Tile"
ExportAssets (56)Timeline Frame 2Symbol 20543 as "__Packages.com.google.utils.UrlConstructor"
ExportAssets (56)Timeline Frame 2Symbol 20544 as "__Packages.com.google.youtube.event.MessagesEvent"
ExportAssets (56)Timeline Frame 2Symbol 20545 as "__Packages.com.google.youtube.tv.view.SearchComponentView"
ExportAssets (56)Timeline Frame 2Symbol 20546 as "__Packages.com.google.youtube.tv.view.ui.VideoInfo"
ExportAssets (56)Timeline Frame 2Symbol 20547 as "__Packages.com.google.youtube.tv.osk.language.Language"
ExportAssets (56)Timeline Frame 2Symbol 20548 as "__Packages.com.google.youtube.tv.services.TransliterationService"
ExportAssets (56)Timeline Frame 2Symbol 20549 as "__Packages.com.google.utils.MathUtils"
ExportAssets (56)Timeline Frame 2Symbol 20550 as "__Packages.com.google.youtube.IBroadcaster"
ExportAssets (56)Timeline Frame 2Symbol 20551 as "__Packages.com.google.youtube.AbstractBroadcaster"
ExportAssets (56)Timeline Frame 2Symbol 20552 as "__Packages.com.google.youtube.util.IMessages"
ExportAssets (56)Timeline Frame 2Symbol 20553 as "__Packages.com.google.youtube.tv.services.AbstractMessagesService"
ExportAssets (56)Timeline Frame 2Symbol 20554 as "__Packages.com.google.youtube.tv.services.MessagesService"
ExportAssets (56)Timeline Frame 2Symbol 20555 as "__Packages.com.google.youtube.tv.view.ui.list.List"
ExportAssets (56)Timeline Frame 2Symbol 20556 as "__Packages.com.google.youtube.tv.tree.WatchLaterNode"
ExportAssets (56)Timeline Frame 2Symbol 20557 as "__Packages.com.google.youtube.tv.components.ThumbstripInfoView"
ExportAssets (56)Timeline Frame 2Symbol 20558 as "__Packages.com.google.utils.EventReporter"
ExportAssets (56)Timeline Frame 2Symbol 20559 as "__Packages.com.google.youtube.tv.tree.WatchHistoryNode"
ExportAssets (56)Timeline Frame 2Symbol 20560 as "__Packages.com.google.youtube.tv.view.ui.list.SuggestionListItem"
ExportAssets (56)Timeline Frame 2Symbol 20561 as "__Packages.com.google.youtube.tv.services.StrongAuthService"
ExportAssets (56)Timeline Frame 2Symbol 20562 as "__Packages.com.google.youtube.tv.views.WatchLaterThumbnail"
ExportAssets (56)Timeline Frame 2Symbol 20563 as "__Packages.com.google.youtube.tv.osk.transliteration.ITransliterator"
ExportAssets (56)Timeline Frame 2Symbol 20564 as "__Packages.com.google.youtube.tv.osk.transliteration.SinglePartTransliterator"
ExportAssets (56)Timeline Frame 2Symbol 20565 as "__Packages.com.google.youtube.tv.osk.transliteration.MultiPartTransliterator"
ExportAssets (56)Timeline Frame 2Symbol 20566 as "__Packages.com.google.youtube.tv.util.StringUtil"
ExportAssets (56)Timeline Frame 2Symbol 20567 as "__Packages.com.google.youtube.tv.components.PreloadComponent"
ExportAssets (56)Timeline Frame 2Symbol 20568 as "__Packages.com.google.youtube.tv.components.SearchComponent"
ExportAssets (56)Timeline Frame 2Symbol 20569 as "__Packages.com.google.youtube.tv.components.AddToPlaylistComponent"
ExportAssets (56)Timeline Frame 2Symbol 20570 as "__Packages.com.google.youtube.tv.view.ui.Button"
ExportAssets (56)Timeline Frame 2Symbol 20571 as "__Packages.com.google.youtube.tv.components.MenuControlButton"
ExportAssets (56)Timeline Frame 2Symbol 20572 as "__Packages.com.google.youtube.tv.view.ui.list.VideoListItem"
ExportAssets (56)Timeline Frame 2Symbol 20573 as "__Packages.com.google.youtube.tv.osk.layout.RussianLayout"
ExportAssets (56)Timeline Frame 2Symbol 20574 as "__Packages.com.google.youtube.tv.tree.StaticNode"
ExportAssets (56)Timeline Frame 2Symbol 20575 as "__Packages.com.google.youtube.tv.components.ChannelInfoComponent"
ExportAssets (56)Timeline Frame 2Symbol 20576 as "__Packages.com.google.youtube.tv.osk.IGridLayoutItem"
ExportAssets (56)Timeline Frame 2Symbol 20577 as "__Packages.com.google.youtube.tv.osk.OskButton"
ExportAssets (56)Timeline Frame 2Symbol 20578 as "__Packages.com.google.youtube.tv.views.IImageView"
ExportAssets (56)Timeline Frame 2Symbol 20579 as "__Packages.com.google.youtube.tv.views.ListThumbnailSettings"
ExportAssets (56)Timeline Frame 2Symbol 20580 as "__Packages.com.google.youtube.tv.ui.Colors"
ExportAssets (56)Timeline Frame 2Symbol 20581 as "__Packages.com.google.youtube.tv.views.ListThumbnail"
ExportAssets (56)Timeline Frame 2Symbol 20582 as "__Packages.com.google.utils.Url"
ExportAssets (56)Timeline Frame 2Symbol 20583 as "__Packages.com.google.youtube.tv.util.DrawUtil"
ExportAssets (56)Timeline Frame 2Symbol 20584 as "__Packages.com.google.youtube.tv.components.SignInComponent"
ExportAssets (56)Timeline Frame 2Symbol 20585 as "__Packages.com.google.youtube.tv.tree.VideoNode"
ExportAssets (56)Timeline Frame 2Symbol 20586 as "__Packages.com.google.youtube.tv.osk.transliteration.Transliteration"
ExportAssets (56)Timeline Frame 2Symbol 20587 as "__Packages.com.google.youtube.tv.tree.WhatToWatchNode"
ExportAssets (56)Timeline Frame 2Symbol 20588 as "__Packages.com.google.youtube.tv.controller.BrandingController"
ExportAssets (56)Timeline Frame 2Symbol 20589 as "__Packages.com.google.youtube.util.ExternalInterfaceWrapper"
ExportAssets (56)Timeline Frame 2Symbol 20590 as "__Packages.com.google.youtube.tv.ui.ApplicationBackground"
ExportAssets (56)Timeline Frame 2Symbol 20591 as "__Packages.com.google.youtube.tv.wiring.ValueStream"
ExportAssets (56)Timeline Frame 2Symbol 20592 as "__Packages.com.google.youtube.tv.remotes.partner.SamsungRemoteController"
ExportAssets (56)Timeline Frame 2Symbol 20593 as "__Packages.com.google.youtube.tv.tree.VerbNode"
ExportAssets (56)Timeline Frame 2Symbol 20594 as "__Packages.com.google.youtube.tv.tree.SignOutNode"
ExportAssets (56)Timeline Frame 2Symbol 20595 as "__Packages.com.adobe.serialization.json.JSONToken"
ExportAssets (56)Timeline Frame 2Symbol 20596 as "__Packages.com.google.youtube.tv.tree.VideosNode"
ExportAssets (56)Timeline Frame 2Symbol 20597 as "__Packages.com.google.youtube.tv.ui.TextCircle"
ExportAssets (56)Timeline Frame 2Symbol 20598 as "__Packages.com.google.chianti.utils.StringUtil"
ExportAssets (56)Timeline Frame 2Symbol 20599 as "__Packages.com.google.youtube.tv.osk.language.Hangul"
ExportAssets (56)Timeline Frame 2Symbol 20600 as "__Packages.com.google.youtube.tv.util.ObjectUtil"
ExportAssets (56)Timeline Frame 2Symbol 20601 as "__Packages.com.google.youtube.tv.wiring.FRP"
ExportAssets (56)Timeline Frame 2Symbol 20602 as "__Packages.com.google.youtube.tv.view.ui.TransportButton"
ExportAssets (56)Timeline Frame 2Symbol 20603 as "__Packages.com.google.youtube.tv.view.ui.SubscribeButton"
ExportAssets (56)Timeline Frame 2Symbol 20604 as "__Packages.com.google.youtube.tv.tree.ChannelsNode"
ExportAssets (56)Timeline Frame 2Symbol 20605 as "__Packages.com.google.youtube.tv.services.StorageService"
ExportAssets (56)Timeline Frame 2Symbol 20606 as "__Packages.com.google.youtube.tv.osk.AbstractOnScreenKeyboard"
ExportAssets (56)Timeline Frame 2Symbol 20607 as "__Packages.com.google.youtube.tv.osk.OnScreenKeyboard"
ExportAssets (56)Timeline Frame 2Symbol 20608 as "__Packages.com.google.youtube.tv.osk.language.Hiragana"
ExportAssets (56)Timeline Frame 2Symbol 20609 as "__Packages.com.google.youtube.tv.view.ui.DialogOld"
ExportAssets (56)Timeline Frame 2Symbol 20610 as "__Packages.com.google.youtube.tv.services.MagicSequencesService"
ExportAssets (56)Timeline Frame 2Symbol 20611 as "__Packages.com.google.youtube.tv.controller.ImageQueue"
ExportAssets (56)Timeline Frame 2Symbol 20612 as "__Packages.com.google.youtube.tv.osk.layout.HangulLayout"
ExportAssets (56)Timeline Frame 2Symbol 20613 as "__Packages.com.google.youtube.tv.util.Crypto"
ExportAssets (56)Timeline Frame 2Symbol 20614 as "__Packages.com.google.youtube.tv.components.DialogWithCheckbox"
ExportAssets (56)Timeline Frame 2Symbol 20615 as "__Packages.com.google.youtube.tv.components.PairComponent"
ExportAssets (56)Timeline Frame 2Symbol 20616 as "__Packages.com.google.youtube.tv.ui.FontInfoDiff"
ExportAssets (56)Timeline Frame 2Symbol 20617 as "__Packages.com.google.youtube.tv.osk.OskInfo"
ExportAssets (56)Timeline Frame 2Symbol 20618 as "__Packages.com.adobe.serialization.json.JSONDecoder"
ExportAssets (56)Timeline Frame 2Symbol 20619 as "__Packages.com.google.testing.AssertionFailedError"
ExportAssets (56)Timeline Frame 2Symbol 20620 as "__Packages.com.google.youtube.tv.components.MenuButton"
ExportAssets (56)Timeline Frame 2Symbol 20621 as "__Packages.com.google.youtube.tv.ui.FontInfo"
ExportAssets (56)Timeline Frame 2Symbol 20622 as "__Packages.com.google.youtube.tv.view.ui.PageNavigationButton"
ExportAssets (56)Timeline Frame 2Symbol 20623 as "__Packages.com.google.youtube.tv.services.VideoManageService"
ExportAssets (56)Timeline Frame 2Symbol 20624 as "__Packages.com.google.youtube.tv.experiments.ExperimentsService"
ExportAssets (56)Timeline Frame 2Symbol 20625 as "__Packages.com.google.youtube.tv.components.MenuComponent"
ExportAssets (56)Timeline Frame 2Symbol 20626 as "__Packages.com.google.youtube.tv.tree.ComplexFeedNode"
ExportAssets (56)Timeline Frame 2Symbol 20627 as "__Packages.com.google.youtube.tv.components.ThumbstripComponent"
ExportAssets (56)Timeline Frame 2Symbol 20628 as "__Packages.com.google.youtube.tv.ui.Image"
ExportAssets (56)Timeline Frame 2Symbol 20629 as "__Packages.com.google.youtube.tv.ui.CroppedImage"
ExportAssets (56)Timeline Frame 2Symbol 20630 as "__Packages.com.google.youtube.tv.controller.ImproveYouTubeController"
ExportAssets (56)Timeline Frame 2Symbol 20631 as "__Packages.com.google.youtube.tv.tree.UserPlaylistsFeedNode"
ExportAssets (56)Timeline Frame 2Symbol 20632 as "__Packages.com.google.youtube.tv.view.ui.DialogButton"
ExportAssets (56)Timeline Frame 2Symbol 20633 as "__Packages.com.google.youtube.tv.services.SignInService"
ExportAssets (56)Timeline Frame 2Symbol 20634 as "__Packages.com.google.youtube.tv.model.PlayerState"
ExportAssets (56)Timeline Frame 2Symbol 20635 as "__Packages.com.google.youtube.tv.remotes.partner.TivoRemoteController"
ExportAssets (56)Timeline Frame 2Symbol 20636 as "__Packages.com.google.youtube.util.Drawing"
ExportAssets (56)Timeline Frame 2Symbol 20637 as "__Packages.com.google.youtube.tv.components.VideoInfoComponent"
ExportAssets (56)Timeline Frame 2Symbol 20638 as "__Packages.com.google.youtube.tv.view.ui.Checkbox"
ExportAssets (56)Timeline Frame 2Symbol 20639 as "__Packages.com.adobe.utils.IntUtil"
ExportAssets (56)Timeline Frame 2Symbol 20640 as "__Packages.com.google.youtube.tv.tree.Location"
ExportAssets (56)Timeline Frame 2Symbol 20641 as "__Packages.com.google.youtube.tv.util.Base64"
ExportAssets (56)Timeline Frame 2Symbol 20642 as "__Packages.com.google.youtube.tv.views.VerbThumbnail"
ExportAssets (56)Timeline Frame 2Symbol 20643 as "__Packages.com.google.youtube.tv.components.TrayComponent"
ExportAssets (56)Timeline Frame 2Symbol 20644 as "__Packages.com.google.youtube.tv.util.Hmac"
ExportAssets (56)Timeline Frame 2Symbol 20645 as "__Packages.com.google.youtube.tv.ui.Symbol"
ExportAssets (56)Timeline Frame 2Symbol 20646 as "__Packages.com.google.youtube.tv.components.GuideComponent"
ExportAssets (56)Timeline Frame 2Symbol 20647 as "__Packages.com.google.youtube.tv.view.ui.VideoActionBar"
ExportAssets (56)Timeline Frame 2Symbol 20648 as "__Packages.com.google.youtube.tv.ui.ProgressBar"
ExportAssets (56)Timeline Frame 2Symbol 20649 as "__Packages.com.adobe.serialization.json.JSONTokenType"
ExportAssets (56)Timeline Frame 2Symbol 20650 as "__Packages.com.google.youtube.tv.tree.SearchNode"
ExportAssets (56)Timeline Frame 2Symbol 20651 as "__Packages.com.google.youtube.tv.view.ui.list.PairedDeviceListItem"
ExportAssets (56)Timeline Frame 2Symbol 20652 as "__Packages.com.google.youtube.tv.controller.ClearCookiesController"
ExportAssets (56)Timeline Frame 2Symbol 20653 as "__Packages.com.google.youtube.tv.components.VideoInfoContentView"
ExportAssets (56)Timeline Frame 2Symbol 20654 as "__Packages.com.google.youtube.tv.components.AdInfoComponent"
ExportAssets (56)Timeline Frame 2Symbol 20655 as "__Packages.com.google.youtube.tv.util.DateUtil"
ExportAssets (56)Timeline Frame 2Symbol 20656 as "__Packages.com.google.youtube.tv.view.ui.SuggestionButton"
ExportAssets (56)Timeline Frame 2Symbol 20657 as "__Packages.com.google.youtube.tv.controller.ChromelessHost"
ExportAssets (56)Timeline Frame 2Symbol 20658 as "__Packages.com.google.youtube.tv.app.Environment"
ExportAssets (56)Timeline Frame 2Symbol 20659 as "__Packages.com.google.youtube.tv.tree.LoadingNode"
ExportAssets (56)Timeline Frame 2Symbol 20660 as "__Packages.com.google.youtube.tv.controller.SubtitleController"
ExportAssets (56)Timeline Frame 2Symbol 20661 as "__Packages.com.google.youtube.tv.controller.ExtendedKeys"
ExportAssets (56)Timeline Frame 2Symbol 20662 as "__Packages.com.google.youtube.tv.remotes.partner.VirginMediaRemoteController"
ExportAssets (56)Timeline Frame 2Symbol 20663 as "__Packages.com.google.youtube.tv.tree.ChannelNode"
ExportAssets (56)Timeline Frame 2Symbol 20664 as "__Packages.com.google.youtube.tv.wiring.AppEvent"
ExportAssets (56)Timeline Frame 2Symbol 20665 as "__Packages.com.google.youtube.event.DataEvent"
ExportAssets (56)Timeline Frame 2Symbol 20666 as "__Packages.com.google.youtube.tv.util.Sha1"
ExportAssets (56)Timeline Frame 2Symbol 20667 as "__Packages.com.google.youtube.tv.tree.UserSubscriptionsNode"
ExportAssets (56)Timeline Frame 2Symbol 20668 as "__Packages.com.google.youtube.players.modules.ModuleLoadPolicy"
ExportAssets (56)Timeline Frame 2Symbol 20669 as "__Packages.com.google.youtube.tv.ads.AdsService"
ExportAssets (56)Timeline Frame 2Symbol 20670 as "__Packages.com.google.youtube.tv.components.VideoComponent"
ExportAssets (56)Timeline Frame 2Symbol 20671 as "__Packages.com.google.third_party.json.JSON"
ExportAssets (56)Timeline Frame 2Symbol 20672 as "__Packages.com.adobe.serialization.json.JSON"
ExportAssets (56)Timeline Frame 2Symbol 20673 as "__Packages.com.google.youtube.tv.LBLv3"
ExportAssets (56)Timeline Frame 2Symbol 20674 as "__Packages.com.google.youtube.tv.views.ViewFactory"
ExportAssets (56)Timeline Frame 2Symbol 20675 as "__Packages.com.google.youtube.util.Scheduler"
ExportAssets (56)Timeline Frame 2Symbol 20676 as "__Packages.com.google.youtube.tv.view.ui.Toggle"
ExportAssets (56)Timeline Frame 2Symbol 20677 as "__Packages.com.google.youtube.tv.osk.layout.HiraganaLayout"
ExportAssets (56)Timeline Frame 2Symbol 20678 as "__Packages.com.google.youtube.tv.remotes.partner.LGRemoteController"
ExportAssets (56)Timeline Frame 2Symbol 20679 as "__Packages.com.google.youtube.tv.view.caret.AbstractCaret"
ExportAssets (56)Timeline Frame 2Symbol 20680 as "__Packages.com.google.youtube.tv.view.caret.FixedSizeTextCaret"
ExportAssets (56)Timeline Frame 2Symbol 20681 as "__Packages.com.google.youtube.tv.wiring.EventBus"
ExportAssets (56)Timeline Frame 2Symbol 20682 as "__Packages.com.google.youtube.tv.util.YTUtil"




http://swfchan.com/33/162670/info.shtml
Created: 20/10 -2018 08:18:50 Last modified: 20/10 -2018 08:18:50 Server time: 22/12 -2024 19:59:29