Flashvideo-Player

wenco

Erfahrenes Mitglied
Hallo,
ich suche einen flv-Player für meine Internetseite.

Ich finde zwar eine Menge Angebote, aber keinen Player, der beides kann:
Vollbild und Playlist (Link oder Bild)

...perfekt wäre noch Untertiteleinbindung....

Ist soetwas bekannt?

Danke!
 
Hi,

schreib dir doch selbst einen..

Ist doch viel lustiger und dann weisst du wenigstens was du hast ;-)

Ich habe meinen ungefähr so geschrieben und der funktioniert super..

Code:
// Imports
	import flash.media.*;
	import caurina.transitions.*;
	import caurina.transitions.properties.FilterShortcuts;
.
.
.
// Klassenvariablen
	private var st:SoundTransform = null; // Soundsteuerung wie Lautstärke
	var videoMC:MovieClip = new MovieClip(); // MovieClip für das Video
	private var video:Video = null; // Das Video Objekt
	private var nc:NetConnection = new NetConnection(); 
	private var ns:NetStream = null;
	private var bFullscreen:Boolean = false;
.
.
.
// Im Konstruktor 
	video = new Video(vWidth, vHeight);
	videoMC.addChild(video);
	videoMC.addEventListener(MouseEvent.CLICK, onVideoClick);

	this.addChild(videoMC);

// Funktion zum abspielen eines Flash-Videos:
private function playVideo(url:String):void {
	nc.connect(null);
	ns = new NetStream(nc);
	st = new SoundTransform(volume/100);
	ns.soundTransform = st;
	ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);
		
	video.attachNetStream(ns);
	ns.client = this;
	ns.play(url);
}

// Handler, der auf das Ende des Videos reagiert
public function onStatusEvent(stats:NetStatusEvent):void {
	if( stats.info.code == "NetStream.Play.Stop" ) {
		// Video ist zu Ende
	}
}

// Lautstärke verändern
public override function updateVolume(volume:Number):void {
	st = new SoundTransform(volume);
	ns.soundTransform = st;
}

// Bei einem Click auf das Video Fullscreen oder halt net

public function onVideoClick(e:Event):void {
	if ( bIsFullscreen == false ) {
		Tweener.addTween(videoMC, {x:fsX,y:fsY, width:fsWidth, height:fsHeight, time:1, transition:"easeInOutSine"});
	} 
	else {
		Tweener.addTween(videoMC, {x:normX,y:normY + 190 - video.height/2, width:normWidth, height:normHeight, time:1, transition:"easeInOutSine"});
	}
	bIsFullscreen = !bIsFullscreen;
}

// Handler, der aufgerufen wird, wenn das Video geladen wurde
// Hier kannst du das Seitenverhältnis des Videos erfragen und entsprechend deine Fullscreenwerte setzen

public function onMetaData(meta:Object):void {
	var bGotDims = true;
	var ratio:Number = 0;
	if( !meta.width || !meta.height ) {
		bGotDims = false;
	}
	else {
		ratio = meta.width/meta.height;
	}
	
	if( ratio == 0 ) {
		video.width = vWidth;
		video.height= vHeight;
	}
	else if ( ratio > videoRatio ) {
		// Breite zaehlt
		video.width = vWidth;
		video.height= vWidth/ratio;
	} else {
		// Höhe zählt
		video.height = vHeight;
		video.width = vHeight*ratio;
	}
	if( ratio == 0 ) {
		fsWidth = 1024;
		fsHeight = 626;
	}
	else if ( ratio > fsRatio ) {
		// Breite zaehlt
		fsWidth = 1024;
		fsHeight = 1024/ratio;
	} else {
		// Höhe zählt
		fsHeight = 626;
		fsWidth = 626*ratio;
	}
			
	normWidth = video.width;
	normHeight= video.height;

	fsX = 512 - fsWidth / 2;
	fsY = 313 - fsHeight / 2;

	videoMC.x = normX;
	videoMC.y = (normY + 190) - video.height/2;
}

Ich denke, dass sollte dir helfen, dir einen Video-Player zu schreiben der deinen Anforderungen genügt.

Viel Spaß...

Pit
 
UPS...

In dem Forum gehts ja gar net um Programmierung ...

Egal, vielleicht kann ja jemand anders was damit anfangen ;-)

Pit
 
...wird mit Sicherheit SEHR lustig wenn ich das selber mache! :)
Kann kein Action Script usw. kann höchstens paar billige Animationen in Flash...

Ich habe übrigens jetzt auch ein paar Angebote gefunden, größtenteils kostenplichtig. Zum Beispiel hier:

http://www.flashcomponents.net/

Trotzdem Danke!
 

Neue Beiträge

Zurück