Home  >  Article  >  Backend Development  >  How to transfer playable video to the front end?

How to transfer playable video to the front end?

WBOY
WBOYOriginal
2016-09-08 08:43:521787browse

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>

Reply content:

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn