Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Set background context for the containing iframe if possible

  • Loading branch information...
commit 758fafbbe5ae1835c40df49014620f70995e1809 1 parent 3560b04
@steffentchr authored
Showing with 11 additions and 2 deletions.
  1. +3 −2 src/ActiveElement.as
  2. +1 −0  src/AppProperties.as
  3. +7 −0 src/Utility.as
View
5 src/ActiveElement.as
@@ -44,6 +44,7 @@ private function resetActiveElement(skip:Boolean=false):void {
showBeforeIdentity = true;
showVideoAd = true;
liveStreamsMenu.value = null;
+ updateBackground();
if(!skip) {
progress.setSections([]);
@@ -86,7 +87,7 @@ private function setActiveElementToLiveStream(stream:Object, startPlaying:Boolea
// Make embed code current
updateCurrentVideoEmbedCode();
-
+ updateBackground();
// We want the tray and possible the info box to show up when a new element starts playing
infoShow();
@@ -94,7 +95,6 @@ private function setActiveElementToLiveStream(stream:Object, startPlaying:Boolea
// Note that we've loaded the video
reportEvent('load');
-
}
private function setActiveElement(i:int, startPlaying:Boolean=false, start:Number=0, skip:int=0, format:String=null):Boolean {
@@ -203,6 +203,7 @@ private function setActiveElement(i:int, startPlaying:Boolean=false, start:Numbe
// Make embed code current
updateCurrentVideoEmbedCode();
+ updateBackground();
// We want the tray and possible the info box to show up when a new element starts playing
infoShow();
View
1  src/AppProperties.as
@@ -152,6 +152,7 @@ private function initProperties(settings:Object):void {
props.put('logoVAlign', (new RegExp('top').test(pos) ? 'top' : 'bottom'));
props.put('settingsLoaded', true);
+ updateBackground();
// Tray and information timeout
trayTimer.delay = props.getNumber('trayTimeout');
View
7 src/Utility.as
@@ -59,3 +59,10 @@ public function goToUrl(url:String, target:String = '_top'):void {
if(!new RegExp('\:\/\/').test(url)) url = props.get('site_url') + url;
navigateToURL(new URLRequest(url), target);
}
+public function updateBackground():void {
+ try {
+ if(ExternalInterface.available) {
+ ExternalInterface.call('setBackground', props.getString('backgroundColor'), activeElement.get('photoSource'), props.getNumber('verticalPadding'), props.getNumber('horitzontalPadding'));
+ }
+ } catch(e:Error) {}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.