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 799 by mineap, Tue May 1 05:55:35 2012 UTC revision 807 by mineap, Tue May 1 17:58:22 2012 UTC
# Line 561  package org.mineap.nndd.player Line 561  package org.mineap.nndd.player
561                   */                   */
562                  private function initStart(videoPath:String, thumbInfoPath:String, autoPlay:Boolean):void                  private function initStart(videoPath:String, thumbInfoPath:String, autoPlay:Boolean):void
563                  {                  {
564                          trace(videoPlayer.stage.quality);  //                      trace(videoPlayer.stage.quality);
565                                                    
566                          try{                          try{
567                                  if(_isEconomyMode){                                  if(_isEconomyMode){
# Line 1377  package org.mineap.nndd.player Line 1377  package org.mineap.nndd.player
1377                                                                  }                                                                  }
1378                                                                                                                                    
1379                                                                  //動画そのものはセンターに表示                                                                  //動画そのものはセンターに表示
1380                                                                  this.videoDisplay.setConstraintValue("left", PlayerController.NICO_VIDEO_PADDING);                                                                  this.videoDisplay.setConstraintValue("bottom", 0);
1381                                                                  this.videoDisplay.setConstraintValue("right", PlayerController.NICO_VIDEO_PADDING);                                                                  this.videoDisplay.setConstraintValue("left", NICO_VIDEO_PADDING);
1382                                                                    this.videoDisplay.setConstraintValue("right", NICO_VIDEO_PADDING);
1383                                                                    this.videoDisplay.setConstraintValue("top", 0);
1384                                                                                                                                    
1385                                                                  trace(videoDisplay.width + "," + videoDisplay.height);                                                                  trace(videoDisplay.width + "," + videoDisplay.height);
1386                                                                                                                                    
# Line 1397  package org.mineap.nndd.player Line 1399  package org.mineap.nndd.player
1399                                                                                                                                    
1400                                                                  //動画の大きさにウィンドウの大きさを合わせるとき(videoHeightが0の時は動画がまだ読み込まれていないのでスキップ)                                                                  //動画の大きさにウィンドウの大きさを合わせるとき(videoHeightが0の時は動画がまだ読み込まれていないのでスキップ)
1401                                                                                                                                    
1402                                                                  videoWindowHeight = (this.videoDisplay.videoObject.videoHeight + PlayerController.NICO_VIDEO_PADDING*2) * ratio;                                                                  videoWindowHeight = (this.videoDisplay.videoObject.videoHeight * ratio) + PlayerController.NICO_VIDEO_PADDING*2;
1403                                                                  videoWindowWidth = (this.videoDisplay.videoObject.videoWidth + PlayerController.NICO_VIDEO_PADDING*2) * ratio;                                                                  videoWindowWidth = (this.videoDisplay.videoObject.videoWidth * ratio) + PlayerController.NICO_VIDEO_PADDING*2;
1404                                                                                                                                    
1405                                                                  this.videoDisplay.setConstraintValue("bottom", 0);                                                                  this.videoDisplay.setConstraintValue("bottom", NICO_VIDEO_PADDING);
1406                                                                  this.videoDisplay.setConstraintValue("left", 0);                                                                  this.videoDisplay.setConstraintValue("left", NICO_VIDEO_PADDING);
1407                                                                  this.videoDisplay.setConstraintValue("right", 0);                                                                  this.videoDisplay.setConstraintValue("right", NICO_VIDEO_PADDING);
1408                                                                  this.videoDisplay.setConstraintValue("top", 0);                                                                  this.videoDisplay.setConstraintValue("top", NICO_VIDEO_PADDING);
1409                                                                                                                                    
1410                                                                  if(videoDisplay.hasEventListener(LoadEvent.BYTES_LOADED_CHANGE)){                                                                  if(videoDisplay.hasEventListener(LoadEvent.BYTES_LOADED_CHANGE)){
1411                                                                          //init後の初回の大きさ合わせが出来れば良いので以降のシークでは呼ばれないようにする                                                                          //init後の初回の大きさ合わせが出来れば良いので以降のシークでは呼ばれないようにする
# Line 1435  package org.mineap.nndd.player Line 1437  package org.mineap.nndd.player
1437                                                                                                                    
1438                                                  }                                                  }
1439                                                                                                    
                                                 //TODO 設定されたVideoDisplayの大きさに基づいてニコ割領域の大きさを決定  
                                                   
                                                 var rate:Number = PlayerController.NICO_WARI_WIDTH / PlayerController.NICO_WARI_HEIGHT;  
1440                                                  if(videoPlayer.canvas_nicowari.height < 1 ){                                                  if(videoPlayer.canvas_nicowari.height < 1 ){
1441                                                          //ニコ割領域が表示されていなければ、その文余分に高さを設定                                                          //ニコ割領域が表示されていなければ、その文余分に高さを設定
1442                                                          videoWindowHeight += int(videoWindowWidth / rate);                                                          videoWindowHeight += (NICO_WARI_HEIGHT + NICO_VIDEO_PADDING);
1443                                                          videoWindowHeight += 20;                                                  }else
1444                                                    {
1445                                                            videoWindowHeight += NICO_VIDEO_PADDING;
1446                                                  }                                                  }
1447                                                                                                    
1448                                                  this.videoPlayer.nativeWindow.height += int(videoWindowHeight - this.videoPlayer.canvas_video_back.height);                                                  this.videoPlayer.nativeWindow.height += int(videoWindowHeight - this.videoPlayer.canvas_video_back.height);
# Line 1492  package org.mineap.nndd.player Line 1493  package org.mineap.nndd.player
1493                                                  }                                                  }
1494                                          }                                          }
1495                                  }                                  }
1496                                    
1497                                    updateVideoStatus();
1498                                                    
1499                          }catch(error:Error){    //ウィンドウが閉じられた後に呼ばれるとエラー。停止処理を行う。                          }catch(error:Error){    //ウィンドウが閉じられた後に呼ばれるとエラー。停止処理を行う。
1500                                  trace(error.getStackTrace());                                  trace(error.getStackTrace());
# Line 2251  package org.mineap.nndd.player Line 2254  package org.mineap.nndd.player
2254                                  if (videoDisplay.videoObject != null)                                  if (videoDisplay.videoObject != null)
2255                                  {                                  {
2256                                          videoInfoView.format = videoDisplay.videoObject.videoWidth + " × " + videoDisplay.videoObject.videoHeight;                                          videoInfoView.format = videoDisplay.videoObject.videoWidth + " × " + videoDisplay.videoObject.videoHeight;
2257                                            videoInfoView.currentWindowSize = videoDisplay.videoObject.width + " × " + videoDisplay.videoObject.height;
2258                                  }                                  }
2259                                  else                                  else
2260                                  {                                  {
2261                                          videoInfoView.format = "-";                                          videoInfoView.format = "-";
2262                                            videoInfoView.currentWindowSize = "-";
2263                                  }                                  }
2264                                                                    
                                 videoInfoView.currentWindowSize = videoDisplay.width + " × " + videoDisplay.height;  
                                   
2265                                  videoInfoView.videoSize = formatter.format( (videoDisplay.bytesTotal / (1024 * 1024)) )  + " MB";                                  videoInfoView.videoSize = formatter.format( (videoDisplay.bytesTotal / (1024 * 1024)) )  + " MB";
2266                          }                          }
2267                          else if (loader != null)                          else if (loader != null)

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

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