Skip to content

Commit

Permalink
Update hls.js to its latest version
Browse files Browse the repository at this point in the history
Bumped from 0.14.17 to 1.2.4. Didn't test extensively, but playback
seems fine, only noticed an issue with captions, which seems to be
related to #18
Bumping as a major to avoid this version being picked up by the other
packages, since most I saw are pulling minors
  • Loading branch information
thiagopnts committed Oct 19, 2022
1 parent 4fc9279 commit 0800fe3
Show file tree
Hide file tree
Showing 3 changed files with 1,007 additions and 1,040 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clappr/hlsjs-playback",
"version": "0.6.0",
"version": "1.0.0",
"description": "HLS Playback based on hls.js",
"main": "./dist/hlsjs-playback.js",
"module": "./dist/hlsjs-playback.esm.js",
Expand Down Expand Up @@ -36,7 +36,7 @@
"homepage": "https://github.com/clappr/hlsjs-playback",
"peerDependencies": {
"@clappr/core": "^0.4.18",
"hls.js": "^0.14.17"
"hls.js": "^1.2.4"
},
"devDependencies": {
"@babel/core": "^7.14.2",
Expand All @@ -50,7 +50,7 @@
"coveralls": "^3.1.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^7.26.0",
"hls.js": "^0.14.17",
"hls.js": "^1.2.4",
"jest": "^26.6.3",
"rollup": "^2.47.0",
"rollup-plugin-filesize": "^9.1.1",
Expand Down
8 changes: 4 additions & 4 deletions src/hls.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ describe('HlsjsPlayback', () => {
const playback = new HlsjsPlayback({ src: 'http://clappr.io/foo.m3u8', hlsPlayback: { preload: false } })
playback._setup()
jest.spyOn(playback._hls, 'loadSource')
playback._hls.trigger(HLSJS.Events.MEDIA_ATTACHED)
playback._hls.trigger(HLSJS.Events.MEDIA_ATTACHED, {media: playback.el})

expect(playback._hls.loadSource).not.toHaveBeenCalled()

playback.options.hlsPlayback.preload = true
playback._setup()
jest.spyOn(playback._hls, 'loadSource')
playback._hls.trigger(HLSJS.Events.MEDIA_ATTACHED)
playback._hls.trigger(HLSJS.Events.MEDIA_ATTACHED, {media: playback.el})

expect(playback._hls.loadSource).toHaveBeenCalledTimes(1)
})
Expand All @@ -182,7 +182,7 @@ describe('HlsjsPlayback', () => {
expect(playback._manifestParsed).toBeUndefined()

playback._setup()
playback._hls.trigger(HLSJS.Events.MANIFEST_PARSED)
playback._hls.trigger(HLSJS.Events.MANIFEST_PARSED, {levels: []})

expect(playback._manifestParsed).toBeTruthy()
})
Expand Down Expand Up @@ -275,7 +275,7 @@ describe('HlsjsPlayback', () => {

expect(cb).toHaveBeenCalledTimes(1)

playback._hls.trigger(HLSJS.Events.MEDIA_ATTACHING)
playback._hls.trigger(HLSJS.Events.MEDIA_ATTACHING, {media: playback.el})

expect(cb).toHaveBeenCalledTimes(2)
})
Expand Down
Loading

0 comments on commit 0800fe3

Please sign in to comment.