Skip to content

feat: live streams analytics#862

Merged
jakub-roch merged 5 commits into
masterfrom
feat-live-streams-analytics
May 13, 2025
Merged

feat: live streams analytics#862
jakub-roch merged 5 commits into
masterfrom
feat-live-streams-analytics

Conversation

@jakub-roch
Copy link
Copy Markdown
Contributor

Add new version of video analytics:

  • use player adapter
  • add live stream analytics

@jakub-roch jakub-roch requested a review from a team as a code owner May 12, 2025 09:20
@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2025

Deploy Preview for cld-video-player ready!

Name Link
🔨 Latest commit d028913
🔍 Latest deploy log https://app.netlify.com/sites/cld-video-player/deploys/6822fe66e38fa100089a4337
😎 Deploy Preview https://deploy-preview-862--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 site configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2025

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

Name Link
🔨 Latest commit d028913
🔍 Latest deploy log https://app.netlify.com/sites/cld-vp-esm-pages/deploys/6822fe66b4ebe900087be022
😎 Deploy Preview https://deploy-preview-862--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 site configuration.

Copy link
Copy Markdown
Contributor

@kalifyaniv-cloudinary kalifyaniv-cloudinary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check my second comment before merging...

Comment on lines +50 to +78
return {
onCanPlay: (callback) => createCldVPEventListener('canplay', callback),
onCanPlayThrough: (callback) => createCldVPEventListener('canplaythrough', callback),
onComplete: (callback) => createCldVPEventListener('complete', callback),
onDurationChange: (callback) => createCldVPEventListener('durationchange', callback),
onEmptied: (callback) => createCldVPEventListener('emptied', callback),
onEnded: (callback) => createCldVPEventListener('ended', callback),
onError: (callback) => createCldVPEventListener('error', callback),
onLoadedData: (callback) => createCldVPEventListener('loadeddata', callback),
onLoadedMetadata: (callback) => createCldVPEventListener('loadedmetadata', callback),
onLoadStart: (callback) => createCldVPEventListener('loadstart', callback),
onPause: (callback) => createCldVPEventListener('pause', callback),
onPlay: (callback) => createCldVPEventListener('play', callback),
onPlaying: (callback) => createCldVPEventListener('playing', callback),
onProgress: (callback) => createCldVPEventListener('progress', callback),
onRateChange: (callback) => createCldVPEventListener('ratechange', callback),
onSeeked: (callback) => createCldVPEventListener('seeked', callback),
onSeeking: (callback) => createCldVPEventListener('seeking', callback),
onStalled: (callback) => createCldVPEventListener('stalled', callback),
onSuspend: (callback) => createCldVPEventListener('suspend', callback),
onTimeUpdate: (callback) => createCldVPEventListener('timeupdate', callback),
onVolumeChange: (callback) => createCldVPEventListener('volumechange', callback),
onWaiting: (callback) => createCldVPEventListener('waiting', callback),

getCurrentSrc: () => this.player.videoElement.currentSrc,
getCurrentTime: () => this.player.currentTime(),
getReadyState: () => this.player.videoElement.readyState,
getDuration: () => this.player.duration(),
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean we added more events to the "regular" tracking also?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for now - no, I just created mapping for all events, it doesn't mean we are listening for all of them, it just means that we can start listening whenever we want to ( thats schema of required props as player adapter )

Comment on lines -59 to -63
// only for iOS there is problem with reporting events because videojs re-triggers events and stops native ones
if (this.shouldUseCustomEvents) {
this.connectCustomEvents();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we remove this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

analytics package was listening for custom event that was triggered by videojs to resolve issue with one event that was actually prevent from bubbling on videojs side for iOS
with new player adapter mechanism its videojs responsibility to trigger events in right moment - so there is no browser-specific or device-specific case as its being handled internally by library

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