Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

closed issue #16 plus some code updates

  • Loading branch information...
commit c8522ea53c4bc44effaa8543d1b43ed74b854555 1 parent 774f672
@FlashJunior FlashJunior authored
View
BIN  player.swf
Binary file not shown
View
3  src/OSFlashVideoPlayer.as
@@ -117,7 +117,8 @@ package {
!videoSrc ? videoSrc = "http://www.flashjunior.ch/archiv/flvplayer/movies/kuga.mp4" : videoSrc = videoSrc;
//TEST flv !videoSrc ? videoSrc = "http://www.flashjunior.ch/archiv/flvplayer/movies/sad.flv" : videoSrc = videoSrc;
//TEST youtube 1 !videoSrc ? videoSrc = "http://www.youtube.com/watch?v=YFa59lK-kpo" : videoSrc = videoSrc;
- //TEST youtube 1 !videoSrc ? videoSrc = "http://www.youtube.com/v/XrPNl_gZlvY" : videoSrc = videoSrc;
+ //TEST youtube 2 !videoSrc ? videoSrc = "http://www.youtube.com/v/XrPNl_gZlvY" : videoSrc = videoSrc;
+ //TEST youtube 3 !videoSrc ? videoSrc = "http://www.youtube.com/v/XrPNl_gZlvYYYYYY" : videoSrc = videoSrc;
//TEST vimeo 1 !videoSrc ? videoSrc = "http://vimeo.com/7917744" : videoSrc = videoSrc;
//TEST vimeo 2 !videoSrc ? videoSrc = "http://www.vimeo.com/3740633" : videoSrc = videoSrc;
View
BIN  src/OSFlashVideoPlayer.fla
Binary file not shown
View
23 src/com/fj/video/VideoPlayer.as
@@ -18,6 +18,8 @@ package com.fj.video {
* http://www.abdulhalimkara.com/
*
\* ****************************************************** */
+ import de.derhess.video.youtube.YouTubeError;
+
import flash.events.SecurityErrorEvent;
import flash.events.AsyncErrorEvent;
@@ -178,6 +180,7 @@ package com.fj.video {
youTubePlayer = new FlashYouTube();
youTubePlayer.addEventListener(YouTubeEvent.PLAYER_LOADED, youtubeHandlePlayerLoaded);
youTubePlayer.addEventListener(YouTubeEvent.STATUS, youtubeHandlePlayingState);
+ youTubePlayer.addEventListener(YouTubeEvent.ERROR, youtubeHandleError);
video_mc.addChild(youTubePlayer);
@@ -812,7 +815,7 @@ package com.fj.video {
break;
default :
setCTRLBtnOutState(MovieClip(e.currentTarget));
- }
+ }
}
@@ -838,6 +841,24 @@ package com.fj.video {
showError("asyncErrorHandler: " + e.text);
}
+ private function youtubeHandleError(event:YouTubeEvent):void{
+ var message:String = "";
+ switch(event.errorCode){
+ case YouTubeError.VIDEO_NOT_FOUND:
+ message = "YouTube Video not found ("+event.errorCode+")";
+ break;
+ case YouTubeError.VIDEO_NOT_ALLOWED:
+ message = "YouTube Video not allowed ("+event.errorCode+")";
+ break;
+ case YouTubeError.EMBEDDING_NOT_ALLOWED:
+ message = "YouTube Embedding not allowed ("+event.errorCode+")";
+ break;     
+ default:
+ message = "YouTube Error ("+event.errorCode+")";
+ break;
+ }
+ showError(message);
+ }
/*
* youtube actions
Please sign in to comment.
Something went wrong with that request. Please try again.