PDA

View Full Version : Custom FLV player



BetaWar
June 4th, 2007, 01:46 AM
Okay, well I have recently finished (for now) my project of creating a FLV player (from scratch) now I would love for people to try it out (it is currently set to play only the single movie but will eventually be dynamic movies like what youTube has going). Any thoughts, help, hints, tips, tricks, comments, suggestions, or other relevant posts are welcome (including how you like it etc.)
Here is a link:
http://www.reigninggames.com/tests/ajax/first_videoUI.html

Pasquale
June 4th, 2007, 05:22 AM
Oh dude. A frame by frame function would be dope for animators :P

hybrid101
June 4th, 2007, 08:47 AM
it seriously reminds me of the youtube player:D

simplistik
June 4th, 2007, 09:18 AM
change the skin... looks generic
buffer bar
would be nice if the movie didn't reset when you toggled the mute
volume control

BetaWar
June 4th, 2007, 10:03 AM
Okay, simplistik I have a quick question... How hard is it, or is it possible to control a netstream's volume levels? I seem to be having troubles whenever I attempt to do it... Is there a specific function needed to use?

THanks for th ecomments guys. I will continue to update.

simplistik
June 4th, 2007, 11:03 AM
I honestly can't tell you the answer to that. We just recently created our own FLV player as well where I work too, cause we found the Flash one to be extremely bloated for what it does... but it was one of the other guys who did it. I can't imagine it's to hard though, Adobe/Macromedia has pretty good documentation on those functions as well as dev center things that can help too. With a quick google search on: flash 8 netstream volume slider

http://www.adobe.com/devnet/flash/articles/live_video_switcher_03.html

was the first result... it may help

sekasi
June 4th, 2007, 12:49 PM
You just have to create a sound object and route the sound from the flv to that object .. and then adjust the volume levels.

its real easy.

And yeah, do a frame by frame option.. thats pretty cool. I could help you out with that if you should get stuck too :)

evildrummer
June 4th, 2007, 01:08 PM
Needs buffer bar + everything everyone else said.

And maybe make the the theme better looking

BetaWar
June 4th, 2007, 06:07 PM
Okay, I have updated it again. It now has a buffer bar, which I believe it working, I am also in the process of working on getting the volume bar updated, at the moment I have fixed the resetting problem when toggling the mute. The link is the same as before (as is the movie):
http://www.reigninggames.com/tests/ajax/first_videoUI.html

BlueEyedMonster
June 4th, 2007, 07:49 PM
I just did the whole volume flv control for this (http://www.breeo.com) site.

To do volume control this was the code I used:



// set up the Video and Audio streams
var clipholder:Video;
var my_nc:NetConnection = new NetConnection();
my_nc.connect(null);
var clip_stream:NetStream = new NetStream(my_nc);
clip_stream.setBufferTime(6);
tv.clipholder.attachVideo(clip_stream);
this.createEmptyMovieClip("flv_mc", this.getNextHighestDepth());
flv_mc.attachAudio(clip_stream);
var audio_sound:Sound = new Sound(flv_mc);


remote.volumnbttns.mute.onRelease = function () {
muteClip();
}

function muteClip(){
if (audio_sound.getVolume() == 0) {
audio_sound.setVolume(50);
updateVolume();
} else {
audio_sound.setVolume(0);
updateVolume();
}
}

// Volume buttons.
remote.volumnbttns.increase.onPress = function() {
if (audio_sound.getVolume()<100) {
audio_sound.setVolume(audio_sound.getVolume()+10);
updateVolume();
}
}
remote.volumnbttns.decrease.onPress = function() {
if (audio_sound.getVolume()>0) {
audio_sound.setVolume(audio_sound.getVolume()-10);
updateVolume();
}
}





Edit: Holy crap A.S. code gets screwed up when you try to edit a post.

BetaWar
June 5th, 2007, 06:14 PM
Okay, I have made some more updates since my previous post, I still can't get one thing to work, but other than that, it all seems to work out.

I had to add an extra, smaller menu to the whole thing to get enough room for some other the requests (addons) but it is up now.

The only problem that I am having it with the frame by frame function, does anyone know how to manipulate netstream's frames (or what frame it is on at a given time) but only move it like one frame at a time?

Same link, and movie:
http://www.reigninggames.com/tests/ajax/first_videoUI.html