Comments (10)
@dmlap - CORS?
from videojs-contrib-hls.
CORS should be enabled on that entire bucket.
The stream plays correctly in Safari using the same player configuration that fails in Chrome
from videojs-contrib-hls.
@jsanford-bc - CORS does not appear to be setup. This can be confirmed by curl -XGET - i http://bc-jsanford.s3.amazonaws.com/instant_play_demo/1402004163/index.m3u8
That returns the following headers;
HTTP/1.1 200 OK
x-amz-id-2: 14I9fiMW8q5lNkQxeS4XqdgOsDB07ozR0wX991IX5fuRAiTzzVIq7donicxfHeRV
x-amz-request-id: BE97BF8D7B9D88F7
Date: Thu, 05 Jun 2014 21:56:56 GMT
Last-Modified: Thu, 05 Jun 2014 21:36:36 GMT
ETag: "d9e7529f7643820ac9e6134804ccfd08"
Accept-Ranges: bytes
Content-Type: application/vnd.apple.mpegurl
Content-Length: 272
Server: AmazonS3
What you should see in addition are the headers for;
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: X-Requested-With
Access-Control-Allow-Origin: *
from videojs-contrib-hls.
@jsanford-bc - for a positive path example try the following. I know solutions.brightcove.com does have CORS;
curl -XGET -i http://solutions.brightcove.com/jwhisenant/hls/brightcove/fishtank/16x9-fishtank-master.m3u8
Also, just an FYI as to why Safari plays it but Chrome does not; HLS is natively supported in Safari so the player is not using the XHR requests of this plugin and therefore does not require CORS.
from videojs-contrib-hls.
@seniorflexdeveloper - As I understand S3 CORS, those headers are only returned if there is an Origin header in the request. For example, see the below CURL call. Is there a way to force S3 to return those headers all the time? I couldn't find it online, but I definitely could be mistaken.
jsanford$ curl --header "Origin: google.com" -XGET -i http://bc-jsanford.s3.amazonaws.com/instant_play_demo/1402004163/index.m3u8
HTTP/1.1 200 OK
x-amz-id-2: 5QLGmDW6cWl+VK5hOHDcg9517FogTzu4v71r4TGsKfKsNFvq8lU9khkT7q2/yh2a
x-amz-request-id: 65AA97EA1C115F91
Date: Thu, 05 Jun 2014 22:37:23 GMT
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET
Vary: Origin, Access-Control-Request-Headers, Access-Control-Request-Method
Last-Modified: Thu, 05 Jun 2014 21:36:36 GMT
ETag: "d9e7529f7643820ac9e6134804ccfd08"
Accept-Ranges: bytes
Content-Type: application/vnd.apple.mpegurl
Content-Length: 272
Server: AmazonS3
from videojs-contrib-hls.
I'm not the right resource for S3 configurations unfortunately. That being said, I'm confident that is the root of your playback issue.
from videojs-contrib-hls.
Hey Tom - I tried this through a CDN, which always returns the headers for CORS. The new URL is http://bcjsanford.com.global.prod.fastly.net/instant_play_demo/1402013949/index.m3u8
I still can't get this to work with the HLS player. I am trying to load the manifest in dynamically through the player.src method, but I always get the following errors in the console:
Uncaught TypeError: Cannot read property 'currentTime' of null -- video.js:105
Uncaught TypeError: Cannot read property 'vdata1402014589192' of null -- video.js:12
from videojs-contrib-hls.
Hey Justin - I am going to take a look at this and see what I can find. I do a curl on that new URL and get the required headers.
from videojs-contrib-hls.
We've made a lot of changes since this bug was filed. I think it needs a re-test so I removed the "confirmed" label.
from videojs-contrib-hls.
Just checked and the master M3U8 is missing Allow-Origin headers. Closing since this is quite old.
from videojs-contrib-hls.
Related Issues (20)
- Autoplay freeze and seek pixalate HOT 2
- Problem with load balancer HOT 2
- Videoplayer sometimes falsely returns ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) HOT 1
- Android Chrome: overrideNative has no effect HOT 4
- When m3u8 one of the signals has an error. HOT 1
- External links cannot be played in https websites HOT 2
- How to play ts video directly HOT 1
- s
- Incorrect Zoom for videojs player on Chrome HOT 3
- VideoJS HLS player starts playing Live stream after skipping some fragments HOT 2
- How to switch audio group or audio quality to auto or other in hls? HOT 3
- Add deprecation warning to website
- Subtitles showing wrong
- How to switch audio quality (for ex.. stereo/surround)? HOT 4
- HLS will not respond to IE11 browser for a period of time using 'videojs-contrib-hls' HOT 1
- a long m3u8 video problem HOT 2
- long time m3u8 video cannot play with chrome
- request m3u8 and get ts successfully, but can not play, also no errors HOT 2
- Failed to remove source buffer from media source error when disposing player HOT 1
- Videojs-contrib-hls still fetching the stream when video player has paused HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from videojs-contrib-hls.