| 28 |
import mx.core.Window; |
import mx.core.Window; |
| 29 |
import mx.events.AIREvent; |
import mx.events.AIREvent; |
| 30 |
import mx.events.FlexEvent; |
import mx.events.FlexEvent; |
|
import mx.events.MetadataEvent; |
|
| 31 |
import mx.events.VideoEvent; |
import mx.events.VideoEvent; |
| 32 |
import mx.formatters.DateFormatter; |
import mx.formatters.DateFormatter; |
| 33 |
|
|
| 422 |
streamingProgressCount = 0; |
streamingProgressCount = 0; |
| 423 |
|
|
| 424 |
this.videoPlayer.label_playSourceStatus.text = "Streaming:0% "; |
this.videoPlayer.label_playSourceStatus.text = "Streaming:0% "; |
| 425 |
|
videoInfoView.connectionType = "Streaming"; |
| 426 |
streamingProgressTimer = new Timer(200); |
streamingProgressTimer = new Timer(200); |
| 427 |
streamingProgressTimer.addEventListener(TimerEvent.TIMER, streamingProgressHandler); |
streamingProgressTimer.addEventListener(TimerEvent.TIMER, streamingProgressHandler); |
| 428 |
streamingProgressTimer.start(); |
streamingProgressTimer.start(); |
| 436 |
} |
} |
| 437 |
}else{ |
}else{ |
| 438 |
this.videoPlayer.label_playSourceStatus.text = "[Local]"; |
this.videoPlayer.label_playSourceStatus.text = "[Local]"; |
| 439 |
|
videoInfoView.connectionType = "Local"; |
| 440 |
this.streamingRetryCount = 0; |
this.streamingRetryCount = 0; |
| 441 |
if(this.videoPlayer.title == null){ |
if(this.videoPlayer.title == null){ |
| 442 |
this.videoPlayer.addEventListener(FlexEvent.CREATION_COMPLETE, function():void{ |
this.videoPlayer.addEventListener(FlexEvent.CREATION_COMPLETE, function():void{ |
| 625 |
videoDisplay.setConstraintValue("right", 0); |
videoDisplay.setConstraintValue("right", 0); |
| 626 |
videoDisplay.setConstraintValue("top", 0); |
videoDisplay.setConstraintValue("top", 0); |
| 627 |
// videoDisplay.bufferTime = 3; |
// videoDisplay.bufferTime = 3; |
| 628 |
|
|
| 629 |
|
if(videoPath.length > 4 && videoPath.substr(0,4) == "http"){ |
| 630 |
|
videoInfoView.videoServerUrl = videoPath.substring(0, videoPath.lastIndexOf("/")); |
| 631 |
|
}else{ |
| 632 |
|
videoInfoView.videoServerUrl = videoPath; |
| 633 |
|
} |
| 634 |
|
videoInfoView.videoType = "FLV/MP4"; |
| 635 |
|
|
| 636 |
videoDisplay.autoPlay = autoPlay; |
videoDisplay.autoPlay = autoPlay; |
| 637 |
videoDisplay.source = videoPath; |
videoDisplay.source = videoPath; |
| 638 |
videoDisplay.autoRewind = false; |
videoDisplay.autoRewind = false; |
| 708 |
|
|
| 709 |
windowReady = true; |
windowReady = true; |
| 710 |
|
|
| 711 |
|
if(videoPath.length > 4 && videoPath.substr(0,4) == "http"){ |
| 712 |
|
videoInfoView.videoServerUrl = videoPath.substring(0, videoPath.lastIndexOf("/")); |
| 713 |
|
}else{ |
| 714 |
|
videoInfoView.videoServerUrl = videoPath; |
| 715 |
|
} |
| 716 |
|
videoInfoView.videoType = "SWF"; |
| 717 |
if(autoPlay){ |
if(autoPlay){ |
| 718 |
fLoader.load(new URLRequest(videoPath)); |
fLoader.load(new URLRequest(videoPath)); |
| 719 |
} |
} |
| 3323 |
public function playMovie(url:String, playList:PlayList = null, playListIndex:int = -1, videoTitle:String = "", isEconomy:Boolean = false):void{ |
public function playMovie(url:String, playList:PlayList = null, playListIndex:int = -1, videoTitle:String = "", isEconomy:Boolean = false):void{ |
| 3324 |
|
|
| 3325 |
try{ |
try{ |
| 3326 |
|
|
| 3327 |
|
if(videoInfoView != null){ |
| 3328 |
|
videoInfoView.videoServerUrl = "-"; |
| 3329 |
|
videoInfoView.connectionType = "-"; |
| 3330 |
|
videoInfoView.videoType = "-"; |
| 3331 |
|
videoInfoView.messageServerUrl = "-"; |
| 3332 |
|
} |
| 3333 |
|
|
| 3334 |
try{ |
try{ |
| 3335 |
if(nicoVideoPageGetRetryTimer != null){ |
if(nicoVideoPageGetRetryTimer != null){ |
| 3336 |
nicoVideoPageGetRetryTimer.stop(); |
nicoVideoPageGetRetryTimer.stop(); |