Skip to content

feat: scheduler and rollup lazy-player#1003

Merged
tsi merged 9 commits intomasterfrom
feat/schedule-lazy-player
Mar 19, 2026
Merged

feat: scheduler and rollup lazy-player#1003
tsi merged 9 commits intomasterfrom
feat/schedule-lazy-player

Conversation

@tsi
Copy link
Collaborator

@tsi tsi commented Mar 15, 2026

Summary

Adds Weekly Schedule support (poster when outside schedule, full player when inside), refactors entry-point flow, merges init-player into video-player, and removes leftover files.


Schedule feature

  • Outside schedule: Shows poster image only (no full player load)
  • Inside schedule: Loads full player as usual
  • On-demand load: Stub exposes loadPlayer() for poster click → lazy load full player
  • Timezone: Browser local time
  • Format: schedule.weekly with day names and "HH:mm"

Config example

videoPlayer('player', {
  cloudName: 'demo',
  publicId: 'sea_turtle',
  schedule: {
    weekly: [
      { day: 'monday', start: '09:00', end: '17:00' },
      { day: 'tuesday', start: '09:00', end: '17:00' }
    ]
  }
});

Bundle size

Asset Before After Notes
dist/cld-video-player.min.js 137KiB 4.7 KiB Main UMD entry (no Video.js); schedule adds ~2–3 KiB
dist/cld-video-player-core.min.js n/a 132 KiB Core chunk unchanged (init-player merged into video-player)

Main entry remains small (~11 KiB). Core player and schedule logic are in the cld-video-player-core chunk, loaded only when a full player is needed.

@tsi tsi self-assigned this Mar 15, 2026
@tsi tsi requested a review from a team as a code owner March 15, 2026 13:13
@netlify
Copy link

netlify bot commented Mar 15, 2026

Deploy Preview for cld-vp-esm-pages ready!

Name Link
🔨 Latest commit 9912ad4
🔍 Latest deploy log https://app.netlify.com/projects/cld-vp-esm-pages/deploys/69ba9a1d08f35e0008b98941
😎 Deploy Preview https://deploy-preview-1003--cld-vp-esm-pages.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Mar 15, 2026

Deploy Preview for cld-video-player ready!

Name Link
🔨 Latest commit 9912ad4
🔍 Latest deploy log https://app.netlify.com/projects/cld-video-player/deploys/69ba9a1d34fcf7000852e37d
😎 Deploy Preview https://deploy-preview-1003--cld-video-player.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@adimiz1
Copy link
Contributor

adimiz1 commented Mar 18, 2026

Apprvoed but this requires fixes from the rollup branch

tsi added 3 commits March 18, 2026 14:11
* feat: use rollup for esm

* chore: cleanup

* chore: rollup imports

* chore: build

* chore: deduplicate

* chore: setupCloudinaryGlobal

* chore: test over-night time-ranges
@tsi tsi changed the title feat: schedule and lazy-player feat: scheduler and rollup lazy-player Mar 18, 2026
@tsi tsi merged commit 9c0d6b2 into master Mar 19, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants