Home >Backend Development >PHP Tutorial >How to transfer playable video to the front end?
My idea is
The back-end transmits the video file data (binary) to the front-end, and then changes the corresponding header
But I tried it without success, and I couldn’t find relevant information online.
I don’t know what the problem is
The desired effect is probably like this
<code>http://hc.yinyuetai.com/uploads/videos/common/B7D20154766D39739AF193BCE138419F.flv?sc\u003d0743670c523be875\u0026br\u003d759\u0026vid\u003d2561631\u0026aid\u003d311\u0026area\u003dHT\u0026vst\u003d2</code>
My idea is
The back-end transmits the video file data (binary) to the front-end, and then changes the corresponding header
But I tried it without success, and I couldn’t find relevant information online.
I don’t know what the problem is
The desired effect is probably like this
<code>http://hc.yinyuetai.com/uploads/videos/common/B7D20154766D39739AF193BCE138419F.flv?sc\u003d0743670c523be875\u0026br\u003d759\u0026vid\u003d2561631\u0026aid\u003d311\u0026area\u003dHT\u0026vst\u003d2</code>
The video is placed on the server, and the backend sends the video address to the frontend.
How do you operate, write header, and then loop to output video content?
The backend transmits the video address to the frontend. HTML5 supports video playback, just use tags.
Is it HLS protocol?
For this kind of thing, you need to look at the network protocol first, and then look for information, or which CDN you use for video streaming will also write the corresponding protocol