Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat / live channels screen with EPG view #113

Merged
merged 102 commits into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
a06ee35
chore(project): add 24x7 live channels with epg in readme
ChristiaanScheermeijer Jul 15, 2022
a3983cf
chore(epg): add epg to commit scopes
ChristiaanScheermeijer Jul 19, 2022
d9a4f2d
feat(epg): add EpgService and schedule data fixtures
ChristiaanScheermeijer Jul 19, 2022
719cf8f
test(epg): use correct properties for startTime and endTime
ChristiaanScheermeijer Jul 19, 2022
15bac4a
test(epg): use vi-fetch for epg tests
ChristiaanScheermeijer Jul 20, 2022
9b11c70
chore(epg): add more test cases and refactor epg service
ChristiaanScheermeijer Jul 20, 2022
9ad3104
chore(epg): log rejected programs in debug env
ChristiaanScheermeijer Jul 20, 2022
4e47144
feat(epg): add authentication header when scheduleToken is defined
ChristiaanScheermeijer Jul 20, 2022
f10d929
Merge pull request #119 from jwplayer/feat/add-support-for-schedule-t…
ChristiaanScheermeijer Jul 20, 2022
d0f41a0
feat(epg): fill schedule with static program when empty
ChristiaanScheermeijer Jul 20, 2022
3ac9179
test(epg): use fake timers to test start and end time
ChristiaanScheermeijer Jul 20, 2022
b9b921e
chore(project): translation fixes
ChristiaanScheermeijer Jul 20, 2022
fdba70d
feat(epg): use different static program when schedule fails to load
ChristiaanScheermeijer Jul 20, 2022
abaf7bb
Merge pull request #120 from jwplayer/feat/add-static-epg-program
ChristiaanScheermeijer Jul 21, 2022
2ac2eb1
feat(epg): add schedule demo mode
ChristiaanScheermeijer Jul 21, 2022
d96e1a5
Merge pull request #118 from jwplayer/feat/add-epg-service
ChristiaanScheermeijer Jul 21, 2022
c11e72d
refactor(project): refactor Video and Cinema components
ChristiaanScheermeijer Jul 21, 2022
c8f622c
chore(project): fix tests and watch history not working properly
ChristiaanScheermeijer Jul 21, 2022
9c798d7
chore(project): update snapshots
ChristiaanScheermeijer Jul 21, 2022
6934725
chore(project): fix e2e tests
ChristiaanScheermeijer Jul 22, 2022
35de71f
refactor(project): refactor fixes and improvements
ChristiaanScheermeijer Jul 22, 2022
17bafdd
chore(project): update snapshots
ChristiaanScheermeijer Jul 22, 2022
981feae
Merge pull request #122 from jwplayer/feat/add-epg-demo-mode
ChristiaanScheermeijer Jul 22, 2022
e80eeac
Merge branch 'feat/live-channels-view-with-epg' into feat/add-live-ch…
ChristiaanScheermeijer Jul 22, 2022
a275623
refactor: rename Video component to VideoDetails
ChristiaanScheermeijer Jul 22, 2022
eb45b84
chore: add comment to ignore exhaustive-deps
ChristiaanScheermeijer Jul 22, 2022
8a08f71
chore: remove old snapshot
ChristiaanScheermeijer Jul 22, 2022
6608470
refactor: rename metadata props in VideoDetails component
ChristiaanScheermeijer Jul 22, 2022
5c268b7
refactor: make player required
ChristiaanScheermeijer Jul 22, 2022
d727d40
refactor: extract trailer and favorite buttons from VideoDetails
ChristiaanScheermeijer Jul 22, 2022
8cb6a42
refactor: move FavoritesWarning to FavoriteButton container
ChristiaanScheermeijer Jul 22, 2022
91d13a3
refactor(video): ignore watch progress when disabled
ChristiaanScheermeijer Jul 22, 2022
bfe4d20
feat(epg): add live channels layout and epg
ChristiaanScheermeijer Jul 22, 2022
5d95fd2
refactor: translation improvements
ChristiaanScheermeijer Jul 25, 2022
c078e8e
chore: build deploy previews for feature branches
ChristiaanScheermeijer Jul 25, 2022
05943b2
chore: remove semicolon in favorite button
ChristiaanScheermeijer Jul 25, 2022
b2481e8
Merge pull request #124 from jwplayer/feat/add-live-channels-layout
ChristiaanScheermeijer Jul 25, 2022
ec8d56e
feat(epg): add start from beginning button
ChristiaanScheermeijer Jul 25, 2022
25120cf
chore: add curly eslint rule and add braces
ChristiaanScheermeijer Jul 26, 2022
b55e119
refactor(epg): refactor hooks and add code comments
ChristiaanScheermeijer Jul 26, 2022
6d40f9a
chore: fix eslint error
ChristiaanScheermeijer Jul 26, 2022
7ac8027
Merge pull request #129 from jwplayer/feat/live-channels-start-from-t…
ChristiaanScheermeijer Jul 27, 2022
11ee74e
feat(epg): allow channel selection by clicking on the logo
ChristiaanScheermeijer Jul 27, 2022
6f03f7b
feat(epg): update program information and remove static program
ChristiaanScheermeijer Jul 27, 2022
46987df
feat(epg): refetch live channel schedules every 15 minutes
ChristiaanScheermeijer Jul 28, 2022
56435e9
feat(epg): allow deeplinking to live channel
ChristiaanScheermeijer Jul 28, 2022
924edf4
Merge pull request #130 from jwplayer/feat/update-program-information
ChristiaanScheermeijer Jul 28, 2022
e186c97
feat(epg): add epg channel item
RCVZ Jul 26, 2022
7467792
feat(epg): add epg program item
RCVZ Jul 26, 2022
c2252be
feat(epg): add epg timelin compontent
RCVZ Jul 26, 2022
3fac9bd
feat(epg): add timeline controls to epg
RCVZ Jul 27, 2022
0456aac
chore(epg): tweaked design of channel and program
RCVZ Jul 27, 2022
a4e2bb2
feat(epg): styled epg according to design
RCVZ Jul 28, 2022
721f162
feat(epg): add epg loading indicator
RCVZ Jul 28, 2022
8d9c2ed
chore(epg): add translation key
RCVZ Jul 28, 2022
712b157
feat(epg): add ended state to epgprogram
RCVZ Jul 28, 2022
dc40f76
chore: pr feedback
RCVZ Jul 28, 2022
2f85469
style: white space
RCVZ Jul 28, 2022
f9f309b
Merge pull request #131 from jwplayer/feat/add-epg-channel-program-co…
RCVZ Jul 28, 2022
43a9f30
Merge pull request #132 from jwplayer/feat/support-deeplinking-to-cha…
ChristiaanScheermeijer Jul 28, 2022
969c906
feat(epg): add channel active state and click action
ChristiaanScheermeijer Jul 28, 2022
793af01
feat(epg): implement catchup hours mechanism
ChristiaanScheermeijer Jul 28, 2022
9ce9321
feat(epg): scroll to now when clicking a channel
ChristiaanScheermeijer Jul 28, 2022
3adba3d
chore(epg): implemented design feedback
RCVZ Jul 29, 2022
65ca0ce
chore(epg): design tweaks
RCVZ Jul 29, 2022
622207d
fix(epg): livetag always visible on mobile
RCVZ Jul 29, 2022
211b05d
chore: add correct aria-labels to icon buttons
RCVZ Jul 29, 2022
97b234f
feat(epg): show correct time for locale
ChristiaanScheermeijer Jul 29, 2022
e71b0d9
feat(epg): update start and end date to redraw timeline
ChristiaanScheermeijer Jul 29, 2022
9857963
chore: use playlist ids from e2e property
ChristiaanScheermeijer Jul 29, 2022
2c22736
Merge pull request #133 from jwplayer/feat/epg-design-improvements
ChristiaanScheermeijer Jul 29, 2022
41d57c9
chore: live playlist id correction
ChristiaanScheermeijer Jul 29, 2022
a484fe7
chore: remove unused file
ChristiaanScheermeijer Jul 29, 2022
a1b768c
chore(epg): rename isSmall to isMobile
ChristiaanScheermeijer Jul 29, 2022
cd7ff65
Merge pull request #126 from jwplayer/feat/add-live-channels-layout-a…
ChristiaanScheermeijer Jul 29, 2022
350cc30
chore(project): update vitest and add testing library hooks
ChristiaanScheermeijer Aug 1, 2022
286a439
test(epg): add test for catchup hours in playlist item
ChristiaanScheermeijer Aug 1, 2022
4128444
test(epg): add tests for epg hooks
ChristiaanScheermeijer Aug 1, 2022
22b4427
chore(project): update vite to 3.0.4
ChristiaanScheermeijer Aug 1, 2022
b428b1a
chore(project): fix data fixture type
ChristiaanScheermeijer Aug 1, 2022
9cda898
chore(project): fix prettier error
ChristiaanScheermeijer Aug 1, 2022
bdcf4b0
Merge pull request #135 from jwplayer/feat/add-unit-tests-for-hooks-a…
ChristiaanScheermeijer Aug 1, 2022
40cfe9f
fix(epg): update channel when data changes
ChristiaanScheermeijer Aug 1, 2022
ed131d4
chore(project): improve code comments
ChristiaanScheermeijer Aug 1, 2022
af205ae
fix(epg): demo mode in different timezones
ChristiaanScheermeijer Aug 3, 2022
6de8811
fix(epg): last hour not visible in timeline
ChristiaanScheermeijer Aug 3, 2022
19ec7fa
fix(epg): outline with border-radius not working in Safari
ChristiaanScheermeijer Aug 3, 2022
d19c8ff
fix(epg): mobile epg layout improvements and scroll to top
ChristiaanScheermeijer Aug 3, 2022
e51157a
chore(project): add todo for seek to beginning mechanism
ChristiaanScheermeijer Aug 3, 2022
457810e
feat(epg): rename watch from beginning button to watch from begin
ChristiaanScheermeijer Aug 3, 2022
a653555
feat(epg): improve live channels SEO
ChristiaanScheermeijer Aug 3, 2022
d14a51c
Merge pull request #138 from jwplayer/fix/epg-fixes-and-improvements
ChristiaanScheermeijer Aug 3, 2022
bcc3dfa
feat(e2e): add live channels end to end tests
RCVZ Aug 1, 2022
28e95b1
chore(epg): replaced waitForPlayerPlaying
RCVZ Aug 1, 2022
1083e1b
chore: clean up
RCVZ Aug 1, 2022
8b9706f
chore: increased time wait for epg
RCVZ Aug 2, 2022
4d523b6
chore: fix date mock locale
RCVZ Aug 2, 2022
a947a59
chore: pr comment rework
RCVZ Aug 2, 2022
b097a1b
chore(epg): update e2e tests for live channels
ChristiaanScheermeijer Aug 3, 2022
2896e85
Merge pull request #136 from jwplayer/feat/add-live-channel-e2e-tests
ChristiaanScheermeijer Aug 3, 2022
c8f648a
chore(epg): add minimal documentation
ChristiaanScheermeijer Aug 4, 2022
549bdf4
chore(epg): rename watch from begin to watch from start
ChristiaanScheermeijer Aug 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
'signing',
'entitlement',
'config',
'epg',
],
],
},
Expand Down
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ module.exports = {
// Assignments in function returns is confusing and could lead to unwanted side-effects
'no-return-assign': ['error', 'always'],

curly: ['error', 'multi-line'],

// Strict import ordering
'import/order': [
'warn',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/firebase-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Firebase Preview'

on:
pull_request:
branches: ['develop']
branches: [ 'develop', 'feat/*', 'feature/*' ]

jobs:
build_and_preview:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ To see an example of JW OTT Webapp in action, see [https://jw-ott-webapp.netlify
- A "Favorites" feature for users to save videos for watching later. A separate list for "Continue Watching" is also kept so users can resume watching videos from where they left off. The lists are per-browser at this time (i.e., lists do not sync across user's browsers or devices). The "Continue Watching" list can be disabled in your JW OTT Webapp's `config.json` file.
- A grid view for a particular playlist of videos, with the ability to deep-link to the playlist through a static URL.
- Social sharing options using the device native sharing dialog.
- 24x7 live channel(s) screen with Electronic Programming Guide (EPG) view.

## Unsupported Feature(s)

Expand Down
Binary file added docs/features/img/live-channels-epg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions docs/features/live-channels-with-epg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# 24x7 live channels with EPG

If you want to list one or more 24x7 livestream channels, it is possible to enable a custom page with an EPG view. Of
course, you would need to have EPG data available for this to work.

<img title="" src="img/live-channels-epg.png" alt="Series" width="580">

Below are the steps to enable the live channels page in your OTT Webapp.

## Create a Live Channels playlist

Navigate to the JW Dashboard and create a new MANUAL playlist. You can give any name to this playlist. This is useful if
you want to add this playlist as a shelf on the homepage.

Note down the playlist ID for future reference.

Add all live channel media items to the playlist. The order you put them in is respected, so order the media items
accordingly.

Go to the "Custom Parameters" section and add a new parameter with name "contentType" and value "Live".

## Update Live Channel Media Items

This step is needed for all live channel media items you've added to the playlist in the previous step.

Add the following Custom Parameters to the media item:

- **contentType**: LiveChannel
- **liveChannelsId**: playlist id noted down in previous step
- **scheduleUrl**: URL to your EPG data

## Add a Live menu item

If you've completed the previous steps, you should be able to add a menu item using the noted down playlist ID.

In your OTT config file, add a new item in the `menu` section:

```json
{
"menu": [
{
"label": "Live",
"contentId": "LIVE_PLAYLIST_ID",
"type": "playlist"
}
]
}
```

> Replace `LIVE_PLAYLIST_ID` with the Live Channels playlist ID created earlier.

Now when you open your OTT Webapp, you should see a new menu item in the header or drawer on mobile devices. After
clicking on the "Live" menu item, the Live Channels page with EPG view should be visible.

## EPG Data structure

The EPG view expects a certain data structure in order to work. This is based on the VIS Chapterpoints API so that it
integrates seamlessly.

```json
[
{
"id": "00990617-c229-4d1e-b341-7fe100b36b3c",
"title": "Peaky Blinders",
"startTime": "2022-07-15T00:05:00Z",
"endTime": "2022-07-15T00:55:00Z",
"chapterPointCustomProperties": [
{
"key": "description",
"value": "A gangster family epic set in 1900s England, centering on a gang who sew razor blades in the peaks of their caps, and their fierce boss Tommy Shelby."
},
{
"key": "image",
"value": "https://www.themoviedb.org/t/p/w1066_and_h600_bestv2/wiE9doxiLwq3WCGamDIOb2PqBqc.jpg"
}
]
}
]
```
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test-watch": "TZ=UTC vitest",
"test-coverage": "TZ=UTC vitest run --coverage",
"test-commit": "TZ=UTC vitest run --changed HEAD~1 --coverage",
"i18next": "i18next src/{components,containers,screens}/**/{**/,/}*.tsx && node ./scripts/i18next/generate.js",
"i18next": "i18next src/{components,containers,screens,services,stores}/**/{**/,/}*.{ts,tsx} && node ./scripts/i18next/generate.js",
"format": "run-s -c format:*",
"format:eslint": "eslint \"{**/*,*}.{js,ts,jsx,tsx}\" --fix",
"format:prettier": "prettier --write \"{**/*,*}.{js,ts,jsx,tsx}\"",
Expand All @@ -40,6 +40,7 @@
"dependencies": {
"allure-commandline": "^2.17.2",
"classnames": "^2.3.1",
"date-fns": "^2.28.0",
"dompurify": "^2.3.8",
"history": "^4.10.1",
"i18next": "^20.3.1",
Expand All @@ -48,6 +49,7 @@
"lodash.merge": "^4.6.2",
"memoize-one": "^5.2.1",
"npm-run-all": "^4.1.5",
"planby": "^0.3.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-helmet": "^6.1.0",
Expand All @@ -65,6 +67,7 @@
"@commitlint/config-conventional": "^12.1.1",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^11.2.6",
"@testing-library/react-hooks": "^8.0.1",
"@types/dompurify": "^2.3.3",
"@types/jwplayer": "^8.2.7",
"@types/lodash.merge": "^4.6.6",
Expand Down Expand Up @@ -103,15 +106,17 @@
"stylelint-declaration-strict-value": "^1.7.12",
"stylelint-order": "^4.1.0",
"stylelint-scss": "^3.20.0",
"timezone-mock": "^1.3.4",
"ts-node": "^10.7.0",
"typescript": "^4.3.4",
"vite": "^2.9.0",
"vi-fetch": "^0.8.0",
"vite": "^3.0.4",
"vite-plugin-eslint": "^1.3.0",
"vite-plugin-html": "^3.2.0",
"vite-plugin-pwa": "^0.11.13",
"vite-plugin-static-copy": "^0.4.4",
"vite-plugin-stylelint": "^2.1.0",
"vitest": "^0.10.0",
"vitest": "^0.19.1",
"workbox-build": "^6.5.2",
"workbox-window": "^6.5.2"
},
Expand All @@ -127,4 +132,4 @@
"glob-parent": "^5.1.2",
"codeceptjs/**/ansi-regex": "^4.1.1"
}
}
}
10 changes: 10 additions & 0 deletions public/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
"enableText": true,
"type": "playlist",
"contentId": "xQaFzykq"
},
{
"enableText": true,
"type": "playlist",
"contentId": "fWpLtzVh"
}
],
"menu": [
Expand All @@ -40,6 +45,11 @@
"contentId": "xQaFzykq",
"type": "playlist",
"filterTags": "Beginner,Advanced"
},
{
"label": "Live",
"contentId": "fWpLtzVh",
"type": "playlist"
}
],
"features": {
Expand Down
Loading