video.js +JQuery + video cloud

Time:2021-1-20

When doing video related projects, there are some problems, which have been solved in the project. Here is a summary:

Problems:
1. The video upload of Baidu ueditor always has a download button when it is displayed on the front end, video.js It's not easy to get rid of the controls.
2. When adding video in the background, php.ini There is upload_ max_ File size, when using virtual space, this can't be adjusted, can't upload too large file.
3. The video cannot be played after it is placed in the virtual space, and streaming media is not supported
terms of settlement
1. Whether you use Baidu ueditor or not, if you want to disable the download button, you can use:
<! -- remove the download button -- >
<style type="text/css">
    video::-webkit-media-controls-enclosure {
        overflow:hidden;
    }
    video::-webkit-media-controls-panel {
        width: calc(100% + 30px);
    }
</style>
<! -- remove right click event -- >
$("video"). Live ("ContextMenu", function () {// cancel the right-click event
    return false;});

<! -- on the other hand, if you can't, just add -- > in the body
<script type="text/javascript">
$('div').bind("contextmenu", function(e){ return false; })
</script>

<! -- or disable the right button of the whole body -- >
<body oncontextmenu=self.event.returnvalue=false>
2. If you want to achieve unlimited video upload size, you can use the following solutions:
    (1) Use the server. set up php.ini Upload of_ max_ filesize
    (2) Virtual space, ask the service provider if it can be set up
    (3) With video cloud service providers, there are free, there is no advertising here
        a. Add a multimedia link < input > in the background, which is used to fill in the multimedia address for the user (the acquisition of this is in B), fill it in, pass it to the background, store the address in the database, and use it in the foreground video.js Take it out and you can see it.
        b. With video cloud, generally free to provide some space, I use a free 10g, in this no advertising. Video and audio can be uploaded here. After uploading, there will be an address, which can be filled in < input > in a.

three web.gonfig Make corresponding configuration and put it in the root directory

<configuration>
    <system.webServer>
    <staticContent>
      <remove fileExtension=".mp4" />
      <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
    </staticContent>
 </system.webServer>
</configuration>
        
**It's mainly for you. If you have any questions, you can communicate with me, MEDA**