I am trying to play a vimeo m3u8 hls video in videojs player. I am getting cross domain error. Can anybody help me.
My code.
<video autoplay id="content_video" class="video-js vjs-default-skin"
poster = "//test.waytogrow.pl/wideo/videojs/posters/android.png" controls preload="auto" width="640"
height="360">
<source src="https://player.vimeo.com/external/155002167.m3u8?p=standard&s=1d09b138bbb4218361013c45d706889df4a80fee"
type="application/x-mpegURL" ></source>
</video>
Error
XMLHttpRequest cannot load https://player.vimeo.com/external/155002167.m3u8?p=standard&s=1d09b138bbb4218361013c45d706889df4a80fee. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://example.com' is therefore not allowed access.
You can't fix this. Only Vimeo can, by adding CORS headers to the responses. Otherwise you need to host the video elsewhere.
Related
How are sites like YouTube able to autoplay videos without muting audio but it's not possible to achieve the same using the <video> element embedded on a page?
I'm using the retina theme for the Shopify site. I'm using video on my home page but it's not autoplay in the chrome. another browser it's playing well...please tell me to need to customize code for autoplay in the chrome browser?
Chrome can autoplay the videos with sound off, so you'll need to add muted attribute.
<video autoplay muted>
...
</video>
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
I am trying to play an mkv video in HTML5 video player. When i play the video only audio gets played and no video. Following is my code:
<!DOCTYPE html>
<html>
<body>
<video width="500" controls>
<source src="SampleVideo.mkv">
</video>
</body>
</html>
I am using chrome browser (version 74.0.3729.169).
I know that HTML5 only supports MP4, WebM, and Ogg formats but is their any way to play MKV files properly? Any help on this would really be appreciated.
I'm trying to get a playable video from a url of a video stored on Google Photos. The documentation suggests adding "=dv" to the base_url
It play video in Chrome, Firefox but not in Safari.
How do I go about playing video in Safari from Google Photos API?
If I add "=m18" instead of "=dv" it will play a compressed version of video in Safari. But Google recommend to not use "=m18"
<div class="videoHolder" style="position: absolute; width: 1200px; height: 675px; top: 180.5px; left: 251px;">
<video id="video" width="1200" height="675" autoplay="" controls="true" preload="" playsinline="" muted="" poster="342278662.mp4"><source src="https://lh3.googleusercontent.com/lr/really_long_url=dv" type="video/mp4">
</video>
</div>
I'm expecting the video to stream, but I just see the buffering symbol
Any help would be very much appreciated.
Unfortunately, the Google Photos Library API does not currently support video streaming. If you want to access a video for playback, you have to use the =dv base URL parameter to download the file first.
Unfortunately this is a known limitation, you can follow the feature request on the issue tracker here: https://issuetracker.google.com/111931138
If you have a specific use case in mind or technology that should be supported, please add details to the feature request.
I tried to add a .mp4 video on my web page. And it doesn't work, I got an error in firebug. Bellow is the code:
<video width="320" height="240" controls>
<source type="video/mp4" src="08.mp4" >
</video>
Error:
"NetworkError: 404 Not Found - http://localhost/08.mp4"
HTTP load failed with status 404. Load of media resource http://localhost/08.mp4 failed.
All candidate resources failed to load. Media load paused.
I tried with a .m4v video, and it works fine:
<video width="320" height="240" controls>
<source type="video/mp4" src="Big_Buck_Bunny_Trailer.m4v" >
</video>
If I tried to access http://localhost/08.mp4 I got the following:
A 404 error occurred
Page not found.
The requested URL could not be matched by routing.
No Exception available
Both videos are in the same folder.
Codec information:
Can you tell me please where is the problem?
I solved the problem.
Because I use zend2 framework the folder with video should be in the public folder.
First I put the video in other folder, now I moved it in public and works fine.