public void playAudioImpl(Bundle bundle, Activity activity) {
   PlayerProperties playerProperties =
       (PlayerProperties) bundle.getParcelable(IMWebView.PLAYER_PROPERTIES);
   String string = bundle.getString(IMWebView.EXPAND_URL);
   if (string == null) {
     string = AdTrackerConstants.BLANK;
   }
   if (!a(playerProperties.id, string, activity)) {
     return;
   }
   if ((string.length() != 0 && !URLUtil.isValidUrl(string))
       || (string.length() == 0 && !this.audioPlayerList.containsKey(playerProperties.id))) {
     this.a.raiseError("Request must specify a valid URL", "playAudio");
   } else if (this.audioplayer != null) {
     if (string.length() != 0) {
       this.audioplayer.setPlayData(playerProperties, string);
     }
     this.audioPlayerList.put(playerProperties.id, this.audioplayer);
     FrameLayout frameLayout = (FrameLayout) activity.findViewById(16908290);
     if (playerProperties.isFullScreen()) {
       LayoutParams layoutParams =
           new RelativeLayout.LayoutParams(
               WrapperFunctions.getParamFillParent(), WrapperFunctions.getParamFillParent());
       layoutParams.addRule(R.styleable.MapAttrs_zOrderOnTop);
       this.audioplayer.setLayoutParams(layoutParams);
       View relativeLayout = new RelativeLayout(activity);
       relativeLayout.setOnTouchListener(new g());
       relativeLayout.setBackgroundColor(-16777216);
       frameLayout.addView(
           relativeLayout,
           new RelativeLayout.LayoutParams(
               WrapperFunctions.getParamFillParent(), WrapperFunctions.getParamFillParent()));
       relativeLayout.addView(this.audioplayer);
       this.audioplayer.setBackGroundLayout(relativeLayout);
       this.audioplayer.requestFocus();
       this.audioplayer.setOnKeyListener(new c());
     } else {
       this.audioplayer.setLayoutParams(new LayoutParams(1, 1));
       frameLayout.addView(this.audioplayer);
     }
     this.audioplayer.setListener(new a(playerProperties));
     this.audioplayer.play();
   }
 }
 public void playVideoImpl(Bundle bundle, Activity activity) {
   PlayerProperties playerProperties =
       (PlayerProperties) bundle.getParcelable(IMWebView.PLAYER_PROPERTIES);
   Dimensions dimensions = (Dimensions) bundle.getParcelable(IMWebView.DIMENSIONS);
   Log.debug(Constants.RENDERING_LOG_TAG, "Final dimensions: " + dimensions);
   String string = bundle.getString(IMWebView.EXPAND_URL);
   if (a(playerProperties.id, string, activity, dimensions)) {
     PlayerProperties playerProperties2;
     this.a.setBusy(true);
     if (string.length() == 0) {
       playerProperties = this.videoPlayer.getProperties();
       dimensions = this.videoPlayer.getPlayDimensions();
       this.videoPlayer.getMediaURL();
       playerProperties2 = playerProperties;
     } else {
       this.videoPlayer.setPlayData(playerProperties, string);
       this.videoPlayer.setPlayDimensions(dimensions);
       playerProperties2 = playerProperties;
     }
     if (this.videoPlayer.getState() == playerState.HIDDEN) {
       this.videoPlayer.pseudoPause = true;
       this.videoPlayer.show();
     } else {
       FrameLayout frameLayout = (FrameLayout) activity.findViewById(16908290);
       if (playerProperties2.isFullScreen()) {
         LayoutParams layoutParams =
             new RelativeLayout.LayoutParams(
                 WrapperFunctions.getParamFillParent(), WrapperFunctions.getParamFillParent());
         layoutParams.addRule(R.styleable.MapAttrs_zOrderOnTop);
         this.videoPlayer.setLayoutParams(layoutParams);
         View relativeLayout = new RelativeLayout(activity);
         relativeLayout.setOnTouchListener(new b());
         relativeLayout.setBackgroundColor(-16777216);
         frameLayout.addView(
             relativeLayout,
             new FrameLayout.LayoutParams(
                 WrapperFunctions.getParamFillParent(), WrapperFunctions.getParamFillParent()));
         relativeLayout.addView(this.videoPlayer);
         this.videoPlayer.setBackGroundLayout(relativeLayout);
         this.videoPlayer.requestFocus();
         this.videoPlayer.setOnKeyListener(new e());
       } else {
         LayoutParams layoutParams2 =
             new FrameLayout.LayoutParams(dimensions.width, dimensions.height);
         View frameLayout2 = new FrameLayout(activity);
         if (this.a.mExpandController.expandProperties == null) {
           layoutParams2.leftMargin = dimensions.x;
           layoutParams2.topMargin = dimensions.y;
         } else {
           layoutParams2.leftMargin =
               dimensions.x + this.a.mExpandController.expandProperties.currentX;
           layoutParams2.topMargin =
               dimensions.y + this.a.mExpandController.expandProperties.currentY;
         }
         layoutParams2.gravity = 3;
         this.videoPlayer.setLayoutParams(layoutParams2);
         frameLayout.addView(
             frameLayout2,
             new FrameLayout.LayoutParams(
                 WrapperFunctions.getParamFillParent(), WrapperFunctions.getParamFillParent()));
         this.videoPlayer.setBackGroundLayout(frameLayout2);
         frameLayout2.addView(this.videoPlayer);
       }
       this.videoPlayer.setListener(new f());
       this.videoPlayer.play();
     }
   }
 }