lomboboo
lomboboo

Reputation: 1233

The media could not be loaded (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED)

PROBLEM

I'm trying to download a whole html page which contains video from some URL. Then I just printing what I've downloaded. On my localhost machine everything working fine. BUT when I try to run my code on Hosting server I'm getting this error:

VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) 
The media could not be loaded, either because the server or network 
failed or because the format is not supported. 
    code: 4

QUESTION

According to logic, if it is working on localhost, but NOT on Hosting server - is it a problem of apache configuration or something?

Any help will be really appreciated.

Upvotes: 4

Views: 9695

Answers (2)

Danial Hussain
Danial Hussain

Reputation: 17

Dears try this , its work for me on google chrome right click on the google chrome shortcut , copy this shortcut then right click the new google chrome shortcut and click properties -> shortcut and then add this at the end of the target text box

--disable-web-security --user-data-dir="c:/someFolderName"

for detail understanding fallow this link https://www.thegeekstuff.com/2016/09/disable-same-origin-policy/

its work for me

Upvotes: 0

Q.Tong
Q.Tong

Reputation: 11

According to logic, if it is working on localhost, but NOT on Hosting server I've had the same problem. Solution:

IIS->MIME Type->Add the desired video type

Hope this can help you.

Upvotes: 1

Related Questions