FLVPlayback won't seek when streaming from flash media server. How to fix? - actionscript-3

I have a simple video player set up that streams from a flash media server. The video plays fine, but the majority of the seek commands send it back to the first frame of the video. If I don't use flash media server it will seek to any point which has already been loaded.
Any ideas what could cause this?

Try and download jw player from here http://www.longtailvideo.com/players/jw-flv-player/ and test if it works with that player. The problem could lay with the streaming server.
the majority of the seek commands send
it back to the first frame
What happens with the rest? - Do they work or does nothing happen?

The problem was I was checking the FLVPlayback playing property to see if I wanted to call play after the seek (The video didn't auto-play, and I wanted it to play if you seeked). The playing property however is set to false after a seek call till it is done seeking apparently. This resulted in play being called every time, which reset the playhead to the start.

Related

HTML5 Video element does not a resume live streaming when a stream is interrupted then restarts

I'm using JW Player to live stream content onto a web page. The player is backed by an open-source library called cine.io.
My issue is that the player falls back to an HTML 5 video element for all mobile web, both on iPhone and Android. There are some differences between the flash solution of JW Player and HTML5 - notably that if a live stream starts, then stops, then restarts, the video element will not pick up the restarted stream.
This is a problem since streams often drop in and out - and the flash solution does pick up the restarted stream.
I tested a bunch of listener methods on the video and the only one that signalled that the stream had ended was a "time update" listener:
$video.on('timeupdate', function(){
//Do something
});
However none of my attempts to re-open the stream have been effective.
Is this even possible? Can anyone provide pointers?
Would an example like this work?
http://support.jwplayer.com/customer/portal/articles/1442607-example-a-custom-error-message

Play HTML5 Audio immediately without waiting for the entire buffering to complete?

I have a very fast connection and it takes about 2-3 seconds before the song actually starts playing. It's a relatively average 128kbps MP3 size (3mb-4mb). I have set preload="auto" but that didn't help much. Is there a way to just start playing the audio right away and continue to buffer it (sort of like YouTube does)?
Here is an example that I am currently working on. It's going to play an audio simultaneously on all connected clients. So if you have 2+ laptops, you can try it out. All computers must be connected before you start playing the audio. (double click on a song to start playing).
Running video and audio without complete buffering is called smooth / adaptive streaming. It can be achieved in players like silverlight and flash.
What it actually does is to create chunks of files and let the user play file chunk by chunk. Since you are downloading chunks, it will not require whole file to download.
Well, I am not giving you the full fledged answer since I haven't studied much but I am giving you the exact idea of how it works.
I had same issue but with HTML5 Video.. I overcame it with using Smooth streaming media Azure..
Here is a tutorial of the same : http://www.wrapcode.com/featured/windows-azure-media-services-mp4-to-smooth-streaming/
I will keep you updated once I find something useful :-)
If you use preload=none, then you have no buffer at the beginning but it will buffer your content "on the fly"
I have an Icecast server which streamsmy contet, and when I use pause and play, it buffers my content, even with preload=none.
Do not use preload=auto. It will take some time to start.

How to force the NetStream to create a keyframe?

I created a video stream recording application that works fine except the recorded FLVs are corrupt a little bit. :) If I open an FLV in VLC player everything is green but getting "clean" when changes occur. And especially at the beginning of the video is breaking up. (I use Red5 1.0)
For pre-recorded streams, the keyframes are already encoded into the file and they cannot be changed. If you're serving a live stream, the keyframes need to be set in the application that is encoding the live stream (for example, Flash Media Live Encoder).

Sound from previous position playing before playback continues from specified position in html audio tag

I am making a HTML5/javascript browser game and I have problems with my audio.
I have all my clips in a single mp3 file to minmize the number of requests sent and when I want to play a clip I seek to the clips starting position (audio.currentTime = startTime) and play (audio.play()) when the audio tag fires the "seeked" event via an event listner.
When I pause playback I use the audio.pause() method.
The problem I have is that, before the sound I want to play starts, a split second of the file is played from where the audio was playing before the seek.
Anyone else that has encountered this problem?
Anyone know what to do about it?
If you're using Safari, this might be your problem.
Also, I'm finding that Web Audio API is looking more and more appealing (see my possible answer to my own question, haha)
Edit:
Lastly, if you want to stick with the whole HTML5 Audio object, this question might point you in a different direction.

FLV's not caching

working on a project with a custom flv player.
Everything works as it should
However, the flv's don't seem to be caching, if I play the video once, close the player, and replay again, the video has to cache -load entirely again before the video starts playing.
Can anyone suggest troubleshooting steps since, as far as i know, this should not be the way it works...
As spender mentioned, if you are not loading the flv via http, then caching does not apply.
You might want to check out Greensock's LoaderMax, as it provides highly configurable and easy-to-use video playback functionality which has ironed out many of the kinks in Adobe's own video player classes:
http://www.greensock.com/loadermax