Skip to content

Commit

Permalink
Fixed chrome not autoplaying when performing functional tests (video-…
Browse files Browse the repository at this point in the history
…dev#1684)

* Disabled test-streams with poor bandwidth

* Test streams: Replace streambox host with github pages served streams repo

* Let tests run a little bit longer, to see if it helps travis

* Bypass CORS issues by disabling web security in chrome

* Test streams: Comment out USP A-team trailer

* Update to latest chromedriver
  • Loading branch information
bwallberg authored and johnBartos committed May 4, 2018
1 parent 111bea6 commit a27ed40
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 7 deletions.
41 changes: 37 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.24.0",
"chromedriver": "^2.28.0",
"chromedriver": "^2.38.3",
"cross-env": "^5.0.2",
"deep-strict-equal": "^0.2.0",
"esdoc": "^1.0.4",
Expand Down
5 changes: 5 additions & 0 deletions tests/functional/auto/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ describe('testing hls.js playback in the browser on "' + browserDescription + '"
version: browserConfig.version,
commandTimeout: 90
};
if (browserConfig.name === 'chrome') {
capabilities.chromeOptions = {
args: ['--autoplay-policy=no-user-gesture-required', '--disable-web-security']
};
}
if (onTravis) {
capabilities['tunnel-identifier'] = process.env.TRAVIS_JOB_NUMBER;
capabilities.build = 'HLSJS-' + process.env.TRAVIS_BUILD_NUMBER;
Expand Down
8 changes: 6 additions & 2 deletions tests/test-streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module.exports = {
'blacklist_ua': ['internet explorer']
},
issue666: {
'url': 'http://www.streambox.fr/playlists/cisq0gim60007xzvi505emlxx.m3u8',
'url': 'https://video-dev.github.io/streams/issue666/playlists/cisq0gim60007xzvi505emlxx.m3u8',
'description': 'hls.js/issues/666',
'live': false,
'abr': false,
Expand All @@ -90,12 +90,14 @@ module.exports = {
'live': false,
'abr': true
},
/*
bbbAES: {
'url': 'http://streambox.fr/playlists/sample_aes/index.m3u8',
'url': 'https://video-dev.github.io/streams/bbbAES/playlists/sample_aes/index.m3u8',
'description': 'SAMPLE-AES encrypted',
'live': false,
'abr': false
},
*/
mp3Audio: {
'url': 'https://player.webvideocore.net/CL1olYogIrDWvwqiIKK7eLBkzvO18gwo9ERMzsyXzwt_t-ya8ygf2kQBZww38JJT/8i4vvznv8408.m3u8',
'description': 'MP3 VOD demo',
Expand Down Expand Up @@ -130,10 +132,12 @@ module.exports = {
'live': false,
'abr': false
},
/*
uspHLSAteam: createTestStream(
'http://demo.unified-streaming.com/video/ateam/ateam.ism/ateam.m3u8?session_id=27199',
'A-Team movie trailer - HLS by Unified Streaming Platform'
),
*/
angelOneShakaWidevine: createTestStreamWithConfig({
url: 'https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine-hls/hls.m3u8',
description: 'Shaka-packager Widevine DRM (EME) HLS-fMP4 - Angel One Demo',
Expand Down

0 comments on commit a27ed40

Please sign in to comment.