简体   繁体   中英

how to make live video streaming and some controlls on it

I have developed a php website for an e-learning system, l want to stream live sessions on it so only my users can access and show it, in addition, I want to control how many minutes can users watch the video depend on there balance (for example if user has one dollar in his balance he can watch 10 minutes of a video session, when his minutes finished he will can not watch the video any more).

so guys please help me because I do not know where I can start to solve this problem.

thank you

I don't think this is possible with just PHP alone. The flash play has to support some sort of function where it can pull the balance every few seconds.

If you find a flash player that supports something like this then it would be pretty easy to implement the PHP as it would just need to poll the database for the users balance.

You might be able to set the streaming link to a PHP file and depending on how the clients flash player loads the video you could impose limits.

On another note, why not just let them finish the video they are watching? Imposing limits like this would stop your users from learning..

-- Just read though your message again and not sure if the latter will work with live streaming sessions..

为了做到这一点,您可能需要创建一个SIP服务...这远远超出了普通php网站的范围。

It's not so simple matter but basiccally you need a video server able to stream (that you knew :-) ). You need to control the streams through an api.

Your server will have to check that the user may start a stream if she paid for. If she has the right (she paid for), you may stream otherwise she should not have gone so far in the first place.

Also be carefull because a stream may be started with a URL. So what is important is security if you want a lot of users. You can't afford any security breach.

You may also consider encrypting your video content, ,depending on its value generally.

It's a very short explanation but I hope I gave you a start... You have to build a global architecture. Look for VOD architecture or something similar on a search engine.

您可能需要流服务,以及像Flowplayer这样的高级播放器-该功能比JW-Player具有数十亿的功能。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM