Develop and Download Open Source Software

Browse Subversion Repository

Diff of /NNDDv2/trunk/src/org/mineap/nndd/player/PlayerController.as

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 797 by mineap, Sun Apr 29 10:38:52 2012 UTC revision 799 by mineap, Tue May 1 05:55:35 2012 UTC
# Line 160  package org.mineap.nndd.player Line 160  package org.mineap.nndd.player
160                  public static const NICO_WARI_HEIGHT:int = 56;                  public static const NICO_WARI_HEIGHT:int = 56;
161                  public static const NICO_WARI_WIDTH:int = 544;                  public static const NICO_WARI_WIDTH:int = 544;
162                                    
163                  public static const NICO_SWF_HEIGHT:int = 384;                  public static const NICO_SWF_HEIGHT:int = 368;
164                  public static const NICO_SWF_WIDTH:int = 512;                  public static const NICO_SWF_WIDTH:int = 512;
165                                    
166                  public static const NICO_VIDEO_WINDOW_HEIGHT:int = 384;                  // 640×368
167                    public static const NICO_VIDEO_WINDOW_HEIGHT:int = 368;
168                  public static const NICO_VIDEO_WINDOW_WIDTH:int = 512;                  public static const NICO_VIDEO_WINDOW_WIDTH:int = 512;
169                  public static const NICO_VIDEO_WINDOW_WIDTH_WIDE_MODE:int = 640;                  public static const NICO_VIDEO_WINDOW_WIDTH_WIDE_MODE:int = 640;
170                                    
171                    // 864×486
172                    public static const NICO_VIDEO_NEW_WINDOW_WIDTH_WIDE_MODE:int = 864
173                    public static const NICO_VIDEO_NEW_WINDOW_WIDTH:int = 654;
174                    public static const NICO_VIDEO_NEW_WINDOW_HEIGHT:int = 486;
175                            
176                  public static const NICO_VIDEO_PADDING:int = 10;                  public static const NICO_VIDEO_PADDING:int = 10;
177                                    
178                  public static const WIDE_MODE_ASPECT_RATIO:Number = 1.7;                  public static const WIDE_MODE_ASPECT_RATIO:Number = 1.7;
# Line 206  package org.mineap.nndd.player Line 212  package org.mineap.nndd.player
212                                    
213                  private var _isLengthwisePreferred:Boolean = true;                  private var _isLengthwisePreferred:Boolean = true;
214                                    
215                    /** 新サイズ 864×486ピクセル 旧サイズ 640×368ピクセル */
216                    private var _useOldVersionVideoSize:Boolean = false;
217                    
218                  [Embed(source="/player/NNDDicons_play_20x20.png")]                  [Embed(source="/player/NNDDicons_play_20x20.png")]
219          private var icon_Play:Class;          private var icon_Play:Class;
220                                    
# Line 1279  package org.mineap.nndd.player Line 1288  package org.mineap.nndd.player
1288                  }                  }
1289                                    
1290                  /**                  /**
1291                     *
1292                     * @param bool
1293                     *
1294                     */
1295                    public function isUseOldVersionVideoSize(bool:Boolean):void
1296                    {
1297                            this._useOldVersionVideoSize = bool;
1298                    }
1299                    
1300                    
1301                    /**
1302                   * videoDisplayの大きさを動画にあわせ、同時にウィンドウの大きさを変更します。                   * videoDisplayの大きさを動画にあわせ、同時にウィンドウの大きさを変更します。
1303                   * フルスクリーン時に呼ばれても何もしません。                   * フルスクリーン時に呼ばれても何もしません。
1304                   */                               */            
# Line 1291  package org.mineap.nndd.player Line 1311  package org.mineap.nndd.player
1311                                  }                                  }
1312                                                                    
1313                                  //再生窓の既定の大きさ                                  //再生窓の既定の大きさ
1314                                  var videoWindowHeight:int = PlayerController.NICO_VIDEO_WINDOW_HEIGHT * ratio;                                  var videoWindowHeight:int;
1315                                  var videoWindowWidth:int = PlayerController.NICO_VIDEO_WINDOW_WIDTH * ratio;                                  var videoWindowWidth:int;
1316                                            
1317                                    if (_useOldVersionVideoSize)
1318                                    {
1319                                            videoWindowHeight = PlayerController.NICO_VIDEO_WINDOW_HEIGHT * ratio;
1320                                            videoWindowWidth = PlayerController.NICO_VIDEO_WINDOW_WIDTH * ratio;
1321                                    }else
1322                                    {
1323                                            videoWindowHeight = PlayerController.NICO_VIDEO_NEW_WINDOW_HEIGHT * ratio;
1324                                            videoWindowWidth = PlayerController.NICO_VIDEO_NEW_WINDOW_WIDTH_WIDE_MODE * ratio;
1325                                    }                              
1326                                                                    
1327                                  //ニコ割窓の既定の大きさ                                  //ニコ割窓の既定の大きさ
1328                                  var nicowariWindowHeight:int = PlayerController.NICO_WARI_HEIGHT * ratio;                                  var nicowariWindowHeight:int = PlayerController.NICO_WARI_HEIGHT * ratio;
# Line 1326  package org.mineap.nndd.player Line 1356  package org.mineap.nndd.player
1356                                                                          trace("enable 16:9 mode");                                                                          trace("enable 16:9 mode");
1357                                                                  }                                                                  }
1358                                                                                                                                    
1359                                                                  videoWindowHeight = PlayerController.NICO_VIDEO_WINDOW_HEIGHT * ratio;                                                                  
1360                                                                  if(this.videoInfoView.isEnableWideMode && isWideVideo){                                                                  if (_useOldVersionVideoSize)
1361  //                                                                      logManager.addLog("ワイド(16:9)モード");                                                                  {
1362                                                                          videoWindowWidth = (PlayerController.NICO_VIDEO_WINDOW_WIDTH_WIDE_MODE + PlayerController.NICO_VIDEO_PADDING*2) * ratio;                                                                          videoWindowHeight = PlayerController.NICO_VIDEO_WINDOW_HEIGHT * ratio;
1363                                                                  }else{                                                                          if(this.videoInfoView.isEnableWideMode && isWideVideo){
1364  //                                                                      logManager.addLog("ノーマル(4:3)モード");                                                                                  videoWindowWidth = (PlayerController.NICO_VIDEO_WINDOW_WIDTH_WIDE_MODE + PlayerController.NICO_VIDEO_PADDING*2) * ratio;
1365                                                                          videoWindowWidth = (PlayerController.NICO_VIDEO_WINDOW_WIDTH + PlayerController.NICO_VIDEO_PADDING*2) * ratio;                                                                          }else{
1366                                                                                    videoWindowWidth = (PlayerController.NICO_VIDEO_WINDOW_WIDTH + PlayerController.NICO_VIDEO_PADDING*2) * ratio;
1367                                                                            }
1368                                                                    }
1369                                                                    else
1370                                                                    {
1371                                                                            videoWindowHeight = PlayerController.NICO_VIDEO_NEW_WINDOW_HEIGHT * ratio;
1372                                                                            if(this.videoInfoView.isEnableWideMode && isWideVideo){
1373                                                                                    videoWindowWidth = (PlayerController.NICO_VIDEO_NEW_WINDOW_WIDTH_WIDE_MODE + PlayerController.NICO_VIDEO_PADDING*2) * ratio;
1374                                                                            }else{
1375                                                                                    videoWindowWidth = (PlayerController.NICO_VIDEO_NEW_WINDOW_WIDTH + PlayerController.NICO_VIDEO_PADDING*2) * ratio;
1376                                                                            }
1377                                                                  }                                                                  }
1378                                                                                                                                    
1379                                                                  //動画そのものはセンターに表示                                                                  //動画そのものはセンターに表示
# Line 1356  package org.mineap.nndd.player Line 1397  package org.mineap.nndd.player
1397                                                                                                                                    
1398                                                                  //動画の大きさにウィンドウの大きさを合わせるとき(videoHeightが0の時は動画がまだ読み込まれていないのでスキップ)                                                                  //動画の大きさにウィンドウの大きさを合わせるとき(videoHeightが0の時は動画がまだ読み込まれていないのでスキップ)
1399                                                                                                                                    
1400                                                                  videoWindowHeight = this.videoDisplay.videoObject.videoHeight * ratio;                                                                  videoWindowHeight = (this.videoDisplay.videoObject.videoHeight + PlayerController.NICO_VIDEO_PADDING*2) * ratio;
1401                                                                  videoWindowWidth = this.videoDisplay.videoObject.videoWidth * ratio;                                                                  videoWindowWidth = (this.videoDisplay.videoObject.videoWidth + PlayerController.NICO_VIDEO_PADDING*2) * ratio;
1402                                                                                                                                    
1403                                                                  this.videoDisplay.setConstraintValue("bottom", 0);                                                                  this.videoDisplay.setConstraintValue("bottom", 0);
1404                                                                  this.videoDisplay.setConstraintValue("left", 0);                                                                  this.videoDisplay.setConstraintValue("left", 0);
# Line 1381  package org.mineap.nndd.player Line 1422  package org.mineap.nndd.player
1422                                                          //SWF再生か?                                                          //SWF再生か?
1423                                                                                                                    
1424                                                          //SWFの場合は一律でサイズを固定                                                          //SWFの場合は一律でサイズを固定
1425                                                          videoWindowHeight = PlayerController.NICO_VIDEO_WINDOW_HEIGHT * ratio;                                                          if (_useOldVersionVideoSize)
1426                                                          videoWindowWidth = PlayerController.NICO_VIDEO_WINDOW_WIDTH * ratio;                                                          {
1427                                                                    videoWindowHeight = PlayerController.NICO_VIDEO_WINDOW_HEIGHT * ratio;
1428                                                                    videoWindowWidth = PlayerController.NICO_VIDEO_WINDOW_WIDTH * ratio;
1429                                                            }
1430                                                            else
1431                                                            {
1432                                                                    videoWindowHeight = PlayerController.NICO_VIDEO_NEW_WINDOW_HEIGHT * ratio;
1433                                                                    videoWindowWidth = PlayerController.NICO_VIDEO_NEW_WINDOW_WIDTH * ratio;
1434                                                            }
1435                                                                                                                    
1436                                                  }                                                  }
1437                                                                                                    
# Line 1392  package org.mineap.nndd.player Line 1441  package org.mineap.nndd.player
1441                                                  if(videoPlayer.canvas_nicowari.height < 1 ){                                                  if(videoPlayer.canvas_nicowari.height < 1 ){
1442                                                          //ニコ割領域が表示されていなければ、その文余分に高さを設定                                                          //ニコ割領域が表示されていなければ、その文余分に高さを設定
1443                                                          videoWindowHeight += int(videoWindowWidth / rate);                                                          videoWindowHeight += int(videoWindowWidth / rate);
1444                                                            videoWindowHeight += 20;
1445                                                  }                                                  }
1446                                                                                                    
1447                                                  this.videoPlayer.nativeWindow.height += int(videoWindowHeight - this.videoPlayer.canvas_video_back.height);                                                  this.videoPlayer.nativeWindow.height += int(videoWindowHeight - this.videoPlayer.canvas_video_back.height);

Legend:
Removed from v.797  
changed lines
  Added in v.799

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26