使用video.js文件报错:Failed to load resource: net::ERR_FILE_NOT_FOUND的解决办法

Posted 天地一扁舟

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用video.js文件报错:Failed to load resource: net::ERR_FILE_NOT_FOUND的解决办法相关的知识,希望对你有一定的参考价值。

使用video.js文件报错:

file://www.google-analytics.com/__utm.gif?utmwv=5.4.2&utmac=UA-16505296-2&u…Fexample.html&utmcc=__utma%3D1.5782357959.1.1.1.1%3B&utme=8(vjsv)9(v4.3.0)Failed to load resource: net::ERR_FILE_NOT_FOUND

video.js:6 'webkitMovementX' is deprecated.Please use 'movementX' instead.

video.js:6 'webkitMovementY' is deprecated.Please use 'movementY' instead.

解决办法参考这篇文章:

http://stackoverflow.com/questions/22671994/jquery-will-not-load-because-it-cant-be-found

分析:出现该问题的原因是因为所用的html是本地的网页文件。

这篇文章内容如下:


My html page don't works because my script is not loading. The script I'm using is as follows:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

This is the error:

Failed to load resource: net::ERR_FILE_NOT_FOUND
file://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js

Can you see the problem? I just copied the scripts src from google hosted libraries.

   
share improve this question edited Jun 30 '15 at 13:25 Catmandu 1,000 1 15 35 asked  Mar 26 '14 at 20:10 user3232772 112 1 1 6
  add a comment

3 Answers

active oldest votes
up vote 27 down vote accepted

I think you're testing this using an HTML file on your local file system. // with no protocol specified is assuming file:// because of this.

share improve this answer answered  Mar 26 '14 at 20:12 Tim Goodman 10.7k 4 36 58
 
1 
ahh, very good, I was scratching my head –  andrew  Mar 26 '14 at 20:13
1 
Right, this would work if he were running it from a localhost of some kind. –  m59  Mar 26 '14 at 20:13
 
I will add that normally protocol-relative URL's like this are a good thing, because they'll call the script withhttp:// or https:// depending on what protocol is used to load the page. –  Tim Goodman  Mar 26 '14 at 20:25
 
Yes, It worked on my Xampp localhost. –  user3232772  Mar 26 '14 at 21:42
 
@user3232772 If this answer helped you, please consider marking it as the accepted answer. –  Tim Goodman  Mar 28 '14 at 15:09
add a comment

Did you find this question interesting? Try our newsletter

 
up vote 3 down vote

You need put http:// before the URL. Try it:http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js

share improve this answer answered  Mar 26 '14 at 20:51 MCGBra 115 1 9
 
1 
Omitting http: is generally better, because it can infer http: or https:. It's just that in this case, it's inferring file:, which is not what is wanted. –  Tim Goodman  Mar 27 '14 at 17:03
add a comment
up vote 0 down vote

Only posting to help anyone else who did what i did. I spent hours trying to figure out why i was getting about a 100 of these errors. I had forgot i was messing around with ngRoute and had placed <base href="/"> in my index.html. After removing it everything works again.




以上是关于使用video.js文件报错:Failed to load resource: net::ERR_FILE_NOT_FOUND的解决办法的主要内容,如果未能解决你的问题,请参考以下文章

SecureCRT sftp上传文件报错:put: failed to upload xxx 拒绝访问

报错Failed to load config “prettier“ to extend from.?

报错Failed to load config “prettier“ to extend from.?

MYSQL报错,Failed to open log

ionic报错: Failed to load resource

metricbeat导入dashboard报错Failed to unzip the archive