Flowplayer set start time of a .flv video from Amazon S3

和自甴很熟 提交于 2019-12-23 02:26:09

问题


What I have so far:

When I open a jquery dialog, a Flowplayer in that dialog box starts autoplaying and autobuffering a url from s3.

What I need:

I have a time variable(let's say 300 seconds). When I open that dialog box I want the video to start from 300.second (autoplay and autobuffer on.). I want to do this in any way i.e in html if flowplayer supports it or in javascript. The way does not matter. Do you know how I can accomplish it?

When I use script code like:

clip: { 
    onStart: function () {
        this.seek(300);
    }
}

it can only seek to the end of the buffered time at that point i.e to around 20 seconds at most, which is of course natural.

Is there ANY way to do this?

Thanks.


回答1:


I found my answer.

Since flowplayer does not internally support psuedostreaming we need to use CloudFront which enables us to stream videos. There is a good tutorial about this in aws documentation but I hardly found it so I provide the link below.

http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/TutorialStreamingFlowplayer.html

Generally, what you need to do is create a rtmp server and a web server and host your videos through that rtmp server. By this way, you can jump to any time you want even if its not streamed yet, and start your video at any time you want. In flowplayer you do this with seek function i.e:

clip: { 
    onStart: function () {
        this.seek(300);
    }
}

At the left panel, you can find the same tutorials for FlowPlayer, JW Player, Adobe Flash Player etc.

I hope it helps someone with my problem.



来源:https://stackoverflow.com/questions/22174112/flowplayer-set-start-time-of-a-flv-video-from-amazon-s3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!