Skip to content

Comments

feat: added support to play youtube video from specified time#15754

Closed
manzil-infinity180 wants to merge 6 commits intojitsi:masterfrom
manzil-infinity180:youtube-startTime
Closed

feat: added support to play youtube video from specified time#15754
manzil-infinity180 wants to merge 6 commits intojitsi:masterfrom
manzil-infinity180:youtube-startTime

Conversation

@manzil-infinity180
Copy link
Contributor

@manzil-infinity180 manzil-infinity180 commented Mar 11, 2025

Fixes #15753

Expected Behaviour

Screen.Recording.2025-03-11.at.11.29.09.AM.mp4

Signed-off-by: Rahul Vishwakarma <rahulvs2809@gmail.com>
@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@manzil-infinity180
Copy link
Contributor Author

manzil-infinity180 commented Mar 11, 2025

playerVars: {
            'origin': location.origin,
            'fs': '0',
            'autoplay': 0,
            'controls': showControls,
            'rel': 0,
            'start': startTime || 0 // Now correctly set
        }

how can I set the value for startTime I found middleware but videoUrl is youtube id ?

If we set startTime to 255 then it will start the video from 255 sec

Signed-off-by: Rahul Vishwakarma <rahulvs2809@gmail.com>
@manzil-infinity180
Copy link
Contributor Author

@damencho @saghul any comments on it ?

@manzil-infinity180 manzil-infinity180 marked this pull request as ready for review March 12, 2025 17:02
@manzil-infinity180
Copy link
Contributor Author

manzil-infinity180 commented Mar 12, 2025

I have tested this on web, its working perfectly how I expected to be, I am not sure why the linting is throwing error

Argument of type 'typeof YoutubeVideoManager' is not assignable to parameter of type 'JSXElementConstructor<Matching<{ _conference: IJitsiConference | undefined; _isOwner: boolean; _ownerId: string | undefined; _status: string | undefined; startTime: number | undefined; _time: number; _videoUrl: string | undefined; } & DispatchProp<...>, ClassAttributes<...> & IProps>>'.

is I need to pass the startTime as _startTime when I am doing the mapStateToProps?

@manzil-infinity180
Copy link
Contributor Author

@damencho could you please review it ?

@damencho
Copy link
Member

I have tested this on web, its working perfectly how I expected to be, I am not sure why the linting is throwing error

Argument of type 'typeof YoutubeVideoManager' is not assignable to parameter of type 'JSXElementConstructor<Matching<{ _conference: IJitsiConference | undefined; _isOwner: boolean; _ownerId: string | undefined; _status: string | undefined; startTime: number | undefined; _time: number; _videoUrl: string | undefined; } & DispatchProp<...>, ClassAttributes<...> & IProps>>'.

is I need to pass the startTime as _startTime when I am doing the mapStateToProps?

The native AbstractVideoManager is requiring starttime as a number and you are passing number | undefined, types do not match.

@manzil-infinity180
Copy link
Contributor Author

I have tested this on web, its working perfectly how I expected to be, I am not sure why the linting is throwing error
Argument of type 'typeof YoutubeVideoManager' is not assignable to parameter of type 'JSXElementConstructor<Matching<{ _conference: IJitsiConference | undefined; _isOwner: boolean; _ownerId: string | undefined; _status: string | undefined; startTime: number | undefined; _time: number; _videoUrl: string | undefined; } & DispatchProp<...>, ClassAttributes<...> & IProps>>'.
is I need to pass the startTime as _startTime when I am doing the mapStateToProps?

The native AbstractVideoManager is requiring starttime as a number and you are passing number | undefined, types do not match.

fixed e2ead5a

@manzil-infinity180
Copy link
Contributor Author

manzil-infinity180 commented Mar 12, 2025

@damencho i fixed the lint and the test is also passing, could you please review it again? - ty

@github-actions
Copy link

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Support to play Youtube video from specified time

3 participants